From f7f128f7e140f528fd61c3f02f7e34cca2e55037 Mon Sep 17 00:00:00 2001 From: Shangdi Yu Date: Wed, 10 Jun 2026 20:20:23 +0000 Subject: [PATCH] Fix dead LeNet/MNIST download for fgsm_tutorial The Google Drive link for the fgsm_tutorial LeNet/MNIST checkpoint started returning HTTP 404, which broke `make download` on any build shard that runs fgsm_tutorial. Use a refreshed Google Drive link as the primary source and a public S3 mirror (s3://pytorch-tutorial-assets/lenet_mnist_model_v2.pth) as a fallback so the download survives future Drive link rot. Co-Authored-By: Claude Opus 4.8 (1M context) --- .jenkins/download_data.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.jenkins/download_data.py b/.jenkins/download_data.py index 939e63fc7a8..90c147aa763 100644 --- a/.jenkins/download_data.py +++ b/.jenkins/download_data.py @@ -99,11 +99,21 @@ def download_dcgan_data() -> None: def download_lenet_mnist() -> None: # Download model for beginner_source/fgsm_tutorial.py - download_url_to_file("https://docs.google.com/uc?export=download&id=1HJV2nUHJqclXQ8flKvcWmjZ-OU5DGatl", - prefix=BEGINNER_DATA_DIR, - dst="lenet_mnist_model.pth", - sha256="cb5f8e578aef96d5c1a2cc5695e1aa9bbf4d0fe00d25760eeebaaac6ebc2edcb", - ) + sha256 = "c042f14781771cb6c58c833e9752fe89544d12c0649d0f2fc53f00a4ef09229c" + try: + download_url_to_file("https://drive.google.com/uc?export=download&id=1aTeORNI4Ja5GvBo3Ip0eNjUQFvlmPBgg", + prefix=BEGINNER_DATA_DIR, + dst="lenet_mnist_model.pth", + sha256=sha256, + ) + except Exception as e: + # Drive links can rot or rate-limit; fall back to the S3 mirror. + print(f"Drive download failed ({e}); falling back to S3 mirror") + download_url_to_file("https://s3.amazonaws.com/pytorch-tutorial-assets/lenet_mnist_model_v2.pth", + prefix=BEGINNER_DATA_DIR, + dst="lenet_mnist_model.pth", + sha256=sha256, + ) def download_gpu_quantization_torchao() -> None: # Download SAM model checkpoint unstable_source/gpu_quantization_torchao_tutorial.py