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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

SBDataset downloads fails because train_noval.txt is no more available at the specified url #8471

Open
jeremyfix opened this issue Jun 6, 2024 · 3 comments

Comments

@jeremyfix
Copy link

馃悰 Describe the bug

When creating the SBDataset(.., download=True), requesting it to be downloaded, the script fails.

Downloading https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/semantic_contours/benchmark.tgz to /tmp/fix-72406/SBDataset/benchmark.tgz
100%|鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 1419539633/1419539633 [01:55<00:00, 12338089.02it/s]
Extracting /tmp/fix-72406/SBDataset/benchmark.tgz to /tmp/fix-72406/SBDataset
Downloading https://www.cs.cornell.edu/~bharathh/ to /tmp/fix-72406/SBDataset/train_noval.txt
21334it [00:00, 252128.84it/s]                 
Traceback (most recent call last):          
  File "data.py", line 322, in <module>        
    plot_samples("/tmp/fix-72406/SBDataset")   
  File "data.py", line 266, in plot_samples  
    train_valid_dataset = torchvision.datasets.SBDataset(
  File "/tmp/fix-72406/venv/lib/python3.8/site-packages/torchvision/datasets/sbd.py", line 84, in __init__
    download_url(self.voc_train_url, sbd_root, self.voc_split_filename, self.voc_split_md5)
  File "/tmp/fix-72406/venv/lib/python3.8/site-packages/torchvision/datasets/utils.py", line 143, in download_url
    raise RuntimeError("File not found or corrupted.")                                                                                              
RuntimeError: File not found or corrupted.             

The issue seems to me related to the download of the file train_noval.txt which I believe is downloaded from http://home.bharathh.info/pubs/codes/SBD/train_noval.txt as stated in https://github.com/pytorch/vision/blob/b6770a7ee198ecb3426d2dc4ffe2f88e4dc62952/torchvision/datasets/sbd.py#L49C22-L49C78 by the definition of voc_train_url

Unfortunately, following the link http://home.bharathh.info/pubs/codes/SBD/train_noval.txt , we get redirected to https://www.cs.cornell.edu/~bharathh/ .This page is downloaded instead of the expected file, hence, I believe, leading to the RuntimeError . Indeed, running the code below, I do have a train_noval.txt file downloaded but its content is the home page of B. Hariharan.

The code below allows to reproduce the error :

import torchvision

train_valid_dataset = torchvision.datasets.SBDataset( root="/tmp/", image_set="train", transforms=None, download=True)
   

Versions

Collecting environment information...
PyTorch version: 2.3.1+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

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

Python version: 3.8.10 (default, Mar 15 2022, 12:22:08) [GCC 9.4.0] (64-bit runtime)
Python platform: Linux-5.13.0-35-lowlatency-x86_64-with-glibc2.29
Is CUDA available: True
CUDA runtime version: 11.7.99
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3090
Nvidia driver version: 525.85.12
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.4.1
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture聽: x86_64
Mode(s) op茅ratoire(s) des processeurs聽: 32-bit, 64-bit
Boutisme聽: Little Endian
Address sizes: 46 bits physical, 48 bits virtual
Processeur(s)聽: 8
Liste de processeur(s) en ligne聽: 0-7
Thread(s) par c艙ur聽: 2
C艙ur(s) par socket聽: 4
Socket(s)聽: 1
N艙ud(s) NUMA聽: 1
Identifiant constructeur聽: GenuineIntel
Famille de processeur聽: 6
Mod猫le聽: 85
Nom de mod猫le聽: Intel(R) Xeon(R) W-2125 CPU @ 4.00GHz
R茅vision聽: 4
Vitesse du processeur en MHz聽: 4000.000
Vitesse maximale du processeur en MHz聽: 4500,0000
Vitesse minimale du processeur en MHz聽: 1200,0000
BogoMIPS聽: 7999.96
Virtualisation聽: VT-x
Cache L1d聽: 128 KiB
Cache L1i聽: 128 KiB
Cache L2聽: 4 MiB
Cache L3聽: 8,3 MiB
N艙ud NUMA聽0 de processeur(s)聽: 0-7
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Meltdown: Mitigation; PTI
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; Retpolines, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Mitigation; Clear CPU buffers; SMT vulnerable
Drapaux聽: 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 cdp_l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req md_clear flush_l1d arch_capabilities

Versions of relevant libraries:
[pip3] numpy==1.24.4
[pip3] torch==2.3.1
[pip3] torchinfo==1.8.0
[pip3] torchvision==0.18.1
[pip3] triton==2.3.1
[conda] Could not collect

@NicolasHug
Copy link
Member

Thanks for the report @jeremyfix , I can reproduce the issue.

You're right that it's related to the download of train_noval.txt. I'm getting a 403 Forbidden error and I'm being redirected to https://www.cs.cornell.edu/~bharathh/.

If this file can be found somewhere else, please let me know.

This specific file is only needed when image_set="train_noval", but right now it is being downloaded unconditionally. What we can do as a temporary measure is to only download it when image_set="train_noval", this way image_set="train" and image_set="val" should still work.

@jeremyfix
Copy link
Author

Thank you for the suggested PR.

In the meantime, I contacted Bharath to let him know the file was not available anymore. Apparently, he found the file and expects to put it online again pretty soon ;

I will let you know.

@jeremyfix
Copy link
Author

The train_noval.txt file has been remade available by Bharath so that the URL https://www.cs.cornell.edu/~bharathh/train_noval.txt now allows to download this file.

So the first thing we can plan to do is to replace the train_noval.txt url by https://www.cs.cornell.edu/~bharathh/train_noval.txt

Unfortunately, this is not yet the end of the story. The script now fails at L79 with download_and_extract_archive(self.url, self.root, filename=self.filename, md5=self.md5) because the URL https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/semantic_contours/benchmark.tgz leads to a 404.

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