Closed pentschev closed 6 months ago
Let me look, it should be possible to fix this in the cudf.pandas wrapper magic.
Simpler repro:
import cudf.pandas
cudf.pandas.install()
import dask.dataframe
Can you try:
diff --git a/python/cudf/cudf/pandas/_wrappers/pandas.py b/python/cudf/cudf/pandas/_wrappers/pandas.py
index b7c8e92e8d..3c82d57193 100644
--- a/python/cudf/cudf/pandas/_wrappers/pandas.py
+++ b/python/cudf/cudf/pandas/_wrappers/pandas.py
@@ -174,7 +174,7 @@ Series = make_final_proxy_type(
"__arrow_array__": arrow_array_method,
"__cuda_array_interface__": cuda_array_interface,
"__iter__": custom_iter,
- "dt": _AccessorAttr(DatetimeProperties),
+ "dt": _AccessorAttr(CombinedDatetimelikeProperties),
"str": _AccessorAttr(StringMethods),
"cat": _AccessorAttr(_CategoricalAccessor),
"_constructor": _FastSlowAttribute("_constructor"),
@@ -208,7 +208,7 @@ Index = make_final_proxy_type(
"__array_function__": array_function_method,
"__arrow_array__": arrow_array_method,
"__cuda_array_interface__": cuda_array_interface,
- "dt": _AccessorAttr(DatetimeProperties),
+ "dt": _AccessorAttr(CombinedDatetimelikeProperties),
"str": _AccessorAttr(StringMethods),
"cat": _AccessorAttr(_CategoricalAccessor),
"__iter__": custom_iter,
This showed up a problem in our pandas wrappers in cudf.pandas (which the above patch fixes), but when we merged dask/dask#11035 we accidentally dropped some exception handling, that I reinstate in https://github.com/dask/dask/pull/11049
Thanks @wence- , yes, using the patch from https://github.com/rapidsai/cudf/issues/15522#issuecomment-2051507770 the code completes without errors in my docker+conda environment. Could you submit a PR for that?
Describe the bug This is likely a manifestation of the same issue from Python 3.11.9 changes that was observed in Dask which was fixed in https://github.com/dask/dask/pull/11035 .
Error stack
```python Traceback (most recent call last): File "/opt/conda/envs/cudf/lib/python3.11/site-packages/cudf/pandas/fast_slow_proxy.py", line 889, in _fast_slow_function_call result = func(*fast_args, **fast_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: type object 'DatetimeProperties' has no attribute 'components' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "Steps/Code to reproduce bug
Expected behavior The code should complete without errors.
Environment overview (please complete the following information)
Environment details
Click here to see environment details