vision icon indicating copy to clipboard operation
vision copied to clipboard

Fix warnings in the tests

Open vfdev-5 opened this issue 3 years ago • 3 comments

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

vfdev-5 avatar Jun 11 '22 09:06 vfdev-5

Can I take this issue

puhuk avatar Jun 11 '22 12:06 puhuk

@puhuk absolutely, thanks for offering to help. Looking forward to your PR.

datumbox avatar Jun 11 '22 12:06 datumbox

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!

datumbox avatar Aug 04 '22 16:08 datumbox

Hi, since this issue is now up for grabs. I would like to grab it :)

ambujpawar avatar Sep 13 '22 08:09 ambujpawar

@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 avatar Sep 16 '22 15:09 vfdev-5

@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 :)

ambujpawar avatar Sep 16 '22 16:09 ambujpawar

Shall they be solved in this issue itself?

Yes, try to fix them in this PR. Thanks

vfdev-5 avatar Sep 16 '22 16:09 vfdev-5