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] Remove legacy iteration code path #40013

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

bveeramani
Copy link
Member

@bveeramani bveeramani commented Oct 2, 2023

Why are these changes needed?

We changed our iteration implementation in Ray 2.4. To use the old implementation, we exposed a use_legacy_iter_batches option. Since it's been several releases since the change, this PR removes the legacy code path and corresponding option.

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 <balaji@anyscale.com>
@@ -3975,9 +3973,7 @@ def to_tf(
prefetch_batches: The number of batches to fetch ahead of the current batch
to fetch. If set to greater than 0, a separate threadpool is used
to fetch the objects to the local node, format the batches, and apply
the collate_fn. Defaults to 1. You can revert back to the old
prefetching behavior that uses `prefetch_blocks` by setting
`use_legacy_iter_batches` to True in the :class:`~ray.data.DataContext`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Also remove the deprecated prefetch_blocks args from all these methods, and the ones in DataIterator

Copy link
Member Author

Choose a reason for hiding this comment

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

DatasetPipeline has methods that depend on prefetch_blocks. To minimize code conflicts, I'm planning on sequencing the deprecations like this:

  1. Remove legacy iteration code path
  2. Remove DatasetPipeline
  3. Remove prefetch_blocks

@bveeramani bveeramani merged commit b7648f9 into ray-project:master Oct 4, 2023
43 of 48 checks passed
@bveeramani bveeramani deleted the iter-batches-cleanup branch October 4, 2023 21:28
Zandew pushed a commit to Zandew/ray that referenced this pull request Oct 10, 2023
We changed our iteration implementation in Ray 2.4. To use the old implementation, we exposed a use_legacy_iter_batches option. Since it's been several releases since the change, this PR removes the legacy code path and corresponding option.

Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
vymao pushed a commit to vymao/ray that referenced this pull request Oct 11, 2023
We changed our iteration implementation in Ray 2.4. To use the old implementation, we exposed a use_legacy_iter_batches option. Since it's been several releases since the change, this PR removes the legacy code path and corresponding option.

Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Victor <vctr.y.m@example.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants