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
361b6df3
Unverified
Commit
361b6df3
authored
Sep 08, 2021
by
Kevin Canwen Xu
Committed by
GitHub
Sep 08, 2021
Browse files
Throw ValueError for mirror downloads (#13478)
parent
99029ab6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
src/transformers/file_utils.py
src/transformers/file_utils.py
+2
-5
No files found.
src/transformers/file_utils.py
View file @
361b6df3
...
@@ -1257,11 +1257,8 @@ def hf_bucket_url(
...
@@ -1257,11 +1257,8 @@ def hf_bucket_url(
filename
=
f
"
{
subfolder
}
/
{
filename
}
"
filename
=
f
"
{
subfolder
}
/
{
filename
}
"
if
mirror
:
if
mirror
:
logger
.
warning
(
if
mirror
in
[
"tuna"
,
"bfsu"
]:
"Deprecated: The mirroring is deprecated."
raise
ValueError
(
"The Tuna and BFSU mirrors are no longer available. Try removing the mirror argument."
)
"Tuna and BFSU mirrors are no longer available."
"We will soon provide a self-hosted alternative."
)
legacy_format
=
"/"
not
in
model_id
legacy_format
=
"/"
not
in
model_id
if
legacy_format
:
if
legacy_format
:
return
f
"
{
mirror
}
/
{
model_id
}
-
{
filename
}
"
return
f
"
{
mirror
}
/
{
model_id
}
-
{
filename
}
"
...
...
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