Skip to content

Conversation

@pmeier
Copy link
Contributor

@pmeier pmeier commented Oct 18, 2022

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:

@pytest.mark.filterwarnings("error")
class TestCommon:

This would prevent warnings from creeping in.

for idx, args_kwargs in enumerate(config.args_kwargs)
],
)
@pytest.mark.filterwarnings("ignore")
Copy link
Contributor Author

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.

# as PIL -> numpy is always copying
return

inpt[0, 0, 0] = 11
Copy link
Contributor Author

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.

Copy link
Contributor

@vfdev-5 vfdev-5 left a 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.

@pmeier
Copy link
Contributor Author

pmeier commented Oct 18, 2022

CI failures are unrelated.

@pmeier pmeier merged commit 32757a2 into pytorch:main Oct 18, 2022
@pmeier pmeier deleted the prototype-test-warnings branch October 18, 2022 14:52
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants