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

[Data] Implement accurate memory accounting for UnionOperator #50436

Merged
merged 33 commits into from
Feb 12, 2025

Conversation

bveeramani
Copy link
Member

@bveeramani bveeramani commented Feb 11, 2025

Why are these changes needed?

If an operator in the DAG doesn't implement accurate memory accounting, then the entire pipeline falls back to the legacy (worse) scheduling algorithm. To mitigate this issue, this PR implements memory accounting for UnionOperator.

In addition, this PR:

Related issue number

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: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
@bveeramani bveeramani requested a review from a team as a code owner February 11, 2025 19:44
Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
Comment on lines +34 to +35
ds2 = ray.data.from_items([{"id": 1}]).materialize()
ds3 = ray.data.from_items([{"id": 2}]).materialize()
Copy link
Member Author

Choose a reason for hiding this comment

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

Technically materialize is redundant here because from_items returns a materialzied dataset, but I left it for explictness

Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
@bveeramani bveeramani enabled auto-merge (squash) February 12, 2025 02:12
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Feb 12, 2025
Signed-off-by: Balaji Veeramani <[email protected]>
@github-actions github-actions bot disabled auto-merge February 12, 2025 07:43
@bveeramani bveeramani merged commit 1284587 into master Feb 12, 2025
5 checks passed
@bveeramani bveeramani deleted the union-fix branch February 12, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Data] Dataset.union might error if you use preserve_options
3 participants