-
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
[Data] Fix OutputBlockBuffer
to avoid repeatedly copying remainder block
#48266
Merged
Conversation
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
alexeykudinkin
requested review from
scottjlee,
bveeramani,
raulchen,
stephanie-wang and
omatthew98
as code owners
October 25, 2024 01:09
Great find! So my understanding is that .slice here ray/python/ray/data/_internal/arrow_block.py Line 284 in 22e266a
|
pcmoritz
approved these changes
Oct 25, 2024
There are some test failure but this seems like the right fix :) |
alexeykudinkin
force-pushed
the
ak/blk-buf-arw-chnk-arr-fix
branch
from
October 25, 2024 20:35
b810d01
to
314dbba
Compare
Correct. And we'd avoid copying here as well as it's absolutely unnecessary. |
alexeykudinkin
force-pushed
the
ak/blk-buf-arw-chnk-arr-fix
branch
from
October 28, 2024 17:24
d2d43e4
to
d795904
Compare
bveeramani
reviewed
Oct 28, 2024
alexeykudinkin
force-pushed
the
ak/blk-buf-arw-chnk-arr-fix
branch
2 times, most recently
from
October 29, 2024 23:33
2037198
to
b4b407a
Compare
8 tasks
Blocked on #47040 |
aslonnie
pushed a commit
that referenced
this pull request
Nov 1, 2024
Dropping Ray Data internal support for Arrow < 9.0.0 as of Ray 2.39. This is necessary in avoiding over-compensating for issues resolved in old Arrow versions, like the ones surfacing in #48266.
Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
alexeykudinkin
force-pushed
the
ak/blk-buf-arw-chnk-arr-fix
branch
from
November 1, 2024 23:46
b4b407a
to
aade112
Compare
pcmoritz
approved these changes
Nov 2, 2024
Jay-ju
pushed a commit
to Jay-ju/ray
that referenced
this pull request
Nov 5, 2024
Dropping Ray Data internal support for Arrow < 9.0.0 as of Ray 2.39. This is necessary in avoiding over-compensating for issues resolved in old Arrow versions, like the ones surfacing in ray-project#48266.
Jay-ju
pushed a commit
to Jay-ju/ray
that referenced
this pull request
Nov 5, 2024
…block (ray-project#48266) <!-- Thank you for your contribution! Please review https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before opening a pull request. --> <!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. --> ## Why are these changes needed? Currently, inside `OutputBlockBuffer` we're 1. Repeatedly copying remainder of the original block, bringing total # of bytes copied to O(N^2) (where N is the size of the original block) 2. Creating potentially very large blocks (like in ray-project#48236) that could overflow underlying Arrow data types. This change addresses both of these issues, by establishing following protocol where 1. Finalized target blocks *are* copied, while 2. Remainder block is NOT (therefore continuing referencing original block) Addresses ray-project#48236 <!-- Please give a short summary of the change and the problem this solves. --> ## Related issue number <!-- For example: "Closes ray-project#1234" --> ## Checks - [ ] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [ ] I've run `scripts/format.sh` to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` under the corresponding `.rst` file. - [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [ ] Unit tests - [ ] Release tests - [ ] This PR is not tested :( --------- Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
JP-sDEV
pushed a commit
to JP-sDEV/ray
that referenced
this pull request
Nov 14, 2024
Dropping Ray Data internal support for Arrow < 9.0.0 as of Ray 2.39. This is necessary in avoiding over-compensating for issues resolved in old Arrow versions, like the ones surfacing in ray-project#48266. Signed-off-by: JP-sDEV <jon.pablo80@gmail.com>
JP-sDEV
pushed a commit
to JP-sDEV/ray
that referenced
this pull request
Nov 14, 2024
…block (ray-project#48266) <!-- Thank you for your contribution! Please review https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before opening a pull request. --> <!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. --> ## Why are these changes needed? Currently, inside `OutputBlockBuffer` we're 1. Repeatedly copying remainder of the original block, bringing total # of bytes copied to O(N^2) (where N is the size of the original block) 2. Creating potentially very large blocks (like in ray-project#48236) that could overflow underlying Arrow data types. This change addresses both of these issues, by establishing following protocol where 1. Finalized target blocks *are* copied, while 2. Remainder block is NOT (therefore continuing referencing original block) Addresses ray-project#48236 <!-- Please give a short summary of the change and the problem this solves. --> ## Related issue number <!-- For example: "Closes ray-project#1234" --> ## Checks - [ ] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [ ] I've run `scripts/format.sh` to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` under the corresponding `.rst` file. - [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [ ] Unit tests - [ ] Release tests - [ ] This PR is not tested :( --------- Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
mohitjain2504
pushed a commit
to mohitjain2504/ray
that referenced
this pull request
Nov 15, 2024
Dropping Ray Data internal support for Arrow < 9.0.0 as of Ray 2.39. This is necessary in avoiding over-compensating for issues resolved in old Arrow versions, like the ones surfacing in ray-project#48266. Signed-off-by: mohitjain2504 <mohit.jain@dream11.com>
mohitjain2504
pushed a commit
to mohitjain2504/ray
that referenced
this pull request
Nov 15, 2024
…block (ray-project#48266) <!-- Thank you for your contribution! Please review https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before opening a pull request. --> <!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. --> ## Why are these changes needed? Currently, inside `OutputBlockBuffer` we're 1. Repeatedly copying remainder of the original block, bringing total # of bytes copied to O(N^2) (where N is the size of the original block) 2. Creating potentially very large blocks (like in ray-project#48236) that could overflow underlying Arrow data types. This change addresses both of these issues, by establishing following protocol where 1. Finalized target blocks *are* copied, while 2. Remainder block is NOT (therefore continuing referencing original block) Addresses ray-project#48236 <!-- Please give a short summary of the change and the problem this solves. --> ## Related issue number <!-- For example: "Closes ray-project#1234" --> ## Checks - [ ] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [ ] I've run `scripts/format.sh` to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` under the corresponding `.rst` file. - [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [ ] Unit tests - [ ] Release tests - [ ] This PR is not tested :( --------- Signed-off-by: Alexey Kudinkin <ak@anyscale.com> Signed-off-by: mohitjain2504 <mohit.jain@dream11.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why are these changes needed?
Currently, inside
OutputBlockBuffer
we'reThis change addresses both of these issues, by establishing following protocol where
Addresses #48236
Related issue number
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.