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

add example for v2 wrapping for custom datasets #7514

Merged
merged 2 commits into from
Apr 14, 2023

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Apr 13, 2023

Addresses #6753 (comment).

cc @praxxus11

@pytorch-bot
Copy link

pytorch-bot bot commented Apr 13, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/7514

Note: Links to docs will display an error until the docs builds have been completed.

❌ 26 Failures

As of commit 8c948d3:

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

#
# If both :class:`~torchvision.datapoints.BoundingBox`'es and :class:`~torchvision.datapoints.Mask`'s are included in
# the sample, ``torchvision.transforms.v2`` will transform them both. Meaning, if you don't need both, dropping or
# at least not wrapping the obsolete parts, can lead to a significant performance boost.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not wrapping the obsolete parts

This works due to the heuristic we have in place. I wonder if we should link to the explanation here or refrain from it to avoid confusion.

@@ -101,6 +164,7 @@
# Since for most operations involving datapoints, it cannot be safely inferred whether the result should retain the
# datapoint type, we choose to return a plain tensor instead of a datapoint (this might change, see note below):


Copy link
Collaborator Author

Choose a reason for hiding this comment

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

flake8 was complaining here. No idea why this wasn't the case before.

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Thanks Philip

@pmeier pmeier merged commit b78d98b into pytorch:main Apr 14, 2023
@github-actions
Copy link

Hey @pmeier!

You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

@pmeier pmeier deleted the wrap-custom-datasets branch April 20, 2023 11:47
facebook-github-bot pushed a commit that referenced this pull request Apr 26, 2023
Reviewed By: vmoens

Differential Revision: D45183670

fbshipit-source-id: 22d4aee4bccb08249bd041448bdaf1205c55c57c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants