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
0e8a9f82
Unverified
Commit
0e8a9f82
authored
Jan 20, 2021
by
liuzhe-lz
Committed by
GitHub
Jan 20, 2021
Browse files
Merge pull request #3311 from 418sec/1-pip-nni
parents
4784cc6c
ea3bebab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
nni/tools/nnictl/common_utils.py
nni/tools/nnictl/common_utils.py
+1
-1
nni/tools/package_utils/__init__.py
nni/tools/package_utils/__init__.py
+1
-1
No files found.
nni/tools/nnictl/common_utils.py
View file @
0e8a9f82
...
@@ -21,7 +21,7 @@ def get_yml_content(file_path):
...
@@ -21,7 +21,7 @@ def get_yml_content(file_path):
'''Load yaml file content'''
'''Load yaml file content'''
try
:
try
:
with
open
(
file_path
,
'r'
)
as
file
:
with
open
(
file_path
,
'r'
)
as
file
:
return
yaml
.
load
(
file
,
Loader
=
yaml
.
Loader
)
return
yaml
.
load
(
file
,
Loader
=
yaml
.
Safe
Loader
)
except
yaml
.
scanner
.
ScannerError
as
err
:
except
yaml
.
scanner
.
ScannerError
as
err
:
print_error
(
'yaml file format error!'
)
print_error
(
'yaml file format error!'
)
print_error
(
err
)
print_error
(
err
)
...
...
nni/tools/package_utils/__init__.py
View file @
0e8a9f82
...
@@ -216,7 +216,7 @@ def read_registerd_algo_meta():
...
@@ -216,7 +216,7 @@ def read_registerd_algo_meta():
config_file
=
get_registered_algo_config_path
()
config_file
=
get_registered_algo_config_path
()
if
os
.
path
.
exists
(
config_file
):
if
os
.
path
.
exists
(
config_file
):
with
open
(
config_file
,
'r'
)
as
f
:
with
open
(
config_file
,
'r'
)
as
f
:
config
=
yaml
.
load
(
f
,
Loader
=
yaml
.
Loader
)
config
=
yaml
.
load
(
f
,
Loader
=
yaml
.
Safe
Loader
)
else
:
else
:
config
=
defaultdict
(
list
)
config
=
defaultdict
(
list
)
for
t
in
ALGO_TYPES
:
for
t
in
ALGO_TYPES
:
...
...
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