aimclub / FEDOT

Automated modeling and machine learning framework FEDOT
https://fedot.readthedocs.io
BSD 3-Clause "New" or "Revised" License
632 stars 86 forks source link

Error with Pipeline import/export in several examples #760

Closed gkirgizov closed 2 years ago

gkirgizov commented 2 years ago

Example pipeline_import_export.py and examples/simple/time_series_forecasting/clstm.py fail with the following, something related to serialization of operations:

Traceback (most recent call last):
  File "/home/hades/projects/FEDOT/examples/simple/pipeline_import_export.py", line 85, in <module>
    run_import_export_example(pipeline_path='import_export', pipeline=regression_ransac_pipeline())
  File "/home/hades/projects/FEDOT/examples/simple/pipeline_import_export.py", line 77, in run_import_export_example
    pipeline_from_dict.load(dict_pipeline, dict_fitted_operations)
  File "/home/hades/projects/FEDOT/fedot/core/pipelines/pipeline.py", line 280, in load
    self.template.import_pipeline(source, dict_fitted_operations)
  File "/home/hades/projects/FEDOT/fedot/core/pipelines/template.py", line 217, in import_pipeline
    self.convert_to_pipeline(self.link_to_empty_pipeline, path, dict_fitted_operations)
  File "/home/hades/projects/FEDOT/fedot/core/pipelines/template.py", line 267, in convert_to_pipeline
    f.write(dict_fitted_operations['preprocessing'])
TypeError: a bytes-like object is required, not '_io.BytesIO'
gkirgizov commented 2 years ago

There's also another problem: in log there appears error

PipelineTemplate - Cannot export to template: 'NoneType' object is not subscriptable