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
6ed7e32f
Unverified
Commit
6ed7e32f
authored
Dec 03, 2020
by
Sylvain Gugger
Committed by
GitHub
Dec 03, 2020
Browse files
Fix move when the two cache folders exist (#8917)
parent
8453201c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
src/transformers/file_utils.py
src/transformers/file_utils.py
+1
-0
No files found.
src/transformers/file_utils.py
View file @
6ed7e32f
...
...
@@ -213,6 +213,7 @@ default_cache_path = os.path.join(hf_cache_home, "transformers")
# Onetime move from the old location to the new one if no ENV variable has been set.
if
(
os
.
path
.
isdir
(
old_default_cache_path
)
and
not
os
.
path
.
isdir
(
default_cache_path
)
and
"PYTORCH_PRETRAINED_BERT_CACHE"
not
in
os
.
environ
and
"PYTORCH_TRANSFORMERS_CACHE"
not
in
os
.
environ
and
"TRANSFORMERS_CACHE"
not
in
os
.
environ
...
...
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