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

Clean up imports for dask>2024.12.1 support #1424

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

rjzamora
Copy link
Member

@rjzamora rjzamora commented Jan 7, 2025

Follow up to #1417

Cleans up some imports (some of which don't work for dask>2024.12.1).

@rjzamora rjzamora added bug Something isn't working 2 - In Progress Currently a work in progress non-breaking Non-breaking change labels Jan 7, 2025
Copy link

copy-pr-bot bot commented Jan 7, 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 the python python code needed label Jan 7, 2025
@rjzamora
Copy link
Member Author

rjzamora commented Jan 7, 2025

/ok to test

@rjzamora rjzamora self-assigned this Jan 8, 2025
@rjzamora rjzamora added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Jan 8, 2025
@rjzamora rjzamora marked this pull request as ready for review January 8, 2025 15:20
@rjzamora rjzamora requested a review from a team as a code owner January 8, 2025 15:20
"or None, or downgrade RAPIDS to <=24.12."
)
try:
if not dd._dask_expr_enabled():
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure when/if the _dask_expr_enabled attribute will be removed from the dask.dataframe module. However, when it is removed, we don't need to worry about query-planning being disabled, because that version of dask won't include the legacy API anyway.

from dask.dataframe.shuffle import group_split_dispatch, hash_object_dispatch
from dask.dataframe.dispatch import group_split_dispatch, hash_object_dispatch
Copy link
Member Author

Choose a reason for hiding this comment

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

All dispatch functions have been centralized in the dispatch module for a long time now. Many changes in this PR are just using that preferred module.

Copy link
Member

@madsbk madsbk left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @rjzamora

Comment on lines -22 to -27
if not DASK_EXPR_ENABLED:
raise ValueError(
"Dask-CUDA no longer supports the legacy Dask DataFrame API. "
"Please set the 'dataframe.query-planning' config to `True` "
"or None, or downgrade RAPIDS to <=24.12."
)
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved this logic into explicit_comms.dataframe.shuffle since that's really the only place in Dask-CUDA where dask-expr matters.

Copy link
Member

@pentschev pentschev left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @rjzamora .

@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 Jan 9, 2025
@rjzamora
Copy link
Member Author

rjzamora commented Jan 9, 2025

/merge

@rapids-bot rapids-bot bot merged commit afc27f4 into rapidsai:branch-25.02 Jan 9, 2025
32 checks passed
@rjzamora rjzamora deleted the cleanup-imports branch January 9, 2025 19:14
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 non-breaking Non-breaking change python python code needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants