Skip to content

Commit

Permalink
Resolve hash_columns FutureWarning in dask_cudf (#9481)
Browse files Browse the repository at this point in the history
Resolve the following `FutureWarning` raised in `dask_cudf` when using `safe_hash`:

```python
FutureWarning: The `hash_columns` method will be removed in a future cuDF release. Replace `df.hash_columns(columns, method)` with `df[columns].hash_values(method)`.
```

This blocks Dask-CUDA CI, as we're following a strict policy towards deprecation warnings.

Authors:
  - Peter Andreas Entschev (https://github.com/pentschev)

Approvers:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

URL: #9481
  • Loading branch information
pentschev authored Oct 20, 2021
1 parent 61f79f8 commit fc868b8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions python/dask_cudf/dask_cudf/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,7 @@ def union_categoricals_cudf(


def safe_hash(frame):
index = frame.index
if isinstance(frame, cudf.DataFrame):
return cudf.Series(frame.hash_columns(), index=index)
else:
return cudf.Series(frame.hash_values(), index=index)
return cudf.Series(frame.hash_values(), index=frame.index)


@hash_object_dispatch.register((cudf.DataFrame, cudf.Series))
Expand Down

0 comments on commit fc868b8

Please sign in to comment.