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

Error when download=True #8668

Closed
Navoditamathur opened this issue Oct 2, 2024 · 1 comment
Closed

Error when download=True #8668

Navoditamathur opened this issue Oct 2, 2024 · 1 comment

Comments

@Navoditamathur
Copy link

🚀 The feature

Proposed Solution:
I propose adding an interactive confirmation prompt when the dataset directory already exists. Instead of raising an error, the library would prompt the user with:

The dataset directory already exists. Do you want to replace it? (Y/N):
If the user inputs "Y", the existing dataset would be replaced with a fresh download.
If the user inputs "N", the download would be skipped, and the existing dataset would remain untouched, allowing the process to continue without errors.

Motivation, pitch

Current Issue:
When using torchvision.datasets with download=True, if the dataset directory already exists, an error is raised, and the process is halted. This behavior can be disruptive, especially when users may want the option to redownload or replace the existing dataset.

Benefits:
Improved User Control: Users can decide whether they want to redownload the dataset or keep the existing one without experiencing an unexpected error.
Streamlined Workflow: This feature would eliminate the need for users to manually delete the existing dataset directory to avoid errors, simplifying the workflow.
Error Prevention: By preventing abrupt failures, this feature would improve the robustness of code that relies on torchvision.datasets for data handling.

Alternatives

No response

Additional context

No response

@NicolasHug
Copy link
Member

Hi @Navoditamathur ,

I removed the error behavior in #8681. Hopefully that means we can close this issue, let me know if I'm missing something.

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