microsoft / FLAML

A fast library for AutoML and tuning. Join our Discord: https://discord.gg/Cppx2vSPVP.
https://microsoft.github.io/FLAML/
MIT License
3.91k stars 508 forks source link

'SearchState' object has no attribute 'trained_estimator' #205

Closed flippercy closed 3 years ago

flippercy commented 3 years ago

Hi @sonichi:

When running the latest version of FLAML (0.6.2) on an azure VM via reticulate, I got the following error:

automl._search_states['MonoLightGBM'].trained_estimator AttributeError: 'SearchState' object has no attribute 'trained_estimator'

As a result, automl.best_model_for_estimator('MonoLightGBM') returned an empty object.

However, this learner has been searched thoroughly by FLAML:

automl._search_states['MonoLightGBM'].total_iter 199

Any idea on why I got this error? It did not happen with older versions

Thank you.

sonichi commented 3 years ago

Please pass "keep_search_state=True" to AutoML.fit(). Otherwise, the big objects in search states are cleared after fit finishes for saving memory.

flippercy commented 3 years ago

Got it. Thank you!