Skip to content
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

pytest 8 has issues with pytest.warns #8238

Open
NicolasHug opened this issue Jan 29, 2024 · 0 comments · May be fixed by #8243
Open

pytest 8 has issues with pytest.warns #8238

NicolasHug opened this issue Jan 29, 2024 · 0 comments · May be fixed by #8243

Comments

@NicolasHug
Copy link
Member

NicolasHug commented Jan 29, 2024

Some of our tests that use pytest.warns started failing with pytest 8 which was released a few days ago.
I'm just opening this issue for reference and to add as a TODO.

https://github.com/pytorch/vision/actions/runs/7694476421/job/20965356912?pr=7990

2024-01-29T10:34:47.7500403Z FAILED test/test_extended_models.py::TestHandleLegacyInterface::test_pretrained_pos[True] - UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=ModelWeights.Sentinel`. You can also use `weights=ModelWeights.DEFAULT` to get the most up-to-date weights.
2024-01-29T10:34:47.7505456Z FAILED test/test_extended_models.py::TestHandleLegacyInterface::test_pretrained_pos[False] - UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=None`.
2024-01-29T10:34:47.7508764Z FAILED test/test_extended_models.py::TestHandleLegacyInterface::test_equivalent_behavior_weights[True-True] - UserWarning: Using 'weights' as positional parameter(s) is deprecated since 0.13 and may be removed in the future. Please use keyword parameter(s) instead.
2024-01-29T10:34:47.7511905Z FAILED test/test_extended_models.py::TestHandleLegacyInterface::test_equivalent_behavior_weights[True-False] - UserWarning: Using 'weights' as positional parameter(s) is deprecated since 0.13 and may be removed in the future. Please use keyword parameter(s) instead.
2024-01-29T10:34:47.7514909Z FAILED test/test_extended_models.py::TestHandleLegacyInterface::test_equivalent_behavior_weights[False-True] - UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
2024-01-29T10:34:47.7517759Z FAILED test/test_extended_models.py::TestHandleLegacyInterface::test_equivalent_behavior_weights[False-False] - UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
2024-01-29T10:34:47.7521326Z FAILED test/test_extended_models.py::TestHandleLegacyInterface::test_pretrained_deprecation[inception_v3_1] - FutureWarning: The default weight initialization of inception_v3 will be changed in future releases of torchvision. If you wish to keep the old behavior (which leads to long initialization times due to scipy/scipy#11299), please set init_weights=True.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant