microsoft / FLAML

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

ConcurrencyLimiter Issue #720

Open firmai opened 2 years ago

firmai commented 2 years ago

The ConcurrencyLimiter only works with Searcher objects (got <class 'flaml.searcher.blendsearch.CFO'>). Please try to pass max_concurrent to the search generator directly.

## Here you can do your first feature imprtance chart
''' import AutoML class from flaml package '''
from flaml import AutoML
automl = AutoML()

settings = {
    # "time_budget": 300,  # total running time in seconds
    "metric": 'auc',  # primary metrics for regression can be chosen from: ['mae','mse','r2','rmse','mape']
    "estimator_list": ['catboost'],  # list of ML learners; we tune lightgbm in this example
    "task": 'classification',  # task type    
    # "log_file_name": 'bankrupt_experiment.log',  # flaml log file
    "seed": 7654321,    # random seed
    "max_iter":20,
}

'''The main flaml automl API'''
automl.fit(X_train=df_price_fund_bank, y_train=target, **settings)

image

This on the latest and previous pypi versions, I haven't tried older ones.

sonichi commented 2 years ago

I assume it's caused by the new version of ray. What's the version of ray you are using?

firmai commented 1 year ago

Yes using this version https://pypi.org/project/ray/2.0.0/

sonichi commented 1 year ago

I'm not getting the same issue using ray 2.0.0. I got a bunch of warnings for which I made a PR #721 But I don't get the RuntimeError when using flaml==1.0.12 and ray==2.0.0. Could you double check the flaml version being used?

firmai commented 1 year ago

This issue was solved by simply restarting the kernel on GCP, thanks :)