Skip to content

[WIP] Support converting cuda array interface objects with masks to pylibcudf Columns#18320

Closed
Matt711 wants to merge 6 commits intorapidsai:branch-25.04from
Matt711:fea/plc/support-masks-in-column-ingestion
Closed

[WIP] Support converting cuda array interface objects with masks to pylibcudf Columns#18320
Matt711 wants to merge 6 commits intorapidsai:branch-25.04from
Matt711:fea/plc/support-masks-in-column-ingestion

Conversation

@Matt711
Copy link
Contributor

@Matt711 Matt711 commented Mar 19, 2025

Description

Contributes to #15132 and #18214. I think this PR and #18311 should be sufficient for Curator to replace their existing logic to convert cupy arrays to list columns with from_pylibcudf and from_ndarray. Eg.

import cudf
import pylibcudf as plc

cudf.Series.from_pylibcudf(
    plc.Column.from_ndarray(...) # call on cupy array
)

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@Matt711 Matt711 added feature request New feature or request non-breaking Non-breaking change labels Mar 19, 2025
@copy-pr-bot
Copy link

copy-pr-bot bot commented Mar 19, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions bot added Python Affects Python cuDF API. pylibcudf Issues specific to the pylibcudf package labels Mar 19, 2025
@Matt711
Copy link
Contributor Author

Matt711 commented Mar 19, 2025

/ok to test

@Matt711 Matt711 changed the title [WIP] Support converting cupy arrays with masks to pylibcudf Columns [WIP] Support converting cauda array interface objects with masks to pylibcudf Columns Mar 19, 2025
@Matt711 Matt711 changed the title [WIP] Support converting cauda array interface objects with masks to pylibcudf Columns [WIP] Support converting cuda array interface objects with masks to pylibcudf Columns Mar 19, 2025
return cp.asarray(np_2darray)


class CuPyArrayWithMask(cp.ndarray):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class CuPyArrayWithMask(cp.ndarray):
# There no built-in way to create a cupy array with a
# mask. See https://github.com/cupy/cupy/issues/2225
class CuPyArrayWithMask(cp.ndarray):

@Matt711
Copy link
Contributor Author

Matt711 commented May 6, 2025

Closing this for now as mask support is not a priority

@Matt711 Matt711 closed this May 6, 2025
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 non-breaking Non-breaking change pylibcudf Issues specific to the pylibcudf package Python Affects Python cuDF API.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant