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

Update pyarrow-related dispatch logic in dask_cudf #14069

Merged
merged 98 commits into from
Sep 18, 2023

Conversation

rjzamora
Copy link
Member

@rjzamora rjzamora commented Sep 8, 2023

Description

Updates dask_cudf dispatch logic to avoid breakage from dask/dask#10500.
Also removes stale try/except logic.

Checklist

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

raydouglass and others added 30 commits March 30, 2020 11:03
Merge pull request rapidsai#5690 from ajschmidt8/phase2
[skip ci] Update master references for main branch
[RELEASE] Re-release v0.15 cudf [skip-ci]
[RELEASE] v0.18.2 `cudf` release [skip-ci]
@rjzamora rjzamora added bug Something isn't working 3 - Ready for Review Ready for review by team dask Dask issue non-breaking Non-breaking change labels Sep 8, 2023
@rjzamora rjzamora self-assigned this Sep 8, 2023
@copy-pr-bot
Copy link

copy-pr-bot bot commented Sep 8, 2023

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions bot added the Python Affects Python cuDF API. label Sep 8, 2023
@rjzamora
Copy link
Member Author

rjzamora commented Sep 8, 2023

/ok to test

@rjzamora rjzamora marked this pull request as ready for review September 8, 2023 14:24
@rjzamora rjzamora requested a review from a team as a code owner September 8, 2023 14:24
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.

Thanks

"Ignoring the following arguments to "
f"`pyarrow_schema_dispatch`: {list(kwargs)}"
)
return obj.to_arrow(preserve_index=preserve_index).schema
Copy link
Contributor

Choose a reason for hiding this comment

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

thought (non-blocking): ‏If dask asks for the schema separately from the table it would be good to figure out a way to provide a pyarrow schema for a cudf dataframe without necessarily copying the full frame to host. Ideally producing this metadata should be O(1) rather than (as it is now) O(size-of-frame).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, good call. The specific logic in _get_pyarrow_schema_cudf wasn't really part of this PR, but that's an excellent point. It definitely feels like we should be able to produce a schema without moving all the data!

Copy link
Member Author

Choose a reason for hiding this comment

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

Using meta_nonempty(obj) seems to do the trick here.

@wence-
Copy link
Contributor

wence- commented Sep 13, 2023

/ok to test

@rjzamora
Copy link
Member Author

/ok to test

@rjzamora rjzamora added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team labels Sep 13, 2023
@rjzamora
Copy link
Member Author

/merge

@wence-
Copy link
Contributor

wence- commented Sep 18, 2023

/ok to test

@rapids-bot rapids-bot bot merged commit 4ca568e into rapidsai:branch-23.10 Sep 18, 2023
54 checks passed
@rjzamora rjzamora deleted the preserve-index-dispatch branch September 18, 2023 15:50
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 bug Something isn't working dask Dask issue non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants