Improve LFW download error message with alternative manual download link (Kaggle)#9463
Improve LFW download error message with alternative manual download link (Kaggle)#9463wei06159 wants to merge 6 commits intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/9463
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New FailuresAs of commit 05d4d7f with merge base 4e58149 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
cc @NicolasHug @atalman - review request. Thanks! |
There was a problem hiding this comment.
Hi @wei06159 , thanks for the PR, happy to add a note in the docstring and in the error message that https://www.kaggle.com/datasets/jessicali9530/lfw-dataset in a common mirror, but I think it's best to keep the original link for reference - we can mention that they are broken though.
torchvision/datasets/lfw.py
Outdated
|
|
||
| base_folder = "lfw-py" | ||
| download_url_prefix = "http://vis-www.cs.umass.edu/lfw/" | ||
| download_url_prefix = "https://www.kaggle.com/datasets/jessicali9530/lfw-dataset" |
There was a problem hiding this comment.
This should probably not be changed because it changes the download URL logic, but we are still raising a valueerror on download.
There was a problem hiding this comment.
Hi @NicolasHug , thank you for your review. I put back the original link and I added a note to docstring and error message that the common mirror at https://www.kaggle.com/datasets/jessicali9530/lfw-dataset.
|
Hi @NicolasHug, could I get a review on this again? I put back the original link and added a note to docstring and error message that the common mirror is at https://www.kaggle.com/datasets/jessicali9530/lfw-dataset. |
| raise ValueError( | ||
| "LFW dataset is no longer available for download." | ||
| "LFW dataset is no longer available for automatic download." | ||
| "Please download the dataset manually and place it in the specified directory" |
There was a problem hiding this comment.
| "Please download the dataset manually and place it in the specified directory" | |
| "Please download the dataset manually and place it in the specified directory." |
To be consistent with the rest of the messages, I think we need to add a period.
|
|
||
| The LFW dataset is no longer available for automatic download. Please | ||
| download it manually and place it in the specified directory. | ||
| A commonly used mirror is available at: https://www.kaggle.com/datasets/jessicali9530/lfw-dataset |
There was a problem hiding this comment.
This part looks good to me.
However, the warning message does not show up on the webpage (you can click the link of Preview Python docs built from this PR), but this is a pre-existing bug, not introduced by this PR.
If you want, feel free to fix in this PR, or open a new PR to fix it. Otherwise, you don't need to do anything on this part and I will fix it after merging your PR.
|
|
||
| The LFW dataset is no longer available for automatic download. Please | ||
| download it manually and place it in the specified directory. | ||
| A commonly used mirror is available at: https://www.kaggle.com/datasets/jessicali9530/lfw-dataset |
There was a problem hiding this comment.
This part looks good to me.
However, the warning message does not show up on the webpage (you can click the link of Preview Python docs built from this PR), but this is a pre-existing bug, not introduced by this PR.
If you want, feel free to fix in this PR, or open a new PR to fix it. Otherwise, you don't need to do anything on this part and I will fix it after merging your PR.
Summary
torchvision.datasets.LFWPeople/LFWPairs currently raises a ValueError indicating that the LFW dataset - http://vis-www.cs.umass.edu/lfw/ is no longer available for download and must be obtained manually. This PR keeps the existing behavior intact, but improves the error message to include a pointer to a commonly used dataset mirror (Kaggle) so users can find the dataset more easily.
Changes
Existing behavior preserved; only message text and link updated.
Related Issue
#8888