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
76586fca
"git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "bef663b8aee79c59bdc585aa1f546d27392345db"
Unverified
Commit
76586fca
authored
Jun 22, 2020
by
SparkSnail
Committed by
GitHub
Jun 22, 2020
Browse files
Check eth0 in nnictl (#2566)
parent
0101f887
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
1 deletion
+14
-1
deployment/pypi/setup.py
deployment/pypi/setup.py
+1
-0
setup.py
setup.py
+1
-0
tools/nni_cmd/launcher_utils.py
tools/nni_cmd/launcher_utils.py
+10
-0
tools/setup.py
tools/setup.py
+2
-1
No files found.
deployment/pypi/setup.py
View file @
76586fca
...
@@ -58,6 +58,7 @@ setuptools.setup(
...
@@ -58,6 +58,7 @@ setuptools.setup(
'PythonWebHDFS'
,
'PythonWebHDFS'
,
'hyperopt==0.1.2'
,
'hyperopt==0.1.2'
,
'json_tricks'
,
'json_tricks'
,
'netifaces'
,
'numpy'
,
'numpy'
,
'scipy'
,
'scipy'
,
'coverage'
,
'coverage'
,
...
...
setup.py
View file @
76586fca
...
@@ -32,6 +32,7 @@ setup(
...
@@ -32,6 +32,7 @@ setup(
'astor'
,
'astor'
,
'hyperopt==0.1.2'
,
'hyperopt==0.1.2'
,
'json_tricks'
,
'json_tricks'
,
'netifaces'
,
'numpy'
,
'numpy'
,
'psutil'
,
'psutil'
,
'ruamel.yaml'
,
'ruamel.yaml'
,
...
...
tools/nni_cmd/launcher_utils.py
View file @
76586fca
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
import
os
import
os
import
json
import
json
import
netifaces
from
schema
import
SchemaError
from
schema
import
SchemaError
from
schema
import
Schema
from
schema
import
Schema
from
.config_schema
import
LOCAL_CONFIG_SCHEMA
,
REMOTE_CONFIG_SCHEMA
,
PAI_CONFIG_SCHEMA
,
PAI_YARN_CONFIG_SCHEMA
,
\
from
.config_schema
import
LOCAL_CONFIG_SCHEMA
,
REMOTE_CONFIG_SCHEMA
,
PAI_CONFIG_SCHEMA
,
PAI_YARN_CONFIG_SCHEMA
,
\
...
@@ -297,10 +298,19 @@ def validate_pai_trial_conifg(experiment_config):
...
@@ -297,10 +298,19 @@ def validate_pai_trial_conifg(experiment_config):
print_warning
(
warning_information
.
format
(
'outputDir'
))
print_warning
(
warning_information
.
format
(
'outputDir'
))
validate_pai_config_path
(
experiment_config
)
validate_pai_config_path
(
experiment_config
)
def
validate_eth0_device
(
experiment_config
):
'''validate whether the machine has eth0 device'''
if
experiment_config
.
get
(
'trainingServicePlatform'
)
not
in
[
'local'
]
\
and
not
experiment_config
.
get
(
'nniManagerIp'
)
\
and
'eth0'
not
in
netifaces
.
interfaces
():
print_error
(
'This machine does not contain eth0 network device, please set nniManagerIp in config file!'
)
exit
(
1
)
def
validate_all_content
(
experiment_config
,
config_path
):
def
validate_all_content
(
experiment_config
,
config_path
):
'''Validate whether experiment_config is valid'''
'''Validate whether experiment_config is valid'''
parse_path
(
experiment_config
,
config_path
)
parse_path
(
experiment_config
,
config_path
)
validate_common_content
(
experiment_config
)
validate_common_content
(
experiment_config
)
validate_eth0_device
(
experiment_config
)
validate_pai_trial_conifg
(
experiment_config
)
validate_pai_trial_conifg
(
experiment_config
)
experiment_config
[
'maxExecDuration'
]
=
parse_time
(
experiment_config
[
'maxExecDuration'
])
experiment_config
[
'maxExecDuration'
]
=
parse_time
(
experiment_config
[
'maxExecDuration'
])
if
experiment_config
.
get
(
'advisor'
):
if
experiment_config
.
get
(
'advisor'
):
...
...
tools/setup.py
View file @
76586fca
...
@@ -16,7 +16,8 @@ setuptools.setup(
...
@@ -16,7 +16,8 @@ setuptools.setup(
'astor'
,
'astor'
,
'schema'
,
'schema'
,
'PythonWebHDFS'
,
'PythonWebHDFS'
,
'colorama'
'colorama'
,
'netifaces'
],
],
author
=
'Microsoft NNI Team'
,
author
=
'Microsoft NNI Team'
,
...
...
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