-
Notifications
You must be signed in to change notification settings - Fork 915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Type checks fail with cuDF pandas objects #14674
Comments
Thanks for reporting @paulsbrookes! The The other |
Thanks @shwina! One workaround I've found for dealing with situations where third-party libraries do not know how to deal with a cuDF pandas DataFrame is to recreate the dataframe as follows:
The code block above passes without an assertion error. If I understand correctly this creates a regular pandas dataframe from the cudf pandas dataframe which can then be used by third party libraries as normal. @shwina do you know of any alternatives to this? |
Correct - it also means that third-party libraries won't be able to leverage the GPU in any way.
No - that's right. The |
I opened #14678, which addresses the first issue you raised (instancechecks against |
Thanks @shwina! |
…ts against `BaseOffset` (#14678) Addresses part of #14674. This PR makes `cudf.pandas` aware of the `BaseOffset` type. Because of the way `isinstance()` checks work on proxy types*, we will now pass instance checks like: ```python freq = "D" assert isinstance(pd.tseries.frequencies.to_offset(freq), pd.tseries.offsets.BaseOffset) ``` *proxy types appear to be related to each other in the same way as their corresponding slow types. So if `A` inherits from `B`, then `ProxyA` _appears_ to inherit from `ProxyB` even though they are not _actually_ related by inheritance. Authors: - Ashwin Srinath (https://github.com/shwina) - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Vyas Ramasubramani (https://github.com/vyasr) URL: #14678
Closing this issue since it's now a duplicate of #14537 |
Describe the bug
Some type checks fail with cuDF pandas objects.
Steps/Code to reproduce bug
The following examples fail with assertion errors:
Both of these examples pass if we remove the
cudf.pandas.install()
line.Expected behavior
I expected the code blocks above to run so that I could use the accelerated version of pandas with zero code changes. The errors I'm facing make it difficult to work with cuDF pandas and other libraries (e.g. https://github.com/Nixtla/statsforecast).
Environment overview (please complete the following information)
Environment details
Click here to see environment details
The text was updated successfully, but these errors were encountered: