-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Added wrap_dataset_for_transforms_v2 into datasets and handled beta w… #7279
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
Added wrap_dataset_for_transforms_v2 into datasets and handled beta w… #7279
Conversation
test/test_v2_dataset_warnings.py
Outdated
setattr(torchvision, "_WARN_ABOUT_BETA_TRANSFORMS", value) | ||
|
||
|
||
def test_no_warns_if_imported_from_datasets(): |
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 test is failing, but I'd suggest removing both tests.
They can interfere with the import and warnings in ways that we may not predict properly, and this may lead to surprising or undesired behaviour (like masking a warning it shouldn't mask).
I agree we should test this, it can be done with a strategy similar to the one proposed in #7269, but we should probably leave that for next week
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.
Just a few comments on the tests. Module level __getattr__
for the import looks fine to me to resolve the circular dependency.
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.
Thanks a lot for the PR @vfdev-5 . Some minor comment but the behaviour LGTM. We should also remove wrap_dataset_for_transforms_v2
from datapoints.__init__.py
before merging
ab715dc
to
24fd7d6
Compare
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 is CI is green. Thanks Victor!
Co-authored-by: Nicolas Hug <[email protected]>
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.
Thanks a lot @vfdev-5 , still LGTM!
Hey @vfdev-5! 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 |
…ed beta w… (#7279) Summary: Co-authored-by: Nicolas Hug <[email protected]> Reviewed By: vmoens Differential Revision: D44416626 fbshipit-source-id: 44e576c380d9003ec480bb89e599e5e1dcb704f7
Description:
Usage:
cc @bjuncek @pmeier