Skip to content

Commit

Permalink
Update to support cudf 2024.06 (#6263)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored Jun 6, 2024
1 parent 9cc87fe commit c37420b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion holoviews/core/data/cudf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import numpy as np
import pandas as pd
from pandas.api.types import is_numeric_dtype

from .. import util
from ..dimension import dimension_name
Expand Down Expand Up @@ -285,7 +286,11 @@ def aggregate(cls, dataset, dimensions, function, **kwargs):
grouped = reindexed.groupby(cols, sort=False)
if not hasattr(grouped, agg):
raise ValueError(f'{agg} aggregation is not supported on cudf DataFrame.')
df = getattr(grouped, agg)().reset_index()
numeric_cols = [
c for c, d in zip(reindexed.columns, reindexed.dtypes)
if is_numeric_dtype(d) and c not in cols
]
df = getattr(grouped[numeric_cols], agg)().reset_index()
else:
agg_map = {'amin': 'min', 'amax': 'max', 'size': 'count'}
agg = agg_map.get(agg, agg)
Expand Down
3 changes: 2 additions & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@ NUMBA_CUDA_LOW_OCCUPANCY_WARNINGS = "0"

[feature.test-gpu.dependencies]
cuda-version = "12.2.*"
cudf = "24.04.*"
cudf = "24.06.*"
cupy = "*"
cuspatial = "*"
librmm = { version = "*", channel = "rapidsai" }
rmm = { version = "*", channel = "rapidsai" }

[feature.test-gpu.tasks]
Expand Down

0 comments on commit c37420b

Please sign in to comment.