Skip to content

Commit f7f128f

Browse files
yushangdiclaude
andcommitted
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) <noreply@anthropic.com>
1 parent 326edb0 commit f7f128f

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

‎.jenkins/download_data.py‎

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,21 @@ def download_dcgan_data() -> None:
9999

100100
def download_lenet_mnist() -> None:
101101
# Download model for beginner_source/fgsm_tutorial.py
102-
download_url_to_file("https://docs.google.com/uc?export=download&id=1HJV2nUHJqclXQ8flKvcWmjZ-OU5DGatl",
103-
prefix=BEGINNER_DATA_DIR,
104-
dst="lenet_mnist_model.pth",
105-
sha256="cb5f8e578aef96d5c1a2cc5695e1aa9bbf4d0fe00d25760eeebaaac6ebc2edcb",
106-
)
102+
sha256 = "c042f14781771cb6c58c833e9752fe89544d12c0649d0f2fc53f00a4ef09229c"
103+
try:
104+
download_url_to_file("https://drive.google.com/uc?export=download&id=1aTeORNI4Ja5GvBo3Ip0eNjUQFvlmPBgg",
105+
prefix=BEGINNER_DATA_DIR,
106+
dst="lenet_mnist_model.pth",
107+
sha256=sha256,
108+
)
109+
except Exception as e:
110+
# Drive links can rot or rate-limit; fall back to the S3 mirror.
111+
print(f"Drive download failed ({e}); falling back to S3 mirror")
112+
download_url_to_file("https://s3.amazonaws.com/pytorch-tutorial-assets/lenet_mnist_model_v2.pth",
113+
prefix=BEGINNER_DATA_DIR,
114+
dst="lenet_mnist_model.pth",
115+
sha256=sha256,
116+
)
107117

108118
def download_gpu_quantization_torchao() -> None:
109119
# Download SAM model checkpoint unstable_source/gpu_quantization_torchao_tutorial.py

0 commit comments

Comments
 (0)