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
c4e96156
Commit
c4e96156
authored
Jul 17, 2019
by
Wei-Sheng Chin
Browse files
Fix a path so that test can run on Windows
parent
5fe0b378
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 @
c4e96156
...
@@ -21,6 +21,7 @@ import os
...
@@ -21,6 +21,7 @@ import os
import
shutil
import
shutil
import
json
import
json
import
random
import
random
import
uuid
import
unittest
import
unittest
import
logging
import
logging
...
@@ -527,7 +528,7 @@ class ConfigTester(object):
...
@@ -527,7 +528,7 @@ class ConfigTester(object):
def
create_and_test_config_to_json_file
(
self
):
def
create_and_test_config_to_json_file
(
self
):
config_first
=
self
.
config_class
(
**
self
.
inputs_dict
)
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_first
.
to_json_file
(
json_file_path
)
config_second
=
self
.
config_class
.
from_json_file
(
json_file_path
)
config_second
=
self
.
config_class
.
from_json_file
(
json_file_path
)
os
.
remove
(
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