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
21c88a07
Unverified
Commit
21c88a07
authored
Mar 06, 2019
by
Thomas Wolf
Committed by
GitHub
Mar 06, 2019
Browse files
Merge pull request #341 from potatochip/patch-1
catch exception if pathlib not install
parents
3c01dfb7
0c970caa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
pytorch_pretrained_bert/file_utils.py
pytorch_pretrained_bert/file_utils.py
+1
-1
No files found.
pytorch_pretrained_bert/file_utils.py
View file @
21c88a07
...
@@ -29,7 +29,7 @@ try:
...
@@ -29,7 +29,7 @@ try:
from
pathlib
import
Path
from
pathlib
import
Path
PYTORCH_PRETRAINED_BERT_CACHE
=
Path
(
os
.
getenv
(
'PYTORCH_PRETRAINED_BERT_CACHE'
,
PYTORCH_PRETRAINED_BERT_CACHE
=
Path
(
os
.
getenv
(
'PYTORCH_PRETRAINED_BERT_CACHE'
,
Path
.
home
()
/
'.pytorch_pretrained_bert'
))
Path
.
home
()
/
'.pytorch_pretrained_bert'
))
except
AttributeError
:
except
(
AttributeError
,
ImportError
)
:
PYTORCH_PRETRAINED_BERT_CACHE
=
os
.
getenv
(
'PYTORCH_PRETRAINED_BERT_CACHE'
,
PYTORCH_PRETRAINED_BERT_CACHE
=
os
.
getenv
(
'PYTORCH_PRETRAINED_BERT_CACHE'
,
os
.
path
.
join
(
os
.
path
.
expanduser
(
"~"
),
'.pytorch_pretrained_bert'
))
os
.
path
.
join
(
os
.
path
.
expanduser
(
"~"
),
'.pytorch_pretrained_bert'
))
...
...
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