-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
fix warnings in prototype transforms test suite #6785
Conversation
@@ -598,6 +599,7 @@ def check_call_consistency( | |||
for idx, args_kwargs in enumerate(config.args_kwargs) | |||
], | |||
) | |||
@pytest.mark.filterwarnings("ignore") |
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.
Since these are throw-away tests anyway, I didn't bother to write a proper warnings handling on this test. All warnings here were deprecation warnings from us, so there is nothing to do besides ignoring anyway.
torchvision/prototype/transforms/functional/_type_conversion.py
Outdated
Show resolved
Hide resolved
# as PIL -> numpy is always copying | ||
return | ||
|
||
inpt[0, 0, 0] = 11 |
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.
We can no longer test this, since the .contiguous()
call will always copy.
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.
OK for me, thanks @pmeier , I let you merge this PR once we confirmed that no more cluttering warnings in proto tests.
CI failures are unrelated. |
Summary: * fix, ignore, or assert warnings for consistency tests * fix, ignore, or assert warnings for kernel infos * fix to_image_tensor for numpy inputs * make image from numpy contiguous * fix test Reviewed By: YosuaMichael Differential Revision: D40588163 fbshipit-source-id: 39793e69a7ad5a17f69ee443a69f62b501bcc870
We have quite a few warnings in our prototype test suite: https://github.com/pytorch/vision/actions/runs/3268600734/jobs/5375203177#step:13:2309 Especially, the deprecation warnings are quite large and clutter the test summary. This PR fixes the test suite to avoid warnings.
In the future we should also check whether or not we want to put
@pytest.mark.filterwarnings("error")
onto the common tests like we do for the datasets common tests:vision/test/test_prototype_datasets_builtin.py
Lines 58 to 59 in 0610b13
This would prevent warnings from creeping in.