sb-ai-lab / LightAutoML

Fast and customizable framework for automatic ML model creation (AutoML)
https://developers.sber.ru/portal/products/lightautoml
Apache License 2.0
1.12k stars 52 forks source link

Fix features forcing inside feature selection #49

Closed dev-rinchin closed 1 year ago

dev-rinchin commented 1 year ago

🐛 Bug

Feature forcing is not working.

https://github.com/sb-ai-lab/LightAutoML/blob/d0c1d66bf893a597f9f9fe8f75f85c3a391ed1fb/lightautoml/pipelines/selection/base.py#L210

Additional context

AutoML reuses feature selector from 1st level in the 2nd level if level 2 not using feature selector. So if feature forcing not working predictions from 1st level not passed to next levels.

Where AutoML reuses feature selector: https://github.com/sb-ai-lab/LightAutoML/blob/774c8c69cb345336f266b043be20558ee11ad44a/lightautoml/automl/presets/tabular_presets.py#L435

https://github.com/sb-ai-lab/LightAutoML/blob/774c8c69cb345336f266b043be20558ee11ad44a/lightautoml/automl/presets/tabular_presets.py#L443 https://github.com/sb-ai-lab/LightAutoML/blob/774c8c69cb345336f266b043be20558ee11ad44a/lightautoml/automl/presets/tabular_presets.py#L453