-
Notifications
You must be signed in to change notification settings - Fork 7.1k
add end-to-end example gallery for transforms v2 #7302
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass, looks good so far
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks Philip!
I have a bunch of minor comments below but nothing critical. I'll approve to unblock any follow-up, feel free to merge whenever
…o transforms-e2e
This reverts commit 389103f.
For some reason the xref from the gallery to the documentation of our transforms is not working. They all link to https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module. However, the documentation of the transforms itself correctly recognizes that it is used in the gallery: https://output.circle-artifacts.com/output/job/0cdbff79-79ad-4cfb-ad68-03bf3d844bbb/artifacts/0/docs/generated/torchvision.transforms.v2.RandomHorizontalFlip.html#torchvision.transforms.v2.RandomHorizontalFlip Unfortunately, the v1 transform also claims to be used in the same gallery: https://output.circle-artifacts.com/output/job/0cdbff79-79ad-4cfb-ad68-03bf3d844bbb/artifacts/0/docs/generated/torchvision.transforms.RandomHorizontalFlip.html#torchvision.transforms.RandomHorizontalFlip |
That seems to be an existing problem, I observe the same for e.g. https://pytorch.org/vision/main/auto_examples/plot_transforms.html#sphx-glr-auto-examples-plot-transforms-py. Do you want to open an issue so we can keep track of this? |
See #7307. |
@@ -0,0 +1,152 @@ | |||
""" | |||
================================================== | |||
transforms v2: End-to-end object detection example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being late for the review.
- transforms v2: End-to-end object detection example
+ Transforms v2: End-to-end object detection example
import torchvision | ||
|
||
|
||
# sphinx_gallery_thumbnail_number = -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary ? Looks a bit weird once rendered: https://output.circle-artifacts.com/output/job/a6035cf7-ba73-4f96-b92e-1b2aa5b18cfc/artifacts/0/docs/auto_examples/plot_transforms_v2_e2e.html#sphx-glr-auto-examples-plot-transforms-v2-e2e-py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remembered that there is an option to hide these kind of comments: https://sphinx-gallery.github.io/stable/configuration.html#removing-config-comments Will send a PR
Co-authored-by: Nicolas Hug <[email protected]>
Summary: Co-authored-by: Nicolas Hug <[email protected]> Reviewed By: vmoens Differential Revision: D44416601 fbshipit-source-id: b8c4e00edc0a461f8bb191ed6aebca7918bc975e
cc @vfdev-5 @bjuncek