-
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
Rewrites column.__setitem__
, Use boolean_mask_scatter
#10202
Merged
rapids-bot
merged 24 commits into
rapidsai:branch-22.04
from
isVoid:improvement/column_setitem_refactor
Feb 23, 2022
Merged
Changes from 15 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
685009f
Refactor of column.__setitem__
isVoid 570b0c4
Remove comments
isVoid 07f3bd4
Merge branch 'branch-22.04' of github.com:rapidsai/cudf into improvem…
isVoid 3fc4846
Update copyright years
isVoid 5838607
Use a ternary operator and check key type with isinstance
isVoid f85cddb
Update err message
isVoid ed6a4fa
Remove wrong param style
isVoid 9ef7f14
Merge branch 'improvement/column_setitem_refactor' of github.com:isVo…
isVoid f50c57e
Improving index handling
isVoid b13eb69
Update python/cudf/cudf/core/column/column.py
isVoid 6576af8
Use `as_device_scalar` factory function; Better handling of nelem in
isVoid 62b8552
Change `arange` type annotation
isVoid 6667be2
Revert to scalar constructor.
isVoid cdbabc4
use `scalar.isvalid`
isVoid 6cb2992
Add comment
isVoid 6f092d6
Apply suggestions from code review
isVoid b5c2db1
Apply suggestions from code review
isVoid e6b2833
Merge branch 'branch-22.04' of github.com:rapidsai/cudf into improvem…
isVoid 77e6693
Merge branch 'improvement/column_setitem_refactor' of github.com:isVo…
isVoid 5d5714e
update boolean mask scatter docstring
isVoid a111f7d
style
isVoid 2d3486f
Addressing multiple reviews
isVoid d5d209c
Merge branch 'branch-22.04' of github.com:rapidsai/cudf into improvem…
isVoid 1754580
simple things to get ci unblocked
isVoid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think this docstring could be clearer. I had to read a few levels of the C++ source to really understand what this was doing. Is this suggestion accurate?
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.
Yes, I know how confusing this is. Everything in here is accurate. However I would like to add to this to highlight that the
input_
columns need not to have the same number of rows as the target columns. Instead, they should have the same number of rows to the number oftrue
s in the boolean mask. As an example, it's totally valid to have:Which is something pretty subtle from my point of view.
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.
How about:
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.
Yeah, that edit seems fine. It's super weird behavior to explain...
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.
I'd like to coordinate with libcudf's team to revisit this API to adapt it to be less "weird". If anything - the currently behavior has hard constraint (to guarantee the API correctness) that cannot be determined without introspecting the data (# of
True
s in the boolean mask). I don't know if that violates any API design rules but certainly makes the API flaky to users.