Skip to content

Commit

Permalink
Register cudf.core.groupby.Grouper objects to dask `grouper_dispatc…
Browse files Browse the repository at this point in the history
…h` (#10838) (#10982)

Backport of #10838

Authors:
   - https://github.com/brandon-b-miller

Approvers:
   - GALI PREM SAGAR (https://github.com/galipremsagar)
   - AJ Schmidt (https://github.com/ajschmidt8)
  • Loading branch information
brandon-b-miller authored May 27, 2022
1 parent 840c9d8 commit 0a34f67
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/dask_cudf/dask_cudf/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,16 @@ def is_categorical_dtype_cudf(obj):
return cudf.api.types.is_categorical_dtype(obj)


try:
from dask.dataframe.dispatch import grouper_dispatch

@grouper_dispatch.register((cudf.Series, cudf.DataFrame))
def get_grouper_cudf(obj):
return cudf.core.groupby.Grouper

except ImportError:
pass

try:
try:
from dask.array.dispatch import percentile_lookup
Expand Down

0 comments on commit 0a34f67

Please sign in to comment.