HyperGBM icon indicating copy to clipboard operation
HyperGBM copied to clipboard

bug

Open wangjianqiao111 opened this issue 1 year ago • 1 comments

程序运行报错.

System information

  • OS Platform and Distribution (e.g., CentOS 7.6):linux
  • Python version:3.7
  • HyperGBM version:0.3.0
  • Other Python packages(run pip list):
  • Package Version

backcall 0.2.0 bcrypt 4.0.1 catboost 1.2.2 certifi 2023.7.22 cffi 1.15.1 charset-normalizer 3.3.0 click 8.1.7 cloudpickle 2.2.1 cryptography 41.0.4 cycler 0.11.0 dask 2022.2.0 dask-glm 0.3.0 dask-ml 2022.5.27 decorator 5.1.1 distributed 2022.2.0 fonttools 4.38.0 fsspec 2023.1.0 graphviz 0.20.1 HeapDict 1.0.1 hypergbm 0.3.0 hypernets 0.3.0 idna 3.4 imbalanced-learn 0.11.0 importlib-metadata 6.7.0 ipython 7.34.0 jedi 0.19.1 Jinja2 3.1.2 joblib 1.3.2 kiwisolver 1.4.5 lightgbm 4.1.0 llvmlite 0.39.1 locket 1.0.0 MarkupSafe 2.1.3 matplotlib 3.5.3 matplotlib-inline 0.1.6 msgpack 1.0.5 multipledispatch 1.0.0 numba 0.56.4 numpy 1.21.6 packaging 23.2 pandas 1.3.5 paramiko 3.3.1 parso 0.8.3 partd 1.4.1 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.5.0 pip 23.0.1 plotly 5.17.0 prettytable 3.7.0 prompt-toolkit 3.0.39 psutil 5.8.0 ptyprocess 0.7.0 pyarrow 12.0.1 pycparser 2.21 Pygments 2.16.1 PyNaCl 1.5.0 pyparsing 3.1.1 python-dateutil 2.8.2 pytz 2023.3.post1 PyYAML 6.0.1 requests 2.31.0 scikit-learn 1.0.2 scipy 1.7.3 setuptools 58.1.0 six 1.16.0 sortedcontainers 2.4.0 sparse 0.13.0 tblib 2.0.0 tenacity 8.2.3 threadpoolctl 3.1.0 toolz 0.12.0 tornado 6.2 tqdm 4.66.1 traitlets 5.9.0 typing_extensions 4.7.1 urllib3 2.0.7 wcwidth 0.2.8 xgboost 1.6.2 XlsxWriter 3.1.8 zict 2.2.0 zipp 3.15.0

**distributed.worker - WARNING - Compute Failed Function: execute_task args: ((<function pipe at 0x7f54ae8260e0>, [0 1 1 0 Name: Class, dtype: int64], <Serialize: functools.partial(<function _concat at 0x7f54916d0cb0>, ignore_index=False)>, <Serialize: functools.partial(<function unique at 0x7f54916c97a0>, series_name='Class')>)) kwargs: {} Exception: 'TypeError("'Serialize' object is not callable")'

Traceback (most recent call last): File "", line 2, in File "", line 5, in train File "/usr/local/python3.7.17/lib/python3.7/site-packages/hypergbm/experiment.py", line 246, in make_experiment **kwargs File "/usr/local/python3.7.17/lib/python3.7/site-packages/hypernets/experiment/_maker.py", line 312, in make_experiment task, _ = tb.infer_task_type(y_train, excludes=dc_nan_chars if dc_nan_chars is not None else None) File "/usr/local/python3.7.17/lib/python3.7/site-packages/hypernets/tabular/toolbox.py", line 320, in infer_task_type uniques = cls.unique(y) File "/usr/local/python3.7.17/lib/python3.7/site-packages/hypernets/tabular/dask_ex/_toolbox.py", line 230, in unique uniques = y.unique().compute() File "/usr/local/python3.7.17/lib/python3.7/site-packages/dask/base.py", line 290, in compute (result,) = compute(self, traverse=False, **kwargs) File "/usr/local/python3.7.17/lib/python3.7/site-packages/dask/base.py", line 573, in compute results = schedule(dsk, keys, **kwargs) File "/usr/local/python3.7.17/lib/python3.7/site-packages/distributed/client.py", line 2994, in get results = self.gather(packed, asynchronous=asynchronous, direct=direct) File "/usr/local/python3.7.17/lib/python3.7/site-packages/distributed/client.py", line 2152, in gather asynchronous=asynchronous, File "/usr/local/python3.7.17/lib/python3.7/site-packages/distributed/utils.py", line 310, in sync self.loop, func, *args, callback_timeout=callback_timeout, kwargs File "/usr/local/python3.7.17/lib/python3.7/site-packages/distributed/utils.py", line 376, in sync raise exc.with_traceback(tb) File "/usr/local/python3.7.17/lib/python3.7/site-packages/distributed/utils.py", line 349, in f result = yield future File "/usr/local/python3.7.17/lib/python3.7/site-packages/tornado/gen.py", line 769, in run value = future.result() File "/usr/local/python3.7.17/lib/python3.7/site-packages/distributed/client.py", line 2009, in _gather raise exception.with_traceback(traceback) File "/usr/local/python3.7.17/lib/python3.7/site-packages/toolz/functoolz.py", line 628, in pipe data = func(data) TypeError: 'Serialize' object is not callable

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 avatar Oct 19 '23 03:10 wangjianqiao111

Try changing:

...
cluster = LocalCluster(processes=False)
...

to:

cluster = LocalCluster(processes=True)

oaksharks avatar Oct 20 '23 08:10 oaksharks