-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[Datasets] Convert between block and batch correctly for map_groups #30172
Conversation
Signed-off-by: Cheng Su <[email protected]>
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.
LGTM!
builder.add_block(applied) | ||
group_block = block_accessor.slice(start, end) | ||
group_block_accessor = BlockAccessor.for_block(group_block) | ||
group_batch = group_block_accessor.to_batch_format(batch_format) |
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.
Briefly comment there is batch -> block -> batch trip needed here?
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.
@jianoaix - sounds good, added.
Signed-off-by: Cheng Su <[email protected]>
thanks for the quick fix ! This can make one of our cv user's AIR onboarding UX much cleaner. |
…ay-project#30172) This is to fix issue found in ray-project#30102, where user can do ds.groupby("key").map_groups(fn, batch_format="numpy"). We need to correctly convert between block and batch in map_groups to handle it. Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: Cheng Su [email protected]
Why are these changes needed?
This is to fix issue found in #30102, where user can do ds.groupby("key").map_groups(fn, batch_format="numpy"). We need to correctly convert between block and batch in map_groups to handle it.
Related issue number
Closes #30102
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.