Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
04ac3245
Unverified
Commit
04ac3245
authored
Apr 23, 2024
by
Nick Doiron
Committed by
GitHub
Apr 23, 2024
Browse files
fix: link to HF repo/tree/revision when a file is missing (#30406)
fix: link to HF repo tree when a file is missing
parent
179ab098
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/utils/hub.py
src/transformers/utils/hub.py
+1
-1
No files found.
src/transformers/utils/hub.py
View file @
04ac3245
...
...
@@ -451,7 +451,7 @@ def cached_file(
revision
=
"main"
raise
EnvironmentError
(
f
"
{
path_or_repo_id
}
does not appear to have a file named
{
full_filename
}
. Checkout "
f
"'https://huggingface.co/
{
path_or_repo_id
}
/
{
revision
}
' for available files."
f
"'https://huggingface.co/
{
path_or_repo_id
}
/
tree/
{
revision
}
' for available files."
)
from
e
except
HTTPError
as
err
:
resolved_file
=
_get_cache_file_to_return
(
path_or_repo_id
,
full_filename
,
cache_dir
,
revision
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment