aimclub / FEDOT

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

[Bug]: NaN-filled fit stage of topo+ica pipelines #1293

Closed Lopa10ko closed 1 month ago

Lopa10ko commented 1 month ago

Current Behavior

Pipelines cannot be fitted correctly due to... ValueError: array must not contain infs or NaNs causing test.integration.real_applications.test_examples::test_api_ts_forecasting_example failure

Steps to Reproduce

You can pass these pipelines to an initial_assumption field in examples/simple/time_series_forecasting/api_forecasting.py::run_ts_forecasting_example like so:

pipeline = Pipeline().load('<path_to_troubled_pipeline>')
model = Fedot(problem='ts_forecasting',
              task_params=Task(TaskTypesEnum.ts_forecasting,
                               TsForecastingParams(forecast_length=horizon)).task_params,
              timeout=timeout,
              n_jobs=-1,
              metric='mae',
              with_tuning=with_tuning,
              initial_assumption=pipeline)

Context

integration tests failure: https://github.com/aimclub/FEDOT/actions/runs/9174749106/job/25226254485

Cause

topo extractor result contains NaNs, when all NaNs are transformed to zeroes https://github.com/aimclub/FEDOT/blob/9434d6611db184f6cae74abea877bc897319c088/fedot/core/operations/evaluation/operation_implementations/data_operations/topological/fast_topological_extractor.py#L55-L68

this block of data causes failure on fast_ica node