-
Notifications
You must be signed in to change notification settings - Fork 94
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,9 @@ | |
|
||
import dask | ||
import dask.utils | ||
import dask.dataframe.core | ||
import dask.dataframe as dd | ||
import dask.dataframe.shuffle | ||
from .explicit_comms.dataframe.shuffle import patch_shuffle_expression | ||
from dask.dataframe import DASK_EXPR_ENABLED | ||
from distributed.protocol.cuda import cuda_deserialize, cuda_serialize | ||
from distributed.protocol.serialize import dask_deserialize, dask_serialize | ||
|
||
|
@@ -19,12 +18,15 @@ | |
from .proxify_device_objects import proxify_decorator, unproxify_decorator | ||
|
||
|
||
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." | ||
) | ||
try: | ||
if not dd._dask_expr_enabled(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure when/if the |
||
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." | ||
) | ||
except AttributeError: | ||
pass | ||
|
||
|
||
# Monkey patching Dask to make use of explicit-comms when `DASK_EXPLICIT_COMMS=True` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
from dask.base import tokenize | ||
from dask.dataframe import DataFrame, Series | ||
from dask.dataframe.core import _concat as dd_concat | ||
from dask.dataframe.shuffle import group_split_dispatch, hash_object_dispatch | ||
from dask.dataframe.dispatch import group_split_dispatch, hash_object_dispatch | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All dispatch functions have been centralized in the |
||
from distributed import wait | ||
from distributed.protocol import nested_deserialize, to_serialize | ||
from distributed.worker import Worker | ||
|
@@ -585,7 +585,7 @@ def _layer(self): | |
# Execute an explicit-comms shuffle | ||
if not hasattr(self, "_ec_shuffled"): | ||
on = self.partitioning_index | ||
df = dask_expr._collection.new_collection(self.frame) | ||
df = dask_expr.new_collection(self.frame) | ||
self._ec_shuffled = shuffle( | ||
df, | ||
[on] if isinstance(on, str) else on, | ||
|
There was a problem hiding this comment.
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.