DataCanvasIO / HyperGBM

A full pipeline AutoML tool for tabular data
https://hypergbm.readthedocs.io/
Apache License 2.0
325 stars 46 forks source link

TypeError: fit() got an unexpected keyword argument 'verbose' #103

Open wangjianqiao111 opened 8 months ago

wangjianqiao111 commented 8 months ago

Please make sure that this is a bug.

System information

2023-10-19 14:04:06.086 [ERROR] 10-19 14:04:06 E hypernets.m.hyper_model.py 103 - run_trail failed! trail_no=1 2023-10-19 14:04:06.090 [ERROR] 10-19 14:04:06 E hypernets.m.hyper_model.py 105 - Traceback (most recent call last): 2023-10-19 14:04:06.090 [ERROR] File "/usr/local/python3.7.17/lib/python3.7/site-packages/hypernets/model/hyper_model.py", line 98, in _run_trial 2023-10-19 14:04:06.090 [ERROR] estimator.fit(X, y, fit_kwargs) 2023-10-19 14:04:06.090 [ERROR] File "/usr/local/python3.7.17/lib/python3.7/site-packages/hypergbm/hyper_gbm.py", line 459, in fit 2023-10-19 14:04:06.090 [ERROR] self.model.fit(X, y, fit_kwargs) 2023-10-19 14:04:06.090 [ERROR] File "/usr/local/python3.7.17/lib/python3.7/site-packages/hypergbm/dask/_estimators.py", line 43, in fit 2023-10-19 14:04:06.090 [ERROR] super(LGBMClassifierDaskWrapper, self).fit(X, y, sample_weight=sample_weight, kwargs) 2023-10-19 14:04:06.090 [ERROR] File "/usr/local/python3.7.17/lib/python3.7/site-packages/lightgbm/dask.py", line 1214, in fit 2023-10-19 14:04:06.090 [ERROR] kwargs 2023-10-19 14:04:06.090 [ERROR] File "/usr/local/python3.7.17/lib/python3.7/site-packages/lightgbm/dask.py", line 1099, in _lgb_dask_fit 2023-10-19 14:04:06.090 [ERROR] kwargs 2023-10-19 14:04:06.090 [ERROR] File "/usr/local/python3.7.17/lib/python3.7/site-packages/lightgbm/dask.py", line 818, in _train 2023-10-19 14:04:06.090 [ERROR] results = client.gather(futures_classifiers) 2023-10-19 14:04:06.090 [ERROR] File "/usr/local/python3.7.17/lib/python3.7/site-packages/distributed/client.py", line 1952, in gather 2023-10-19 14:04:06.090 [ERROR] asynchronous=asynchronous, 2023-10-19 14:04:06.090 [ERROR] File "/usr/local/python3.7.17/lib/python3.7/site-packages/distributed/utils.py", line 311, in sync 2023-10-19 14:04:06.090 [ERROR] self.loop, func, *args, callback_timeout=callback_timeout, kwargs 2023-10-19 14:04:06.090 [ERROR] File "/usr/local/python3.7.17/lib/python3.7/site-packages/distributed/utils.py", line 364, in sync 2023-10-19 14:04:06.090 [ERROR] raise exc.with_traceback(tb) 2023-10-19 14:04:06.090 [ERROR] File "/usr/local/python3.7.17/lib/python3.7/site-packages/distributed/utils.py", line 349, in f 2023-10-19 14:04:06.090 [ERROR] result[0] = yield future 2023-10-19 14:04:06.090 [ERROR] File "/usr/local/python3.7.17/lib/python3.7/site-packages/tornado/gen.py", line 1133, in run 2023-10-19 14:04:06.090 [ERROR] value = future.result() 2023-10-19 14:04:06.090 [ERROR] File "/usr/local/python3.7.17/lib/python3.7/site-packages/distributed/client.py", line 1811, in _gather 2023-10-19 14:04:06.090 [ERROR] raise exception.with_traceback(traceback) 2023-10-19 14:04:06.090 [ERROR] File "/usr/local/python3.7.17/lib/python3.7/site-packages/lightgbm/dask.py", line 322, in _train_part 2023-10-19 14:04:06.090 [ERROR] kwargs 2023-10-19 14:04:06.090 [ERROR] TypeError: fit() got an unexpected keyword argument 'verbose' **

Describe the expected behavior

Standalone code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Jupyter notebook.

Are you willing to submit PR?(Yes/No)

Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

wangjianqiao111 commented 8 months ago

program code:

from dask import dataframe as dd from dask.distributed import LocalCluster, Client

from hypergbm import make_experiment from hypergbm.dask import search_space_general from hypernets.tabular.datasets import dsutils

def my_search_space(): return search_space_general(n_estimators=100)

def train(): cluster = LocalCluster(processes=False) client = Client(cluster)

train_data = dd.from_pandas(dsutils.load_blood(), npartitions=1)

experiment = make_experiment(train_data, target='Class', searcher='mcts', search_space=my_search_space)
estimator = experiment.run()
print(estimator)

if name == 'main': train()

oaksharks commented 8 months ago

Please try downgrading the version of lightgbm or using hypergbm on the main branch.