fix: link to HF repo/tree/revision when a file is missing #30406
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When
cached_file
fails to download a file from a valid HF model, it reportsCheckout 'https://huggingface.co/{path_or_repo_id}/{revision}' for available files.
But this gets a 404. The correct link would include/tree/{revision}
.main
) and commit IDs( edit: update path to hub files in the error message #29369 )
I had the error come up when trying to load a tokenizer from a LoRA repo instead of the base model repo: https://colab.research.google.com/drive/1pqdFMgo_6kqHfCGR5-qCIC6A_py5f84H?usp=sharing
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.