Apologies - I'm aware there's a similar question, however I'm new to SO, so I'm unable to comment underneath the answer.
I'm having issues with sort_values in a vanilla install of cudf as per the RAPIDs website:
conda create -n rapids-22.08 -c rapidsai -c nvidia -c conda-forge cudf=22.08 python=3.9 cudatoolkit=11.0
N.B. I used CUDA 11.0 as the toolkit version instead of 11.5, as 11.5 was failing to download for some reason.
I have tried to run the following code
import cudf
df = cudf.DataFrame()
df['a'] = [0, 1, 2]
df['b'] = [-3, 2, 0]
df.sort_values('b')
and it has thrown the following error
Traceback (most recent call last):
File "/home/ruser/workspace/benchmark/test_cudf.py", line 5, in <module>
df.sort_values('b')
File "/home/ruser/.conda/envs/rapids-22.08/lib/python3.9/site-packages/cudf/core/indexed_frame.py", line 1901, in sort_values
out = self._gather(
File "/home/ruser/.conda/envs/rapids-22.08/lib/python3.9/site-packages/cudf/core/indexed_frame.py", line 1500, in _gather
if not libcudf.copying._gather_map_is_valid(
File "copying.pyx", line 67, in cudf._lib.copying._gather_map_is_valid
File "/home/ruser/.conda/envs/rapids-22.08/lib/python3.9/site-packages/cudf/core/mixins/mixin_factory.py", line 11, in wrapper
return method(self, *args1, *args2, **kwargs1, **kwargs2)
File "/home/ruser/.conda/envs/rapids-22.08/lib/python3.9/site-packages/cudf/core/scalar.py", line 284, in _binaryop
return Scalar(result, dtype=out_dtype)
File "/home/ruser/.conda/envs/rapids-22.08/lib/python3.9/site-packages/cudf/core/scalar.py", line 76, in __init__
self._host_value, self._host_dtype = self._preprocess_host_value(
File "/home/ruser/.conda/envs/rapids-22.08/lib/python3.9/site-packages/cudf/core/scalar.py", line 157, in _preprocess_host_value
value = to_cudf_compatible_scalar(value, dtype=dtype)
File "/home/ruser/.conda/envs/rapids-22.08/lib/python3.9/site-packages/cudf/utils/dtypes.py", line 247, in to_cudf_compatible_scalar
raise ValueError(
ValueError: Cannot convert value of type NotImplementedType to cudf scalar
Elsewhere the cudf library seems to be working fine - and results map one-to-one with various numpy comparisons I've done, so it seems largely ringfenced to sort_values() Any help as to how to workaround this would be greatly appreciated!