Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Catch URLError #237

Merged
merged 7 commits into from
Apr 22, 2021
Merged

Catch URLError #237

merged 7 commits into from
Apr 22, 2021

Conversation

ethanwharris
Copy link
Collaborator

@ethanwharris ethanwharris commented Apr 22, 2021

What does this PR do?

Fixes #155

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • [NA] Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link

codecov bot commented Apr 22, 2021

Codecov Report

Merging #237 (b5feb42) into master (1f9e151) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #237      +/-   ##
==========================================
+ Coverage   86.90%   86.95%   +0.05%     
==========================================
  Files          58       58              
  Lines        3055     3067      +12     
==========================================
+ Hits         2655     2667      +12     
  Misses        400      400              
Flag Coverage Δ
unittests 86.95% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
flash/vision/detection/model.py 73.23% <ø> (ø)
flash/vision/backbones.py 82.55% <100.00%> (+2.82%) ⬆️

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 1f9e151...b5feb42. Read the comment docs.

@ethanwharris ethanwharris added the bug / fix Something isn't working label Apr 22, 2021
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

LGTM !

CHANGELOG.md Outdated Show resolved Hide resolved
@ethanwharris ethanwharris enabled auto-merge (squash) April 22, 2021 12:14
@carmocca carmocca disabled auto-merge April 22, 2021 12:17
Comment on lines 62 to 67
result = fn(*args, pretrained=False, **kwargs)
rank_zero_warn(
"Failed to download pretrained weights for the selected backbone. The backbone has been created with"
" `pretrained=False` instead. If you are loading from a local checkpoint, this warning can be safely"
" ignored.", UserWarning
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Changed the order so if the fn call fails too, the warning is still shown

Suggested change
result = fn(*args, pretrained=False, **kwargs)
rank_zero_warn(
"Failed to download pretrained weights for the selected backbone. The backbone has been created with"
" `pretrained=False` instead. If you are loading from a local checkpoint, this warning can be safely"
" ignored.", UserWarning
)
rank_zero_warn(
"Failed to download pretrained weights for the selected backbone. The backbone has been created with"
" `pretrained=False` instead. If you are loading from a local checkpoint, this warning can be safely"
" ignored.", UserWarning
)
result = fn(*args, pretrained=False, **kwargs)

Copy link
Collaborator Author

@ethanwharris ethanwharris Apr 22, 2021

Choose a reason for hiding this comment

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

Not sure we want this. If it fails with pretrained=False then the warning is no longer true when it says "the backbone has been created"?

@tchaton tchaton merged commit c28a22e into master Apr 22, 2021
@tchaton tchaton deleted the fix/urlerror branch April 22, 2021 15:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug / fix Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flash Requires Internet to Load a Local Checkpoint
5 participants