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
e753f249
Unverified
Commit
e753f249
authored
Aug 21, 2019
by
Thomas Wolf
Committed by
GitHub
Aug 21, 2019
Browse files
Merge pull request #806 from wschin/fix-a-path
Fix a path so that a test can run on Windows
parents
c3619f55
c4e96156
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
pytorch_transformers/tests/modeling_common_test.py
pytorch_transformers/tests/modeling_common_test.py
+2
-1
No files found.
pytorch_transformers/tests/modeling_common_test.py
View file @
e753f249
...
...
@@ -21,6 +21,7 @@ import os
import
shutil
import
json
import
random
import
uuid
import
unittest
import
logging
...
...
@@ -527,7 +528,7 @@ class ConfigTester(object):
def
create_and_test_config_to_json_file
(
self
):
config_first
=
self
.
config_class
(
**
self
.
inputs_dict
)
json_file_path
=
"/tmp/config
.json"
json_file_path
=
os
.
path
.
join
(
os
.
getcwd
(),
"config_"
+
str
(
uuid
.
uuid4
())
+
"
.json"
)
config_first
.
to_json_file
(
json_file_path
)
config_second
=
self
.
config_class
.
from_json_file
(
json_file_path
)
os
.
remove
(
json_file_path
)
...
...
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