Skip to content

dask xgboost AttributeError: 'DataFrame' object has no attribute 'unique' #9281

@naarkhoo

Description

@naarkhoo

I am trying to do classification using dask xgboost
but get

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-60-d22c31ae208b> in <module>
      2 client = Client()
      3 
----> 4 est.fit(ttx, tty)

/opt/conda/lib/python3.8/site-packages/dask_xgboost/core.py in fit(self, X, y, classes, eval_set, sample_weight, sample_weight_eval_set, eval_metric, early_stopping_rounds)
    563                 classes = da.unique(y)
    564             else:
--> 565                 classes = y.unique()
    566             classes = classes.compute()
    567         else:

/opt/conda/lib/python3.8/site-packages/dask/dataframe/core.py in __getattr__(self, key)
   3912             return self[key]
   3913         else:
-> 3914             raise AttributeError("'DataFrame' object has no attribute %r" % key)
   3915 
   3916     def __dir__(self):

AttributeError: 'DataFrame' object has no attribute 'unique'

I am using dask '2021.04.1'; also I noticed a similar recent (25 days go) rapidsai/cuml#3381 - not sure if relevant. I don't have this problem if I use xgboost regressor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dataframeneeds infoNeeds further information from the user

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions