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

AtributeError mensage during fit #126

Closed luizhemelo closed 3 years ago

luizhemelo commented 3 years ago

Hi everyone!!

I've received the atribute error message below when using FLAML with XGBoost (this error occurs with others algorithms too):

[flaml.automl: 07-01 10:45:34] {908} INFO - Evaluation method: cv
[flaml.automl: 07-01 10:45:34] {607} INFO - Using StratifiedKFold
[flaml.automl: 07-01 10:45:34] {929} INFO - Minimizing error metric: 1-roc_auc
[flaml.automl: 07-01 10:45:34] {949} INFO - List of ML learners in AutoML Run: ['xgboost']
[flaml.automl: 07-01 10:45:34] {1013} INFO - iteration 0, current learner xgboost
Traceback (most recent call last):
  File "ft2.py", line 33, in <module>
    automl.fit(X_train=X, y_train=y, **settings)
  File "/scratch/luizhemelo/anaconda3/lib/python3.7/site-packages/flaml/automl.py", line 962, in fit
    self._search()
  File "/scratch/luizhemelo/anaconda3/lib/python3.7/site-packages/flaml/automl.py", line 1081, in _search
    use_ray=False)
  File "/scratch/luizhemelo/anaconda3/lib/python3.7/site-packages/flaml/tune/tune.py", line 270, in run
    search_alg.set_search_properties(metric, mode, config={
AttributeError: 'ConcurrencyLimiter' object has no attribute 'set_search_properties'

Parameters used:

settings = {
    "time_budget": 108000,
    "metric": 'roc_auc',
    "task": 'classification',
    "n_jobs": -1,
    "estimator_list": ['xgboost'],
    "n_splits": 5,
    "log_file_name": 'ft.log',
}

Specifications: Python 3.7.10 FLAML 0.5.4 (installed via PiP) XGBoost 1.4.0 (installed via conda)

Any ideas?

Thanks! :D

sonichi commented 3 years ago

Hi @luizhemelo Is ray installed in your environment? If so, which version is it?

luizhemelo commented 3 years ago

I didn't have Ray installed, @sonichi. After installation it worked perfect!! Thanks a lot!! :D

sonichi commented 3 years ago

It's supposed to work both with and without ray installation. So I don't really know what caused the error and I can't reproduce that error. Anyway, we'll remove the use of ConcurrencyLimiter in the next version.