tristandeleu / pytorch-meta

A collection of extensions and data-loaders for few-shot learning & meta-learning in PyTorch
https://tristandeleu.github.io/pytorch-meta/
MIT License
1.97k stars 256 forks source link

MiniImagenet downloading issue #134

Closed Ingvar-Y closed 2 years ago

Ingvar-Y commented 3 years ago

I tried to download MiniImagenet dataset and got the following error which I didn't get a few days ago. Is there a problem with source?

File "/usr/local/lib/python3.7/dist-packages/torchmeta/datasets/miniimagenet.py", line 90, in __init__
    download=download)
  File "/usr/local/lib/python3.7/dist-packages/torchmeta/datasets/miniimagenet.py", line 125, in __init__
    self.download()
  File "/usr/local/lib/python3.7/dist-packages/torchmeta/datasets/miniimagenet.py", line 178, in download
    with tarfile.open(filename, 'r') as f:
  File "/usr/lib/python3.7/tarfile.py", line 1580, in open
    raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully
Ingvar-Y commented 3 years ago

Ugh, probably a duplicate of #54

tristandeleu commented 3 years ago

That's right, unfortunately since MiniImagenet (and TieredImagenet) are on a Google Drive, it is frequently denied due to exceeded quotas.

To avoid this kind of (random) issue, one solution is to download the dataset manually, and then copying the archive to the root folder (under the miniimagenet folder inside root).