pytorch / pytorch/vision

voc.py to report the directory it tried in the error message

Open
#4,773 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

🐛 Describe the bug

https://github.com/pytorch/vision/blob/main/torchvision/datasets/voc.py#L113:

        if not os.path.isdir(voc_root):
            raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it")

I propose the error message should report voc_root as well, it will help debugging wrongly passed dataaset root dirs.

Versions

N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect torchvision/datasets/voc.py around line 113, where the VOC root directory check raises the error. Reproduce the missing-directory case and verify that the resulting message identifies the attempted voc_root, making an incorrectly passed dataset root easier to diagnose.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.