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

ArrayInterface handler for cuDF DataFrame cannot yet handle Boolean columns #10181

Open
hcho3 opened this issue Apr 13, 2024 · 1 comment
Open

Comments

@hcho3
Copy link
Collaborator

hcho3 commented Apr 13, 2024

Since the ArrayInterface class in XGBoost does not yet support Boolean columns, it throws an error

/workspace/src/c_api/../data/array_interface.h:500: Boolean-1 is not supported.

whenever Boolean columns are passed in. The error is only relevant for cuDF DataFrames, since the handler for Pandas DataFrame converts Boolean columns into float type.

Context. I encountered this error while working on #10175. Starting from Pandas 2.0, pd.get_dummies() returns Boolean type, instead of uint8 (pandas-dev/pandas#48022).

@hcho3 hcho3 changed the title Pandas 2.0+: get_dummies() now returns Bool type instead of uint8 _transform_cudf_df() cannot yet handle Boolean columns Apr 13, 2024
hcho3 added a commit that referenced this issue Apr 13, 2024
@hcho3 hcho3 changed the title _transform_cudf_df() cannot yet handle Boolean columns ArrayInterface handler cannot yet handle Boolean columns Apr 13, 2024
@hcho3 hcho3 changed the title ArrayInterface handler cannot yet handle Boolean columns ArrayInterface handler for cuDF DataFrame cannot yet handle Boolean columns Apr 13, 2024
hcho3 added a commit that referenced this issue Apr 15, 2024
* [CI] Update RAPIDS to latest stable

* [CI] Use rapidsai stable channel; fix syntax errors in Dockerfile.gpu

* Don't combine astype() with loc()

* Work around #10181

* Fix formatting

* Fix test

---------

Co-authored-by: hcho3 <hcho3@users.noreply.github.com>
Co-authored-by: Hyunsu Cho <chohyu01@cs.washington.edu>
@trivialfis
Copy link
Member

We need to use the bit mask for accessing boolean columns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants