[Data] Add iter_rows to DatasetIterator - #33180
Merged
amogkam merged 4 commits intoMar 11, 2023
Merged
Conversation
amogkam
requested review from
c21,
clarkzinzow,
ericl,
jianoaix,
jjyao and
scv119
as code owners
March 9, 2023 22:24
session.get_dataset_shard user warnings in HuggingfaceTraineriter_rows to DatasetIterator
bveeramani
reviewed
Mar 10, 2023
jianoaix
reviewed
Mar 10, 2023
| # During row-based ops, we also choose a batch format that lines up with the | ||
| # current dataset format in order to eliminate unnecessary copies and type | ||
| # conversions. | ||
| ctx = DatasetContext.get_current() |
Contributor
There was a problem hiding this comment.
This part is duplicating code of Dataset.iter_rows(). Should we just call it or make Dataset.iter_rows() call this one?
Contributor
Author
There was a problem hiding this comment.
This PR already changes it so that dataset.iter_rows() calls into this: https://github.com/ray-project/ray/pull/33180/files#diff-5a812d24fc3efd599284bb40dcbd2c6627bbe324e1c89a6e623b4dccf8e5de44R2858
Following the same patter we do for iter_batches
jianoaix
approved these changes
Mar 11, 2023
7 tasks
ericl
pushed a commit
that referenced
this pull request
Mar 14, 2023
This is to fix CI test failure introduced in #33180 ([example of buildkite failure](https://buildkite.com/ray-project/oss-ci-build-branch/builds/2690#0186da0a-17c7-40dd-a43c-1de36c4894f4)). We need to add `iter_rows()` method for StreamSplitDatasetIterator as well. <img width="1848" alt="Screen Shot 2023-03-13 at 11 24 05 AM" src="https://user-images.githubusercontent.com/4629931/224795253-ecf4e362-4253-4d60-80ff-f87e138ef773.png">
ProjectsByJackHe
pushed a commit
to ProjectsByJackHe/ray
that referenced
this pull request
Mar 21, 2023
The iter_rows API that HuggingfaceTrainer uses internally is not available in DatasetIterator, which falls back to the base dataset and outputs User warnings about the change to DatasetIterator. This PR adds an iter_rows API to DatasetIterator so we don't fallback to the base dataset. --------- Signed-off-by: amogkam <amogkamsetty@yahoo.com> Signed-off-by: Jack He <jackhe2345@gmail.com>
ProjectsByJackHe
pushed a commit
to ProjectsByJackHe/ray
that referenced
this pull request
Mar 21, 2023
…ect#33257) This is to fix CI test failure introduced in ray-project#33180 ([example of buildkite failure](https://buildkite.com/ray-project/oss-ci-build-branch/builds/2690#0186da0a-17c7-40dd-a43c-1de36c4894f4)). We need to add `iter_rows()` method for StreamSplitDatasetIterator as well. <img width="1848" alt="Screen Shot 2023-03-13 at 11 24 05 AM" src="https://user-images.githubusercontent.com/4629931/224795253-ecf4e362-4253-4d60-80ff-f87e138ef773.png"> Signed-off-by: Jack He <jackhe2345@gmail.com>
edoakes
pushed a commit
to edoakes/ray
that referenced
this pull request
Mar 22, 2023
The iter_rows API that HuggingfaceTrainer uses internally is not available in DatasetIterator, which falls back to the base dataset and outputs User warnings about the change to DatasetIterator. This PR adds an iter_rows API to DatasetIterator so we don't fallback to the base dataset. --------- Signed-off-by: amogkam <amogkamsetty@yahoo.com> Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
edoakes
pushed a commit
to edoakes/ray
that referenced
this pull request
Mar 22, 2023
…ect#33257) This is to fix CI test failure introduced in ray-project#33180 ([example of buildkite failure](https://buildkite.com/ray-project/oss-ci-build-branch/builds/2690#0186da0a-17c7-40dd-a43c-1de36c4894f4)). We need to add `iter_rows()` method for StreamSplitDatasetIterator as well. <img width="1848" alt="Screen Shot 2023-03-13 at 11 24 05 AM" src="https://user-images.githubusercontent.com/4629931/224795253-ecf4e362-4253-4d60-80ff-f87e138ef773.png"> Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
peytondmurray
pushed a commit
to peytondmurray/ray
that referenced
this pull request
Mar 22, 2023
The iter_rows API that HuggingfaceTrainer uses internally is not available in DatasetIterator, which falls back to the base dataset and outputs User warnings about the change to DatasetIterator. This PR adds an iter_rows API to DatasetIterator so we don't fallback to the base dataset. --------- Signed-off-by: amogkam <amogkamsetty@yahoo.com>
peytondmurray
pushed a commit
to peytondmurray/ray
that referenced
this pull request
Mar 22, 2023
…ect#33257) This is to fix CI test failure introduced in ray-project#33180 ([example of buildkite failure](https://buildkite.com/ray-project/oss-ci-build-branch/builds/2690#0186da0a-17c7-40dd-a43c-1de36c4894f4)). We need to add `iter_rows()` method for StreamSplitDatasetIterator as well. <img width="1848" alt="Screen Shot 2023-03-13 at 11 24 05 AM" src="https://user-images.githubusercontent.com/4629931/224795253-ecf4e362-4253-4d60-80ff-f87e138ef773.png">
elliottower
pushed a commit
to elliottower/ray
that referenced
this pull request
Apr 22, 2023
The iter_rows API that HuggingfaceTrainer uses internally is not available in DatasetIterator, which falls back to the base dataset and outputs User warnings about the change to DatasetIterator. This PR adds an iter_rows API to DatasetIterator so we don't fallback to the base dataset. --------- Signed-off-by: amogkam <amogkamsetty@yahoo.com> Signed-off-by: elliottower <elliot@elliottower.com>
elliottower
pushed a commit
to elliottower/ray
that referenced
this pull request
Apr 22, 2023
…ect#33257) This is to fix CI test failure introduced in ray-project#33180 ([example of buildkite failure](https://buildkite.com/ray-project/oss-ci-build-branch/builds/2690#0186da0a-17c7-40dd-a43c-1de36c4894f4)). We need to add `iter_rows()` method for StreamSplitDatasetIterator as well. <img width="1848" alt="Screen Shot 2023-03-13 at 11 24 05 AM" src="https://user-images.githubusercontent.com/4629931/224795253-ecf4e362-4253-4d60-80ff-f87e138ef773.png"> Signed-off-by: elliottower <elliot@elliottower.com>
ProjectsByJackHe
pushed a commit
to ProjectsByJackHe/ray
that referenced
this pull request
May 4, 2023
The iter_rows API that HuggingfaceTrainer uses internally is not available in DatasetIterator, which falls back to the base dataset and outputs User warnings about the change to DatasetIterator. This PR adds an iter_rows API to DatasetIterator so we don't fallback to the base dataset. --------- Signed-off-by: amogkam <amogkamsetty@yahoo.com> Signed-off-by: Jack He <jackhe2345@gmail.com>
ProjectsByJackHe
pushed a commit
to ProjectsByJackHe/ray
that referenced
this pull request
May 4, 2023
…ect#33257) This is to fix CI test failure introduced in ray-project#33180 ([example of buildkite failure](https://buildkite.com/ray-project/oss-ci-build-branch/builds/2690#0186da0a-17c7-40dd-a43c-1de36c4894f4)). We need to add `iter_rows()` method for StreamSplitDatasetIterator as well. <img width="1848" alt="Screen Shot 2023-03-13 at 11 24 05 AM" src="https://user-images.githubusercontent.com/4629931/224795253-ecf4e362-4253-4d60-80ff-f87e138ef773.png"> Signed-off-by: Jack He <jackhe2345@gmail.com>
This file contains hidden or 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
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.
The
iter_rowsAPI that HuggingfaceTrainer uses internally is not available inDatasetIterator, which falls back to the base dataset and outputs User warnings about the change toDatasetIterator.This PR adds an
iter_rowsAPI toDatasetIteratorso we don't fallback to the base dataset.Why are these changes needed?
Related issue number
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.