Skip to content

Added graceful exit if data download errored#3096

Merged
vfdev-5 merged 2 commits intopytorch:masterfrom
vfdev-5:fix-SR-data-download-example
Oct 16, 2023
Merged

Added graceful exit if data download errored#3096
vfdev-5 merged 2 commits intopytorch:masterfrom
vfdev-5:fix-SR-data-download-example

Conversation

@vfdev-5
Copy link
Collaborator

@vfdev-5 vfdev-5 commented Oct 16, 2023

Description:

  • Added graceful exit if data download errored
  • Fixing issue:
 ===> Loading datasets
Traceback (most recent call last):
  File "examples/super_resolution/main.py", line 76, in <module>
    trainset = torchvision.datasets.Caltech101(root="./data", download=True)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/torchvision/datasets/caltech.py", line 50, in __init__
    self.download()
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/torchvision/datasets/caltech.py", line 131, in download
    download_and_extract_archive(
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/torchvision/datasets/utils.py", line 434, in download_and_extract_archive
    download_url(url, download_root, filename, md5)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/torchvision/datasets/utils.py", line 139, in download_url
    return download_file_from_google_drive(file_id, root, filename, md5)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/torchvision/datasets/utils.py", line 246, in download_file_from_google_drive
    raise RuntimeError(
RuntimeError: The daily quota of the file 101_ObjectCategories.tar.gz is exceeded and it can't be downloaded. This is a limitation of Google Drive and can only be overcome by trying again later.

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

@vfdev-5 vfdev-5 marked this pull request as ready for review October 16, 2023 21:43
@github-actions github-actions bot added the examples Examples label Oct 16, 2023
@vfdev-5 vfdev-5 force-pushed the fix-SR-data-download-example branch from 0444adb to b723523 Compare October 16, 2023 21:48
@pytorch pytorch deleted a comment from sweep-ai-deprecated bot Oct 16, 2023
@vfdev-5 vfdev-5 merged commit 624eb63 into pytorch:master Oct 16, 2023
@vfdev-5 vfdev-5 deleted the fix-SR-data-download-example branch October 16, 2023 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

examples Examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant