-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Allow catch-all 'others' key in fill dicts. Avoid need for defaultdict. #7779
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/7779
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New FailuresAs of commit e19cf4a: NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
else: | ||
return {"others": _convert_fill_arg(fill)} |
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.
Not obvious from the diff but this line simply replaces the previous
return _get_defaultdict(_convert_fill_arg(fill))
This is the most important part of this diff, along with the new calls to _get_fill()
defined below.
from torchvision.transforms.v2.utils import is_simple_tensor | ||
|
||
|
||
T = TypeVar("T") |
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.
These are prototype transforms that rely on _get_defaultdict()
for another parameter. I couldn't be bothered to update them so I just ported the code here.
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.
LGTM if CI is green. Thanks Nicolas!
Hey @NicolasHug! 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 |
…efaultdict. (#7779) Reviewed By: matteobettini Differential Revision: D48642294 fbshipit-source-id: 2a19dd8647bd66f0449ad196b2bf0723862d95db
Closes #7765
cc @vfdev-5