[DataLoader2] Change graph traverse default option to only_datapipe=True#85654
Closed
ejguan wants to merge 1 commit intopytorch:masterfrom
Closed
[DataLoader2] Change graph traverse default option to only_datapipe=True#85654ejguan wants to merge 1 commit intopytorch:masterfrom
ejguan wants to merge 1 commit intopytorch:masterfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/85654
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 51d2ab1: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Contributor
|
@ejguan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
Author
|
Closing this PR by adopting #85667 |
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.
Changes the default behavior of
torch.utils.data.traversefunction fromonly_datapipe=Falsetoonly_datapipe=True.I am introducing this BC-breaking change for the following reasons:
only_datapipeand use it asonly_datapipe=True. Keeping a default value asFalsemakes the deprecation cycle even longer.DataLoader2graph. SinceDataLoader2is in prototype phase, any BC-breaking change is allowed. And, we do add a deprecation warning for removing theonly_datapipeoption.forksfrom torchdata or pytorch.BC-breaking Note:
This PR changes the default option of
torch.utils.data.traversefunction toonly_datapipe=True. When it traverses the DataPipe, it would skip all non-collection objects. This would reduce the traversing complexity and reduce the chance that traverse non-picklable objects.