fix warnings in prototype transforms test suite#6785
Merged
pmeier merged 6 commits intopytorch:mainfrom Oct 18, 2022
Merged
Conversation
pmeier
commented
Oct 18, 2022
| for idx, args_kwargs in enumerate(config.args_kwargs) | ||
| ], | ||
| ) | ||
| @pytest.mark.filterwarnings("ignore") |
Contributor
Author
There was a problem hiding this comment.
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
pmeier
commented
Oct 18, 2022
| # as PIL -> numpy is always copying | ||
| return | ||
|
|
||
| inpt[0, 0, 0] = 11 |
Contributor
Author
There was a problem hiding this comment.
We can no longer test this, since the .contiguous() call will always copy.
Contributor
Author
|
CI failures are unrelated. |
facebook-github-bot
pushed a commit
that referenced
this pull request
Oct 21, 2022
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.