Skip to content

[BE] Move data download logic to download_data.py #2581

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

Merged
merged 3 commits into from
Oct 4, 2023

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Oct 4, 2023

  • download_url_to_file which is heavily inspired by torch/hub.py
  • size_fmt is borrowed from torch/autograd/profiler_util.py
  • Skip downloads if FILES_TO_RUN is defined, but tutorial is not in this shard, i.e.:
    • Call download_dcgan_data(which is 1Gb+ downloadable) only for dcgan_tutorial
    • Call download_lenet_mnist(downloads from rate-limited GDrive) only for fgsm_tutorial
    • Call download_hymenoptera_data only for transfer_learning_tutorial
    • Call download_nlp_data for seq2seq_translation_tutorial, char_rnn_classification_tutorial and char_rnn_generation_tutorial

Use `download_url_to_file` which is heavily inspired by https://github.com/pytorch/pytorch/blob/efb73fe8e4413a0d6db078e85c7ed7c91f05ca5d/torch/hub.py#L600
Skip slow/flaky downloads if `FILES_TO_RUN` is defined, but tutorial is not in this shard

Add dcgan_tutorial (which has a massive 1Gb downloadable) and fgsm_tutorial to list of tutorials with optinal downloadable data
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 4, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/2581

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 7d0c473 with merge base 309c889 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@malfet malfet merged commit 70a0f8c into main Oct 4, 2023
@malfet malfet deleted the malfet/be-associate-data-with-tutorials branch October 4, 2023 02:49
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.

2 participants