Skip to content
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

PCAM dataset not matched md5sum #8274

Closed
4pygmalion opened this issue Feb 15, 2024 · 3 comments
Closed

PCAM dataset not matched md5sum #8274

4pygmalion opened this issue Feb 15, 2024 · 3 comments

Comments

@4pygmalion
Copy link

4pygmalion commented Feb 15, 2024

🐛 Describe the bug

I have tried to download a PCAM dataset from Torchvision.
I received the following error:

import torch
import torchvision
torchvision.datasets.PCAM(root='./', download=True)

standard output

/home/heon/anaconda3/envs/stain_norm/lib/python3.8/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
  from .autonotebook import tqdm as notebook_tqdm
2453it [00:00, 9969600.50it/s]
/home/heon/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/utils.py:272: UserWarning: We detected some HTML elements in the downloaded file. This most likely means that the download triggered an unhandled API response by GDrive. Please report this to torchvision at https://github.com/pytorch/vision/issues including the response:

<!DOCTYPE html><html><head><title>Google Drive - Virus scan warning</title><meta http-equiv="content-type" content="text/html; charset=utf-8"/><style nonce="fyHGcD2oF5tvWEqiCZ99Qg">.goog-link-button{position:relative;color:#15c;text-decoration:underline;cursor:pointer}.goog-link-button-disabled{color:#ccc;text-decoration:none;cursor:default}body{color:#222;font:normal 13px/1.4 arial,sans-serif;margin:0}.grecaptcha-badge{visibility:hidden}.uc-main{padding-top:50px;text-align:center}#uc-dl-icon{display:inline-block;margin-top:16px;padding-right:1em;vertical-align:top}#uc-text{display:inline-block;max-width:68ex;text-align:left}.uc-error-caption,.uc-warning-caption{color:#222;font-size:16px}#uc-download-link{text-decoration:none}.uc-name-size a{color:#15c;text-decoration:none}.uc-name-size a:visited{color:#61c;text-decoration:none}.uc-name-size a:active{color:#d14836;text-decoration:none}.uc-footer{color:#777;font-size:11px;padding-bottom:5ex;padding-top:5ex;text-align:center}.uc-footer a{color:#15c}.uc-footer a:visited{color:#61c}.uc-footer a:active{color:#d14836}.uc-footer-divider{color:#ccc;width:100%}.goog-inline-block{position:relative;display:-moz-inline-box;display:inline-block}* html .goog-inline-block{display:inline}*:first-child+html .goog-inline-block{display:inline}sentinel{}</style><link rel="icon" href="//ssl.gstatic.com/docs/doclist/images/drive_2022q3_32dp.png"/></head><body><div class="uc-main"><div id="uc-dl-icon" class="image-container"><div class="drive-sprite-aux-download-file"></div></div><div id="uc-text"><p class="uc-warning-caption">Google Drive can't scan this file for viruses.</p><p class="uc-warning-subcaption"><span class="uc-name-size"><a href="/open?id=1Ka0XfEMiwgCYPdTI-vv6eUElOBnKFKQ2">camelyonpatch_level_2_split_train_x.h5.gz</a> (6.0G)</span> is too large for Google to scan for viruses. Would you still like to download this file?</p><form id="download-form" action="https://drive.usercontent.google.com/download" method="get"><input type="submit" id="uc-download-link" class="goog-inline-block jfk-button jfk-button-action" value="Download anyway"/><input type="hidden" name="id" value="1Ka0XfEMiwgCYPdTI-vv6eUElOBnKFKQ2"><input type="hidden" name="export" value="download"><input type="hidden" name="confirm" value="t"><input type="hidden" name="uuid" value="b21da69e-6dca-42ec-8eae-ea8a4aee3220"></form></div></div><div class="uc-footer"><hr class="uc-footer-divider"></div></body></html>
  warnings.warn(

traceback

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[1], [line 3](vscode-notebook-cell:?execution_count=1&line=3)
      [1](vscode-notebook-cell:?execution_count=1&line=1) import torch
      [2](vscode-notebook-cell:?execution_count=1&line=2) import torchvision
----> [3](vscode-notebook-cell:?execution_count=1&line=3) torchvision.datasets.PCAM(root='[./](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/)', download=True)

File [~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/pcam.py:92](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/pcam.py:92), in PCAM.__init__(self, root, split, transform, target_transform, download)
     [89](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/pcam.py:89) self._base_folder = pathlib.Path(self.root) / "pcam"
     [91](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/pcam.py:91) if download:
---> [92](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/pcam.py:92)     self._download()
     [94](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/pcam.py:94) if not self._check_exists():
     [95](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/pcam.py:95)     raise RuntimeError("Dataset not found. You can use download=True to download it")

File [~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/pcam.py:129](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/pcam.py:129), in PCAM._download(self)
    [127](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/pcam.py:127) for file_name, file_id, md5 in self._FILES[self._split].values():
    [128](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/pcam.py:128)     archive_name = file_name + ".gz"
--> [129](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/pcam.py:129)     download_file_from_google_drive(file_id, str(self._base_folder), filename=archive_name, md5=md5)
    [130](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/pcam.py:130)     _decompress(str(self._base_folder / archive_name))

File [~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/utils.py:280](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/utils.py:280), in download_file_from_google_drive(file_id, root, filename, md5)
    [272](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/utils.py:272)             warnings.warn(
    [273](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/utils.py:273)                 f"We detected some HTML elements in the downloaded file. "
    [274](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/utils.py:274)                 f"This most likely means that the download triggered an unhandled API response by GDrive. "
    [275](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/utils.py:275)                 f"Please report this to torchvision at https://github.com/pytorch/vision/issues including "
...
    [282](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/utils.py:282)         f"Please delete the file and try again. "
    [283](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/utils.py:283)         f"If the issue persists, please report this to torchvision at https://github.com/pytorch/vision/issues."
    [284](https://vscode-remote+ssh-002dremote-002beosin.vscode-resource.vscode-cdn.net/home/heon/repositories/SeeDP-model-trainer/~/anaconda3/envs/stain_norm/lib/python3.8/site-packages/torchvision/datasets/utils.py:284)     )

RuntimeError: The MD5 checksum of the download file pcam/camelyonpatch_level_2_split_train_x.h5.gz does not match the one on record.Please delete the file and try again. If the issue persists, please report this to torchvision at https://github.com/pytorch/vision/issues.
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?36d4dbf4-719a-4800-a40d-acefb722a340) or open in a [text editor](command:workbench.action.openLargeOutput?36d4dbf4-719a-4800-a40d-acefb722a340). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

Versions

PyTorch version: 1.12.1
Is debug build: False
CUDA used to build PyTorch: 11.3
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.3 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.31

Python version: 3.8.18 (default, Sep 11 2023, 13:40:15) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.4.0-81-generic-x86_64-with-glibc2.17
Is CUDA available: True
CUDA runtime version: 11.4.120
CUDA_MODULE_LOADING set to:
GPU models and configuration:
GPU 0: NVIDIA A100 80GB PCIe
GPU 1: NVIDIA A100 80GB PCIe

Nvidia driver version: 470.57.02
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 46 bits physical, 57 bits virtual
CPU(s): 112
On-line CPU(s) list: 0-111
Thread(s) per core: 2
Core(s) per socket: 28
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 106
Model name: Intel(R) Xeon(R) Gold 6330N CPU @ 2.20GHz
Stepping: 6
Frequency boost: enabled
CPU MHz: 876.526
CPU max MHz: 2201.0000
CPU min MHz: 800.0000
BogoMIPS: 4400.00
Virtualization: VT-x
L1d cache: 2.6 MiB
L1i cache: 1.8 MiB
L2 cache: 70 MiB
L3 cache: 84 MiB
NUMA node0 CPU(s): 0-27,56-83
NUMA node1 CPU(s): 28-55,84-111
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced IBRS, IBPB conditional, RSB filling
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 invpcid_single ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid md_clear pconfig flush_l1d arch_capabilities

Versions of relevant libraries:
[pip3] numpy==1.20.3
[pip3] torch==1.12.1
[pip3] torchaudio==0.12.1
[pip3] torcheval==0.0.7
[pip3] torchvision==0.13.1
[conda] blas 1.0 mkl
[conda] cudatoolkit 11.3.1 h2bc3f7f_2
[conda] ffmpeg 4.3 hf484d3e_0 pytorch
[conda] mkl 2023.1.0 h213fc3f_46344
[conda] mkl-service 2.4.0 py38h5eee18b_1
[conda] mkl_fft 1.3.8 py38h5eee18b_0
[conda] mkl_random 1.2.4 py38hdb19cb5_0
[conda] numpy 1.20.3 pypi_0 pypi
[conda] pytorch 1.12.1 py3.8_cuda11.3_cudnn8.3.2_0 pytorch
[conda] pytorch-mutex 1.0 cuda pytorch
[conda] torchaudio 0.12.1 py38_cu113 pytorch
[conda] torcheval 0.0.7 pypi_0 pypi
[conda] torchvision 0.13.1 py38_cu113 pytorch

@4pygmalion
Copy link
Author

I found out that the URL was missing, giving a 404 error.
https://github.com/basveeling/pcam?tab=readme-ov-file

@NicolasHug
Copy link
Member

Thank you for the report @4pygmalion . This is the same issue as in #8204 (comment) so I'll close this one. Please see my message there for the recommended temporary fix and the future plan. Thank you

@NicolasHug
Copy link
Member

Hi @4pygmalion , torchvision 0.17.1 is out and the download util should now be fixed. For it to work, you'll need to pip install gdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants