Skip to content
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

[REVIEW] Fix find_common_dtype and values to handle complex dtypes #12537

Merged
merged 12 commits into from
Mar 23, 2023

Conversation

galipremsagar
Copy link
Contributor

@galipremsagar galipremsagar commented Jan 11, 2023

Description

Fixes: #12083, fixes #12115
This PR fixes find_common_dtype and values APIs to handle complex dtypes by raising an error instead of casting them to strings.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@galipremsagar galipremsagar added bug Something isn't working 3 - Ready for Review Ready for review by team 4 - Needs cuDF (Python) Reviewer non-breaking Non-breaking change labels Jan 11, 2023
@galipremsagar galipremsagar self-assigned this Jan 11, 2023
@galipremsagar galipremsagar requested a review from a team as a code owner January 11, 2023 20:42
@github-actions github-actions bot added the Python Affects Python cuDF API. label Jan 11, 2023
@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

❗ No coverage uploaded for pull request base (branch-23.04@f567cf5). Click here to learn what that means.
Patch has no changes to coverable lines.

❗ Current head e2e16c4 differs from pull request most recent head 74272b4. Consider uploading reports for the commit 74272b4 to get more accurate results

Additional details and impacted files
@@               Coverage Diff               @@
##             branch-23.04   #12537   +/-   ##
===============================================
  Coverage                ?   85.66%           
===============================================
  Files                   ?      155           
  Lines                   ?    24822           
  Branches                ?        0           
===============================================
  Hits                    ?    21263           
  Misses                  ?     3559           
  Partials                ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the whole, I am slightly negative about this approach to fixing the reported initial bugs. I think that upcasting to string columns isn't really an improvement and would rather see an error message that was appropriate.

python/cudf/cudf/core/frame.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/frame.py Outdated Show resolved Hide resolved
python/cudf/cudf/utils/dtypes.py Outdated Show resolved Hide resolved
@wence- wence- self-assigned this Jan 30, 2023
@galipremsagar galipremsagar changed the base branch from branch-23.02 to branch-23.04 March 21, 2023 18:44
@galipremsagar galipremsagar requested review from wence- and vyasr March 22, 2023 01:02
@galipremsagar
Copy link
Contributor Author

@vyasr @wence- Made changes to raise errors for complex types in find_common_dtype, and added tests accordingly. This should be ready for review now.

Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, except a question as to whether we should push the NotImplementedError into find_common_type.

python/cudf/cudf/core/frame.py Outdated Show resolved Hide resolved
@galipremsagar galipremsagar added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team 4 - Needs cuDF (Python) Reviewer labels Mar 23, 2023
@galipremsagar
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 2818d45 into rapidsai:branch-23.04 Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
3 participants