load method does not load data preprocessor through API
Created by: Dreamlone
- Does not initialize pipeline
- Does not load preprocessor in API
Example of fix:
from fedot.core.pipelines.pipeline import Pipeline
# First fix
loaded_model.current_pipeline = Pipeline()
loaded_model = Fedot(problem='regression')
loaded_model.load('./models/June-28-2022,16-07-24,PM pipeline/pipeline.json')
# Second fix
loaded_model.data_processor.preprocessor = loaded_model.current_pipeline.preprocessor
predictions = loaded_model.predict(features=df[train_columns])
print(f'Example of forecast from loaded model: {predictions[:5]}')
This should be included into the source code