Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
9a43f0dd
Commit
9a43f0dd
authored
Jul 30, 2019
by
Shinai Yang
Browse files
fix experiment list
parent
d4acd498
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tools/nni_cmd/nnictl_utils.py
tools/nni_cmd/nnictl_utils.py
+3
-3
No files found.
tools/nni_cmd/nnictl_utils.py
View file @
9a43f0dd
...
@@ -520,9 +520,9 @@ def platform_clean(args):
...
@@ -520,9 +520,9 @@ def platform_clean(args):
if
platform
not
in
[
'remote'
,
'pai'
]:
if
platform
not
in
[
'remote'
,
'pai'
]:
print_normal
(
'platform {0} not supported.'
.
format
(
platform
))
print_normal
(
'platform {0} not supported.'
.
format
(
platform
))
exit
(
0
)
exit
(
0
)
update_experiment
()
experiment_config
=
Experiments
()
experiment_config
=
Experiments
()
experiment_dict
=
experiment_config
.
get_all_experiments
()
experiment_dict
=
experiment_config
.
get_all_experiments
()
update_experiment
()
id_list
=
list
(
experiment_dict
.
keys
())
id_list
=
list
(
experiment_dict
.
keys
())
dir_list
=
get_platform_dir
(
config_content
)
dir_list
=
get_platform_dir
(
config_content
)
if
not
dir_list
:
if
not
dir_list
:
...
@@ -553,12 +553,12 @@ def platform_clean(args):
...
@@ -553,12 +553,12 @@ def platform_clean(args):
def
experiment_list
(
args
):
def
experiment_list
(
args
):
'''get the information of all experiments'''
'''get the information of all experiments'''
update_experiment
()
experiment_config
=
Experiments
()
experiment_config
=
Experiments
()
experiment_dict
=
experiment_config
.
get_all_experiments
()
experiment_dict
=
experiment_config
.
get_all_experiments
()
if
not
experiment_dict
:
if
not
experiment_dict
:
print_normal
(
'Cannot find experiments.'
)
print_normal
(
'Cannot find experiments.'
)
exit
(
1
)
exit
(
1
)
update_experiment
()
experiment_id_list
=
[]
experiment_id_list
=
[]
if
args
.
all
:
if
args
.
all
:
for
key
in
experiment_dict
.
keys
():
for
key
in
experiment_dict
.
keys
():
...
@@ -595,12 +595,12 @@ def get_time_interval(time1, time2):
...
@@ -595,12 +595,12 @@ def get_time_interval(time1, time2):
def
show_experiment_info
():
def
show_experiment_info
():
'''show experiment information in monitor'''
'''show experiment information in monitor'''
update_experiment
()
experiment_config
=
Experiments
()
experiment_config
=
Experiments
()
experiment_dict
=
experiment_config
.
get_all_experiments
()
experiment_dict
=
experiment_config
.
get_all_experiments
()
if
not
experiment_dict
:
if
not
experiment_dict
:
print
(
'There is no experiment running...'
)
print
(
'There is no experiment running...'
)
exit
(
1
)
exit
(
1
)
update_experiment
()
experiment_id_list
=
[]
experiment_id_list
=
[]
for
key
in
experiment_dict
.
keys
():
for
key
in
experiment_dict
.
keys
():
if
experiment_dict
[
key
][
'status'
]
!=
'STOPPED'
:
if
experiment_dict
[
key
][
'status'
]
!=
'STOPPED'
:
...
...
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