vision
vision copied to clipboard
FashionMNIST Download issue
🐛 Bug
Unable to download MNIST Dataset as per pytorch Documentation
https://pytorch.org/tutorials/beginner/basics/quickstart_tutorial.html
To Reproduce
import torch
from torch import nn
from torch.utils.data import DataLoader
from torchvision import datasets
from torchvision.transforms import ToTensor, Lambda, Compose
import matplotlib.pyplot as plt
training_data = datasets.FashionMNIST(
root="data",
train=True,
download=True,
transform=ToTensor(),
)
Error message is below
Downloading http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-images-idx3-ubyte.gz
Failed to download (trying next):
<urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>
RuntimeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_8408/1648373759.py in <module>
6 import matplotlib.pyplot as plt
7
----> 8 training_data = datasets.FashionMNIST(
9 root="data",
10 train=True,
G:\ineuronai\o\envs\odtf\lib\site-packages\torchvision\datasets\mnist.py in __init__(self, root, train, transform, target_transform, download)
83
84 if download:
---> 85 self.download()
86
87 if not self._check_exists():
G:\ineuronai\o\envs\odtf\lib\site-packages\torchvision\datasets\mnist.py in download(self)
167 break
168 else:
--> 169 raise RuntimeError("Error downloading {}".format(filename))
170
171 # process and save as torch files
RuntimeError: Error downloading train-images-idx3-ubyte.gz
Expected behavior
- Downloading http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-images-idx3-ubyte.gz to
data/FashionMNIST/raw/train-images-idx3-ubyte.gz - Extracting
data/FashionMNIST/raw/train-images-idx3-ubyte.gztodata/FashionMNIST/raw
cc @fmassa @vfdev-5 @pmeier @brianjo @mruberry
@fmassa -- maybe a transient networking issue?
Should this be moved to the torchvision repo?
Hey @harishsdev, I'm unable to reproduce this locally. Our download tests also succeeded today. Maybe it was just a fluke? Could you retry if it works for you now?
@harishsdev Running this on colab seems to succeed without issues. Is this the same for you?
https://colab.research.google.com/github/pytorch/tutorials/blob/gh-pages/_downloads/c30c1dcf2bc20119bcda7e734ce0eb42/quickstart_tutorial.ipynb.
If it is, I would suspect a local issue.
- Running this on colab seems to succeed without issues.
https://colab.research.google.com/github/pytorch/tutorials/blob/gh-pages/_downloads/c30c1dcf2bc20119bcda7e734ce0eb42/quickstart_tutorial.ipynb
- Then create and download the .zip file from the colab.
# First, create a zip file:
!zip -r /content/file.zip /content/data
# Then, downlod that zip file:
from google.colab import files
files.download("/content/file.zip")
I also had it fail to download. Oddly enough, it never showed an error which made me think it was some issue with the kernel. I restarted it and it failed again (again with no error). I watched the network and there didn't seem to be any activity. I then enabled debugging and it started working. While the prior details don't sound like it, I suspect a temp network issue, but plan on keeping an eye out better for it.