Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] ImportError: cannot import name 'make_column_transformer' from 'cuml.preprocessing' #5675

Closed
amanlai opened this issue Nov 29, 2023 · 0 comments · Fixed by #5680
Closed
Labels
? - Needs Triage Need team to review and classify doc Documentation

Comments

@amanlai
Copy link

amanlai commented Nov 29, 2023

When I try to run the following example code from the docs in Google Colab (Python 3.10, T4 GPU), I get an ImportError:

ImportError: cannot import name 'make_column_transformer' from 'cuml.preprocessing'

The code in question:

from cuml.preprocessing import StandardScaler, OneHotEncoder
from cuml.compose import make_column_transformer
from cuml.compose import make_column_selector
import cupy as cp
import cudf  
X = cudf.DataFrame({'city': ['London', 'London', 'Paris', 'Sallisaw'],
                   'rating': [5, 3, 4, 5]})  
ct = make_column_transformer(
      (StandardScaler(),
       make_column_selector(dtype_include=cp.number)),  # rating
      (OneHotEncoder(),
       make_column_selector(dtype_include=object)))  # city
ct.fit_transform(X)  

I installed rapids using the following command:

!git clone https://github.com/rapidsai/rapidsai-csp-utils.git
!python rapidsai-csp-utils/colab/pip-install.py
@amanlai amanlai added ? - Needs Triage Need team to review and classify doc Documentation labels Nov 29, 2023
rapids-bot bot pushed a commit that referenced this issue Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
? - Needs Triage Need team to review and classify doc Documentation
Projects
None yet
1 participant