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
ba8dccd6
Commit
ba8dccd6
authored
Jun 23, 2019
by
suiguoxin
Browse files
Merge branch 'master' of
https://github.com/microsoft/nni
parents
56a1575b
150ee83a
Changes
198
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
61 additions
and
62 deletions
+61
-62
test/config_test/multi_phase/search_space.json
test/config_test/multi_phase/search_space.json
+1
-1
test/config_test/multi_thread/search_space.json
test/config_test/multi_thread/search_space.json
+1
-1
test/config_test/tuners/search_space_batchtuner.json
test/config_test/tuners/search_space_batchtuner.json
+2
-2
test/metrics_test.py
test/metrics_test.py
+1
-1
test/metrics_test/search_space.json
test/metrics_test/search_space.json
+1
-1
test/metrics_test/trial.py
test/metrics_test/trial.py
+1
-1
test/naive_test/README.md
test/naive_test/README.md
+1
-1
test/remote_docker.py
test/remote_docker.py
+1
-1
test/unittest.ps1
test/unittest.ps1
+1
-1
tools/README.md
tools/README.md
+6
-6
tools/nni_annotation/README.md
tools/nni_annotation/README.md
+3
-3
tools/nni_annotation/__init__.py
tools/nni_annotation/__init__.py
+3
-3
tools/nni_annotation/code_generator.py
tools/nni_annotation/code_generator.py
+1
-1
tools/nni_annotation/testcase/annotated/mnist.py
tools/nni_annotation/testcase/annotated/mnist.py
+1
-1
tools/nni_annotation/testcase/usercode/mnist.py
tools/nni_annotation/testcase/usercode/mnist.py
+14
-14
tools/nni_cmd/config_schema.py
tools/nni_cmd/config_schema.py
+3
-2
tools/nni_cmd/config_utils.py
tools/nni_cmd/config_utils.py
+4
-4
tools/nni_cmd/launcher.py
tools/nni_cmd/launcher.py
+16
-18
No files found.
test/config_test/multi_phase/search_space.json
View file @
ba8dccd6
test/config_test/multi_thread/search_space.json
View file @
ba8dccd6
test/config_test/tuners/search_space_batchtuner.json
View file @
ba8dccd6
test/metrics_test.py
View file @
ba8dccd6
test/metrics_test/search_space.json
View file @
ba8dccd6
test/metrics_test/trial.py
View file @
ba8dccd6
test/naive_test/README.md
View file @
ba8dccd6
test/remote_docker.py
View file @
ba8dccd6
test/unittest.ps1
View file @
ba8dccd6
tools/README.md
View file @
ba8dccd6
tools/nni_annotation/README.md
View file @
ba8dccd6
tools/nni_annotation/__init__.py
View file @
ba8dccd6
tools/nni_annotation/code_generator.py
View file @
ba8dccd6
tools/nni_annotation/testcase/annotated/mnist.py
View file @
ba8dccd6
tools/nni_annotation/testcase/usercode/mnist.py
View file @
ba8dccd6
tools/nni_cmd/config_schema.py
View file @
ba8dccd6
...
...
@@ -56,6 +56,7 @@ common_schema = {
Optional
(
'nniManagerIp'
):
setType
(
'nniManagerIp'
,
str
),
Optional
(
'logDir'
):
And
(
os
.
path
.
isdir
,
error
=
SCHEMA_PATH_ERROR
%
'logDir'
),
Optional
(
'debug'
):
setType
(
'debug'
,
bool
),
Optional
(
'versionCheck'
):
setType
(
'versionCheck'
,
bool
),
Optional
(
'logLevel'
):
setChoice
(
'logLevel'
,
'trace'
,
'debug'
,
'info'
,
'warning'
,
'error'
,
'fatal'
),
Optional
(
'logCollection'
):
setChoice
(
'logCollection'
,
'http'
,
'none'
),
'useAnnotation'
:
setType
(
'useAnnotation'
,
bool
),
...
...
tools/nni_cmd/config_utils.py
View file @
ba8dccd6
tools/nni_cmd/launcher.py
View file @
ba8dccd6
...
...
@@ -39,6 +39,7 @@ import site
import
time
from
pathlib
import
Path
from
.command_utils
import
check_output_command
,
kill_command
from
.nnictl_utils
import
update_experiment
def
get_log_path
(
config_file_name
):
'''generate stdout and stderr log path'''
...
...
@@ -302,6 +303,9 @@ def set_experiment(experiment_config, mode, port, config_file_name):
#debug mode should disable version check
if
experiment_config
.
get
(
'debug'
)
is
not
None
:
request_data
[
'versionCheck'
]
=
not
experiment_config
.
get
(
'debug'
)
#validate version check
if
experiment_config
.
get
(
'versionCheck'
)
is
not
None
:
request_data
[
'versionCheck'
]
=
experiment_config
.
get
(
'versionCheck'
)
if
experiment_config
.
get
(
'logCollection'
):
request_data
[
'logCollection'
]
=
experiment_config
.
get
(
'logCollection'
)
...
...
@@ -346,13 +350,6 @@ def set_experiment(experiment_config, mode, port, config_file_name):
def
launch_experiment
(
args
,
experiment_config
,
mode
,
config_file_name
,
experiment_id
=
None
):
'''follow steps to start rest server and start experiment'''
nni_config
=
Config
(
config_file_name
)
# check execution policy in powershell
if
sys
.
platform
==
'win32'
:
execution_policy
=
check_output
([
'powershell.exe'
,
'Get-ExecutionPolicy'
]).
decode
(
'ascii'
).
strip
()
if
execution_policy
==
'Restricted'
:
print_error
(
'PowerShell execution policy error, please run PowerShell as administrator with this command first:
\r\n
'
\
+
'
\'
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
\'
'
)
exit
(
1
)
# check packages for tuner
package_name
,
module_name
=
None
,
None
if
experiment_config
.
get
(
'tuner'
)
and
experiment_config
[
'tuner'
].
get
(
'builtinTunerName'
):
...
...
@@ -369,7 +366,7 @@ def launch_experiment(args, experiment_config, mode, config_file_name, experimen
exit
(
1
)
log_dir
=
experiment_config
[
'logDir'
]
if
experiment_config
.
get
(
'logDir'
)
else
None
log_level
=
experiment_config
[
'logLevel'
]
if
experiment_config
.
get
(
'logLevel'
)
else
None
if
log_level
not
in
[
'trace'
,
'debug'
]
and
args
.
debug
:
if
log_level
not
in
[
'trace'
,
'debug'
]
and
(
args
.
debug
or
experiment_config
.
get
(
'debug'
)
is
True
)
:
log_level
=
'debug'
# start rest server
rest_process
,
start_time
=
start_rest_server
(
args
.
port
,
experiment_config
[
'trainingServicePlatform'
],
mode
,
config_file_name
,
experiment_id
,
log_dir
,
log_level
)
...
...
@@ -461,7 +458,7 @@ def launch_experiment(args, experiment_config, mode, config_file_name, experimen
raise
Exception
(
ERROR_INFO
%
'Restful server stopped!'
)
exit
(
1
)
#set
kubeflow
config
#set
frameworkcontroller
config
if
experiment_config
[
'trainingServicePlatform'
]
==
'frameworkcontroller'
:
print_normal
(
'Setting frameworkcontroller config...'
)
config_result
,
err_msg
=
set_frameworkcontroller_config
(
experiment_config
,
args
.
port
,
config_file_name
)
...
...
@@ -508,6 +505,7 @@ def launch_experiment(args, experiment_config, mode, config_file_name, experimen
def
resume_experiment
(
args
):
'''resume an experiment'''
update_experiment
()
experiment_config
=
Experiments
()
experiment_dict
=
experiment_config
.
get_all_experiments
()
experiment_id
=
None
...
...
Prev
1
…
6
7
8
9
10
Next
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