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

Remove model download from tests #2806

Merged
merged 5 commits into from
Nov 9, 2020
Merged

Conversation

fmassa
Copy link
Member

@fmassa fmassa commented Oct 14, 2020

They can introduce flakiness due to connection errors, and slow tests down, while not being needed for the tests that we currently have.

@fmassa fmassa requested a review from vfdev-5 October 14, 2020 10:28
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Oct 14, 2020

@fmassa I understand the issue to fix and this can help. But how about test_hub.py and test_onnx.py which also download pretrained wieghts ?

pretrained=True,

model = models.detection.faster_rcnn.fasterrcnn_resnet50_fpn(pretrained=True, min_size=200, max_size=300)

What do you think to accept failing if we catch ConnectionResetError ?

@fmassa
Copy link
Member Author

fmassa commented Oct 14, 2020

@vfdev-5 ideally they should all avoid downloading weights, and we should fix the tests for this. I've messed up with both of the tests here, I'll be fixing them in a few moments

@codecov
Copy link

codecov bot commented Oct 14, 2020

Codecov Report

Merging #2806 into master will decrease coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2806      +/-   ##
==========================================
- Coverage   73.31%   73.17%   -0.14%     
==========================================
  Files          99       99              
  Lines        8724     8728       +4     
  Branches     1373     1373              
==========================================
- Hits         6396     6387       -9     
- Misses       1909     1925      +16     
+ Partials      419      416       -3     
Impacted Files Coverage Δ
torchvision/models/detection/backbone_utils.py 95.55% <100.00%> (+1.26%) ⬆️
torchvision/models/detection/faster_rcnn.py 80.95% <100.00%> (-0.45%) ⬇️
torchvision/models/detection/keypoint_rcnn.py 88.23% <100.00%> (-0.34%) ⬇️
torchvision/models/detection/mask_rcnn.py 90.00% <100.00%> (-0.33%) ⬇️
torchvision/models/googlenet.py 75.13% <0.00%> (-7.19%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ebe3f02...3f5da41. Read the comment docs.

Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fmassa LGTM, thanks for the PR.

I've left only 1 comment to confirm that a corner-case is handled as intended. If it is, feel free to merge.

@fmassa fmassa merged commit d6bc625 into pytorch:master Nov 9, 2020
@fmassa fmassa deleted the remove-model-download branch November 9, 2020 14:03
bryant1410 pushed a commit to bryant1410/vision-1 that referenced this pull request Nov 22, 2020
* Remove model download from tests

* Refactor trainable_layers checks in detection models

* Bugfix

* Finish tests and fixes

* Fix lint
vfdev-5 pushed a commit to Quansight/vision that referenced this pull request Dec 4, 2020
* Remove model download from tests

* Refactor trainable_layers checks in detection models

* Bugfix

* Finish tests and fixes

* Fix lint
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.

4 participants