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

Add dispatch for cudf.Dataframe to/from pyarrow.Table conversion #13558

Merged
merged 4 commits into from
Jun 13, 2023

Conversation

rjzamora
Copy link
Member

@rjzamora rjzamora commented Jun 13, 2023

Description

Registers the necessary cudf-specific logic for the dispatch functions introduced in dask/dask#10312. These dispatch functions are necessary to enable "p2p" shuffling with a cudf backend (see: dask/distributed#7743)

Checklist

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

@rjzamora rjzamora added 2 - In Progress Currently a work in progress dask Dask issue non-breaking Non-breaking change labels Jun 13, 2023
@rjzamora rjzamora self-assigned this Jun 13, 2023
@rjzamora rjzamora requested a review from a team as a code owner June 13, 2023 13:20
@github-actions github-actions bot added the Python Affects Python cuDF API. label Jun 13, 2023
@rjzamora rjzamora added helps: Dask improvement Improvement / enhancement to an existing function labels Jun 13, 2023
Comment on lines +394 to +399
kwargs.pop("self_destruct", None)
if kwargs:
warnings.warn(
f"Ignoring the following arguments to "
f"`from_pyarrow_table_dispatch`: {list(kwargs)}"
)
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that self_destruct is currently the only argument "needed" by the p2p algorithm (for pandas backed data). However, cudf.DataFrame.from_arrow doesn't take this (or any other) key-word argument.

Since I expect a bit of iteration on exactly which key-word arguments these dispatch functions will need to support, I am temporarily using kwargs and warning the user if an unexpected argument is encountered. I'd prefer for these functions to not raise an error until we have time to nail down the exact API we need.

Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

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

Minor, but looks good, thanks @rjzamora

python/dask_cudf/dask_cudf/backends.py Show resolved Hide resolved
python/dask_cudf/dask_cudf/backends.py Outdated Show resolved Hide resolved
@rjzamora rjzamora added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 2 - In Progress Currently a work in progress labels Jun 13, 2023
@rjzamora
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit b1f2ade into rapidsai:branch-23.08 Jun 13, 2023
@rjzamora rjzamora deleted the pyarrow-table-dispatch branch June 13, 2023 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge dask Dask issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants