Fix warnings in the tests
Currently, there are following warnings when running tests:
test/test_models.py::test_quantized_classification_model[googlenet]
/root/project/torchvision/models/googlenet.py:47: FutureWarning: The default weight initialization of GoogleNet 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.
warnings.warn(
test/test_models.py::test_quantized_classification_model[inception_v3]
/root/project/torchvision/models/inception.py:43: 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.
warnings.warn(
test/test_datasets.py::VOCDetectionTestCase::test_transforms
/root/project/torchvision/datasets/voc.py:82: UserWarning: Accessing the test image set of the year 2007 with year='2007-test' is deprecated since 0.12 and will be removed in 0.14. Please use the combination year='2007' and image_set='test' instead.
warnings.warn(
Source: https://app.circleci.com/pipelines/github/pytorch/vision/18272/workflows/46f9c352-ff53-4d87-a894-b124e49d0773/jobs/1478749
Let's fix these tests such that warnings are not shown anymore.
cc @pmeier
Can I take this issue
@puhuk absolutely, thanks for offering to help. Looking forward to your PR.
I'm putting the issue as "up for grabs" as the initial PR hasn't been completed.
@puhuk If you have availability and want to complete it let me know. Thanks!
Hi, since this issue is now up for grabs. I would like to grab it :)
@ambujpawar if you check warning summary I think there are still related warnings to be fixed: https://app.circleci.com/pipelines/github/pytorch/vision/20240/workflows/ee5560a9-deb4-4e7b-9af7-9d0488d3e761/jobs/1646058?invite=true#step-108-3024
@vfdev-5 did you mean these?
test/test_models.py::test_classification_model[cpu-googlenet]
/root/project/torchvision/models/googlenet.py:178: UserWarning: Scripted GoogleNet always returns GoogleNetOutputs Tuple
warnings.warn("Scripted GoogleNet always returns GoogleNetOutputs Tuple")
test/test_models.py::test_googlenet_eval
code/__torch__/torchvision/models/googlenet.py:34: UserWarning: Scripted GoogleNet always returns GoogleNetOutputs Tuple
test/test_models.py::test_classification_model[cpu-googlenet]
code/__torch__/torchvision/models/googlenet/___torch_mangle_4274.py:40: UserWarning: Scripted GoogleNet always returns GoogleNetOutputs Tuple
test/test_models.py::test_classification_model[cpu-inception_v3]
code/__torch__/torchvision/models/inception/___torch_mangle_4278.py:41: UserWarning: Scripted Inception3 always returns Inception3 Tuple
I didn't solve those because they were not mentioned in the description of the issue. Shall they be solved in this issue itself? Or shall we create new issue for those? I'm fine with either as long as I know what to do :)
Shall they be solved in this issue itself?
Yes, try to fix them in this PR. Thanks