-
Notifications
You must be signed in to change notification settings - Fork 156
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
Fix broken hausdorff test #1295
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix seems fine to me, although I wonder if maybe it should be changed the other way in the long term i.e. have cuspatial return an empty RangeIndex rather than force cudf to produce an empty Index.
Indeed that's what chatGPT thinks. https://chat.openai.com/share/43a1b380-e356-4b5e-8c87-08b07003435b How hard would it be to fix cuSpatial to match cuDF here? |
Maybe not that hard - probably need one more argument for |
Fundamentally these two calls are different: In [4]: print(cudf.DataFrame([]).columns)
RangeIndex(start=0, stop=0, step=1)
In [5]: print(cudf.DataFrame._from_columns([], range(0)).columns)
Index([], dtype='object') One is the public API that cuspatial generate the gold result from, and the other is the internal factory function that cuspatial depends upon. I think the proper way forward is that cuspatial shouldn't rely on using internal function from cuDF and attempt to reconstruct the result using public API. |
Ooops, I looked at the wrong place - empty input has a shortcut that directly return an empty dataframe. So the actual cause of error is: In [3]: cudf.DataFrame([]).columns
Out[3]: RangeIndex(start=0, stop=0, step=1)
In [4]: cudf.DataFrame().columns
Out[4]: Index([], dtype='object') |
Ok I think I prefer this fix - not having to fix the golden result seems a better way forward. |
I agree I prefer this fix. Thanks for indulging my question! |
This PR revises the gold result of hausdorff empty input test to address
an upstream change in cudf.
Description
Checklist