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

[FEA] Remove cudf.Scalar #17843

Open
mroeschke opened this issue Jan 28, 2025 · 1 comment
Open

[FEA] Remove cudf.Scalar #17843

mroeschke opened this issue Jan 28, 2025 · 1 comment
Labels
feature request New feature or request Python Affects Python cuDF API.

Comments

@mroeschke
Copy link
Contributor

Is your feature request related to a problem? Please describe.
cudf.Scalar represents a stateful, synced representation of a CPU and GPU scalar, primary converting a CPU scalar to a GPU pylibcudf.Scalar (as of #17701) to pass to pylibcudf APIs.

From auditing cudf.Scalar usage, there is no usage of needing to persist an object syncing a CPU to a GPU scalar. The most important functionality cudf.Scalar is caching the conversion of a CPU scalar to a GPU scalar.

Describe the solution you'd like
cudf.Scalar can be wholly replaced by the functional pa_scalar_to_plc_scalar which caches the conversion of a pyarrow.Scalar to a pylibcudf.Scalar.

(The conversion from a pylibcudf.Scalar to a CPU scalar is handled by converting the scalar to a size 1 column and using Column.element_indexing)

Describe alternatives you've considered
Keep the status quo.

@mroeschke mroeschke added feature request New feature or request Python Affects Python cuDF API. labels Jan 28, 2025
rapids-bot bot pushed a commit that referenced this issue Jan 29, 2025
Towards #17843

Needed to change some `interval_range` test to account for pandas-dev/pandas#57268

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)

Approvers:
  - Matthew Murray (https://github.com/Matt711)

URL: #17844
@mroeschke
Copy link
Contributor Author

mroeschke commented Jan 30, 2025

Since cudf.Scalar is technically public, this will require a deprecation cycle to fully remove, but we can continue to start to fully migrate off of it internally in cudf.

rapids-bot bot pushed a commit that referenced this issue Jan 30, 2025
Towards #17843

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)

Approvers:
  - Matthew Murray (https://github.com/Matt711)

URL: #17847
rapids-bot bot pushed a commit that referenced this issue Jan 31, 2025
rapids-bot bot pushed a commit that referenced this issue Feb 4, 2025
Toward #17843

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #17897
rapids-bot bot pushed a commit that referenced this issue Feb 5, 2025
Towards #17843

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #17860
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request Python Affects Python cuDF API.
Projects
None yet
Development

No branches or pull requests

1 participant