-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[data] add support for multiple group keys in map_groups #40778
[data] add support for multiple group keys in map_groups #40778
Conversation
77ea576
to
71bbb60
Compare
FYI @LeonLuttenberger |
4ba55fb
to
1dd29f4
Compare
python/ray/data/grouped_data.py
Outdated
x = np.empty(1, dtype=object) | ||
x[0] = arr[start] |
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.
What's going on here? Also, could we rename x
with a more descriptive name?
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.
After constructing an array of tuples, the target value x
of the np.searchsorted
needs to be a single-element tuple ndarray. Otherwise, searchsorted
complains about the missing <
operator. Alternatively, we can add a small custom tuple class with __lt__
method instead of using built-in tuples for this PR.
@bveeramani Thanks for taking a look. I left some comments and will update the PR in a few days. |
c70ef4f
to
2a1b654
Compare
Thanks! Will take a look sometime next week |
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.
Thanks! LGTM!
Once remaining review comments get resolved and CI passes, we should be good to merge
Signed-off-by: Kit Lee <wklee4993@gmail.com>
b2376ee
to
a05b1a4
Compare
…#40778) Need to fix get_key_boundaries in order to use multiple keys in map_groups Signed-off-by: Kit Lee <wklee4993@gmail.com>
Why are these changes needed?
Need to fix get_key_boundaries in order to use multiple keys in
map_groups
Related issue number
Closes #40774
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.