INNER CODE UNIT · Python
save_predict
aimclub/FEDOT · fedot/api/main.py:481
def save_predict(self, predicted_data: OutputData, path_to_save: PathType):
""" Saves pipeline forecasts in csv file """
saved_to_path = predicted_data.save_predict(path_to_save)
self.log.message(f'Predictions saved to {saved_to_path}')
def export_as_project(self, project_path='fedot_project.zip'):
export_project_to_zip(zip_name=project_path, opt_history=self.history,
pipeline=self.current_pipeline,
train_data=self.train_data, test_data=self.test_data)
def import_as_project(self, project_path='fedot_project.zip'):
self.current_pipeline, self.train_data, self.test_data, self.history = \
import_project_from_zip(zip_path=project_path)
# TODO workaround to init internal fields of API and data
self.train_data = self.data_processor.define_data(features=self.train_data, is_predict=False)
self.test_data = self.data_processor.define_data(features=self.test_data, is_predict=True)
self.predict(self.test_data)