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
1a663096
"src/include/utility.hpp" did not exist on "19f17df47a2d814cab40b75027cbcac0c544932f"
Unverified
Commit
1a663096
authored
Aug 02, 2019
by
SparkSnail
Committed by
GitHub
Aug 02, 2019
Browse files
Add package install error information (#1385)
parent
204b1eba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
tools/nni_cmd/launcher.py
tools/nni_cmd/launcher.py
+7
-2
No files found.
tools/nni_cmd/launcher.py
View file @
1a663096
...
@@ -360,9 +360,14 @@ def launch_experiment(args, experiment_config, mode, config_file_name, experimen
...
@@ -360,9 +360,14 @@ def launch_experiment(args, experiment_config, mode, config_file_name, experimen
module_name
=
AdvisorModuleName
.
get
(
package_name
)
module_name
=
AdvisorModuleName
.
get
(
package_name
)
if
package_name
and
module_name
:
if
package_name
and
module_name
:
try
:
try
:
check_call
([
sys
.
executable
,
'-c'
,
'import %s'
%
(
module_name
)],
stdout
=
PIPE
,
stderr
=
PIPE
)
stdout_full_path
,
stderr_full_path
=
get_log_path
(
config_file_name
)
with
open
(
stdout_full_path
,
'a+'
)
as
stdout_file
,
open
(
stderr_full_path
,
'a+'
)
as
stderr_file
:
check_call
([
sys
.
executable
,
'-c'
,
'import %s'
%
(
module_name
)],
stdout
=
stdout_file
,
stderr
=
stderr_file
)
except
CalledProcessError
as
e
:
except
CalledProcessError
as
e
:
print_error
(
'%s should be installed through
\'
nnictl package install --name %s
\'
'
%
(
package_name
,
package_name
))
print_error
(
'some errors happen when import package %s.'
%
(
package_name
))
print_log_content
(
config_file_name
)
if
package_name
in
PACKAGE_REQUIREMENTS
:
print_error
(
'If %s is not installed, it should be installed through
\'
nnictl package install --name %s
\'
'
%
(
package_name
,
package_name
))
exit
(
1
)
exit
(
1
)
log_dir
=
experiment_config
[
'logDir'
]
if
experiment_config
.
get
(
'logDir'
)
else
None
log_dir
=
experiment_config
[
'logDir'
]
if
experiment_config
.
get
(
'logDir'
)
else
None
log_level
=
experiment_config
[
'logLevel'
]
if
experiment_config
.
get
(
'logLevel'
)
else
None
log_level
=
experiment_config
[
'logLevel'
]
if
experiment_config
.
get
(
'logLevel'
)
else
None
...
...
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