rapidsai / cuml

cuML - RAPIDS Machine Learning Library
https://docs.rapids.ai/api/cuml/stable/
Apache License 2.0
4.23k stars 532 forks source link

[BUG] AttributeError: 'DataFrame' object has no attribute 'unique' #5811

Open Nithish-Chowdary opened 7 months ago

Nithish-Chowdary commented 7 months ago

Describe the bug I'm trying to build a Random Forest Regressor using cuml.dask.ensemble.RandomForestRegressor. collab V100 GPUs are used.

Steps/Code to reproduce bug from cuml.dask.ensemble import RandomForestRegressor as cuRF from dask_ml.model_selection import train_test_split

train, test = train_test_split(Data, test_size=0.2, shuffle=True, random_state=42)

train_labels = train[single_label].map_partitions(cudf.from_pandas) train_features = train[target_features].map_partitions(cudf.from_pandas) test_labels = test[single_label].map_partitions(cudf.from_pandas) test_features = test[target_features].map_partitions(cudf.from_pandas)

model = cuRF(n_estimators=100, random_state=42, verbose = True)

model.fit(train_features, train_labels)

Expected behavior I want the model to fit

Environment details (please complete the following information):

dantegd commented 7 months ago

Thanks for the issue @Nithish-Chowdary, the ussue is that CUDA 9.2 is not supported, the packages that are being installed require CUDA 11.2 as a minimum, with the cu12 versions being usable in any CUDA 12.0 system.

Nithish-Chowdary commented 7 months ago

Thanks for reaching out, Sorry for providing the wrong CUDA Version

my CUDA version is 12.2 Screenshot from 2024-03-21 00-11-38

dantegd commented 7 months ago

Unfortunately, the version provided by nvidia-smi just corresponds to the driver's CUDA version (i.e. the CUDA that came bundled with the driver), and doesn't necessarily correspond with the CTK of an environment. For example with conda one could have a driver for CUDA 12.x and have CUDA 11.x in the conda env. Since you are using pip to install, and cu11 then you'd need a CUDA 11, you can check that probably by typing nvcc --version in the command line

Nithish-Chowdary commented 7 months ago

Thanks for quick response

I am installing these packages !pip install --extra-index-url=https://pypi.nvidia.com cudf-cu12==24.2. dask-cudf-cu12==24.2. cuml-cu12==24.2.*

and cuda version is Screenshot from 2024-03-21 00-23-52