Skip to content

[DataLoader2] Handle MapDataPipe by converting to IterDataPipe internally by default#1146

Closed
NivekT wants to merge 1 commit intogh/NivekT/123/basefrom
gh/NivekT/123/head
Closed

[DataLoader2] Handle MapDataPipe by converting to IterDataPipe internally by default#1146
NivekT wants to merge 1 commit intogh/NivekT/123/basefrom
gh/NivekT/123/head

Conversation

@NivekT
Copy link
Contributor

@NivekT NivekT commented May 1, 2023

Stack from ghstack:

Fixes #1143

I believe since DataLoader2 would always call iter(map_data_pipe) at some point anyway, it should make no different to perform the conversion with to_iter_datapipe() within __init__.

This will also allow prefetchers to be attached to the DataPipe.

Please let me know if this may be BC-breaking.

Differential Revision: D45452068

NivekT added a commit that referenced this pull request May 1, 2023
…ally by default

ghstack-source-id: f863da4
Pull Request resolved: #1146
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 1, 2023
@NivekT
Copy link
Contributor Author

NivekT commented May 1, 2023

@ejguan Let me know what you think of this.

@NivekT NivekT requested a review from ejguan May 1, 2023 18:30
@NivekT NivekT changed the title [DataLoader2] Handle MapDataPipe by converting to IterDataPipe internally by default [DataLoader2] Handle MapDataPipe by converting to IterDataPipe internally by default May 1, 2023
Copy link
Contributor

@ejguan ejguan left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

@NivekT
Copy link
Contributor Author

NivekT commented May 1, 2023

@NivekT has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@NivekT merged this pull request in 85d54a5.

@facebook-github-bot facebook-github-bot deleted the gh/NivekT/123/head branch May 5, 2023 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants