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
OpenDAS
nni
Commits
ea838014
"src/vscode:/vscode.git/clone" did not exist on "68989d80858d8b034137330cf4fce1165a5db933"
Unverified
Commit
ea838014
authored
Mar 08, 2021
by
Rush Tehrani
Committed by
GitHub
Mar 09, 2021
Browse files
fix: Fix ruamel import (#3430)
parent
650a39b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
nni/experiment/config/base.py
nni/experiment/config/base.py
+2
-2
No files found.
nni/experiment/config/base.py
View file @
ea838014
...
...
@@ -6,7 +6,7 @@ import dataclasses
from
pathlib
import
Path
from
typing
import
Any
,
Dict
,
Optional
,
Type
,
TypeVar
from
ruamel
import
yaml
import
ruamel
.yaml
as
yaml
from
.
import
util
...
...
@@ -70,7 +70,7 @@ class ConfigBase:
Load config from YAML (or JSON) file.
Keys in YAML file can either be camelCase or snake_case.
"""
data
=
yaml
.
safe_
load
(
open
(
path
))
data
=
yaml
.
load
(
open
(
path
)
,
Loader
=
yaml
.
SafeLoader
)
if
not
isinstance
(
data
,
dict
):
raise
ValueError
(
f
'Content of config file
{
path
}
is not a dict/object'
)
return
cls
(
**
data
,
_base_path
=
Path
(
path
).
parent
)
...
...
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