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
80b6cb3b
Unverified
Commit
80b6cb3b
authored
Oct 27, 2020
by
liuzhe-lz
Committed by
GitHub
Oct 27, 2020
Browse files
Merge pull request #3030 from microsoft/v2.0
Merge v2.0 into master
parents
77dac12b
ff1af7f2
Changes
649
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
18 additions
and
15 deletions
+18
-15
nni/tools/annotation/search_space_generator.py
nni/tools/annotation/search_space_generator.py
+0
-0
nni/tools/annotation/specific_code_generator.py
nni/tools/annotation/specific_code_generator.py
+1
-1
nni/tools/annotation/utils.py
nni/tools/annotation/utils.py
+0
-0
nni/tools/gpu_tool/__init__.py
nni/tools/gpu_tool/__init__.py
+0
-0
nni/tools/gpu_tool/gpu_metrics_collector.py
nni/tools/gpu_tool/gpu_metrics_collector.py
+0
-0
nni/tools/nnictl/__init__.py
nni/tools/nnictl/__init__.py
+0
-0
nni/tools/nnictl/command_utils.py
nni/tools/nnictl/command_utils.py
+0
-0
nni/tools/nnictl/common_utils.py
nni/tools/nnictl/common_utils.py
+0
-0
nni/tools/nnictl/config_schema.py
nni/tools/nnictl/config_schema.py
+1
-1
nni/tools/nnictl/config_utils.py
nni/tools/nnictl/config_utils.py
+0
-0
nni/tools/nnictl/constants.py
nni/tools/nnictl/constants.py
+0
-0
nni/tools/nnictl/launcher.py
nni/tools/nnictl/launcher.py
+7
-5
nni/tools/nnictl/launcher_utils.py
nni/tools/nnictl/launcher_utils.py
+0
-0
nni/tools/nnictl/nnictl.py
nni/tools/nnictl/nnictl.py
+0
-0
nni/tools/nnictl/nnictl_utils.py
nni/tools/nnictl/nnictl_utils.py
+7
-6
nni/tools/nnictl/package_management.py
nni/tools/nnictl/package_management.py
+2
-2
nni/tools/nnictl/rest_utils.py
nni/tools/nnictl/rest_utils.py
+0
-0
nni/tools/nnictl/ssh_utils.py
nni/tools/nnictl/ssh_utils.py
+0
-0
nni/tools/nnictl/tensorboard_utils.py
nni/tools/nnictl/tensorboard_utils.py
+0
-0
nni/tools/nnictl/updater.py
nni/tools/nnictl/updater.py
+0
-0
No files found.
tools/
nni_
annotation/search_space_generator.py
→
nni/
tools/annotation/search_space_generator.py
View file @
80b6cb3b
File moved
tools/
nni_
annotation/specific_code_generator.py
→
nni/
tools/annotation/specific_code_generator.py
View file @
80b6cb3b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
import
ast
import
ast
import
astor
import
astor
from
nni
_cmd
.common_utils
import
print_warning
from
nni
.tools.nnictl
.common_utils
import
print_warning
from
.utils
import
ast_Num
,
ast_Str
from
.utils
import
ast_Num
,
ast_Str
...
...
tools/
nni_
annotation/utils.py
→
nni/
tools/annotation/utils.py
View file @
80b6cb3b
File moved
tools/
nni_cmd
/__init__.py
→
nni/
tools/
gpu_tool
/__init__.py
View file @
80b6cb3b
File moved
tools/
nni_
gpu_tool/gpu_metrics_collector.py
→
nni/
tools/gpu_tool/gpu_metrics_collector.py
View file @
80b6cb3b
File moved
tools/nni
_gpu_too
l/__init__.py
→
nni/
tools/nni
ct
l/__init__.py
View file @
80b6cb3b
File moved
tools/nni
_cmd
/command_utils.py
→
nni/
tools/nni
ctl
/command_utils.py
View file @
80b6cb3b
File moved
tools/nni
_cmd
/common_utils.py
→
nni/
tools/nni
ctl
/common_utils.py
View file @
80b6cb3b
File moved
tools/nni
_cmd
/config_schema.py
→
nni/
tools/nni
ctl
/config_schema.py
View file @
80b6cb3b
...
@@ -6,7 +6,7 @@ import logging
...
@@ -6,7 +6,7 @@ import logging
import
os
import
os
import
netifaces
import
netifaces
from
schema
import
Schema
,
And
,
Optional
,
Regex
,
Or
,
SchemaError
from
schema
import
Schema
,
And
,
Optional
,
Regex
,
Or
,
SchemaError
from
nni.package_utils
import
create_validator_instance
,
get_all_builtin_names
,
get_builtin_algo_meta
from
nni.
tools.
package_utils
import
create_validator_instance
,
get_all_builtin_names
,
get_builtin_algo_meta
from
.constants
import
SCHEMA_TYPE_ERROR
,
SCHEMA_RANGE_ERROR
,
SCHEMA_PATH_ERROR
from
.constants
import
SCHEMA_TYPE_ERROR
,
SCHEMA_RANGE_ERROR
,
SCHEMA_PATH_ERROR
from
.common_utils
import
get_yml_content
,
print_warning
from
.common_utils
import
get_yml_content
,
print_warning
...
...
tools/nni
_cmd
/config_utils.py
→
nni/
tools/nni
ctl
/config_utils.py
View file @
80b6cb3b
File moved
tools/nni
_cmd
/constants.py
→
nni/
tools/nni
ctl
/constants.py
View file @
80b6cb3b
File moved
tools/nni
_cmd
/launcher.py
→
nni/
tools/nni
ctl
/launcher.py
View file @
80b6cb3b
...
@@ -9,8 +9,9 @@ import random
...
@@ -9,8 +9,9 @@ import random
import
time
import
time
import
tempfile
import
tempfile
from
subprocess
import
Popen
,
check_call
,
CalledProcessError
,
PIPE
,
STDOUT
from
subprocess
import
Popen
,
check_call
,
CalledProcessError
,
PIPE
,
STDOUT
from
nni_annotation
import
expand_annotations
,
generate_search_space
from
nni.tools.annotation
import
expand_annotations
,
generate_search_space
from
nni.package_utils
import
get_builtin_module_class_name
,
get_nni_installation_path
from
nni.tools.package_utils
import
get_builtin_module_class_name
import
nni_node
from
.launcher_utils
import
validate_all_content
from
.launcher_utils
import
validate_all_content
from
.rest_utils
import
rest_put
,
rest_post
,
check_rest_server
,
check_response
from
.rest_utils
import
rest_put
,
rest_post
,
check_rest_server
,
check_response
from
.url_utils
import
cluster_metadata_url
,
experiment_url
,
get_local_urls
from
.url_utils
import
cluster_metadata_url
,
experiment_url
,
get_local_urls
...
@@ -52,15 +53,16 @@ def start_rest_server(port, platform, mode, config_file_name, foreground=False,
...
@@ -52,15 +53,16 @@ def start_rest_server(port, platform, mode, config_file_name, foreground=False,
print_normal
(
'Starting restful server...'
)
print_normal
(
'Starting restful server...'
)
entry_dir
=
get_nni_installation_path
()
entry_dir
=
nni_node
.
__path__
[
0
]
if
(
not
entry_dir
)
or
(
not
os
.
path
.
exists
(
entry_dir
)):
if
(
not
entry_dir
)
or
(
not
os
.
path
.
exists
(
entry_dir
)):
print_error
(
'Fail to find nni under python library'
)
print_error
(
'Fail to find nni under python library'
)
exit
(
1
)
exit
(
1
)
entry_file
=
os
.
path
.
join
(
entry_dir
,
'main.js'
)
entry_file
=
os
.
path
.
join
(
entry_dir
,
'main.js'
)
node_command
=
'node'
if
sys
.
platform
==
'win32'
:
if
sys
.
platform
==
'win32'
:
node_command
=
os
.
path
.
join
(
entry_dir
[:
-
3
],
'Scripts'
,
'node.exe'
)
node_command
=
os
.
path
.
join
(
entry_dir
,
'node.exe'
)
else
:
node_command
=
'node'
cmds
=
[
node_command
,
'--max-old-space-size=4096'
,
entry_file
,
'--port'
,
str
(
port
),
'--mode'
,
platform
]
cmds
=
[
node_command
,
'--max-old-space-size=4096'
,
entry_file
,
'--port'
,
str
(
port
),
'--mode'
,
platform
]
if
mode
==
'view'
:
if
mode
==
'view'
:
cmds
+=
[
'--start_mode'
,
'resume'
]
cmds
+=
[
'--start_mode'
,
'resume'
]
...
...
tools/nni
_cmd
/launcher_utils.py
→
nni/
tools/nni
ctl
/launcher_utils.py
View file @
80b6cb3b
File moved
tools/nni
_cmd
/nnictl.py
→
nni/
tools/nni
ctl
/nnictl.py
View file @
80b6cb3b
File moved
tools/nni
_cmd
/nnictl_utils.py
→
nni/
tools/nni
ctl
/nnictl_utils.py
View file @
80b6cb3b
...
@@ -13,8 +13,8 @@ from functools import cmp_to_key
...
@@ -13,8 +13,8 @@ from functools import cmp_to_key
from
datetime
import
datetime
,
timezone
from
datetime
import
datetime
,
timezone
from
subprocess
import
Popen
from
subprocess
import
Popen
from
pyhdfs
import
HdfsClient
from
pyhdfs
import
HdfsClient
from
nni.
package_utils
import
get_nni_installation_path
from
nni.
tools.annotation
import
expand_annotations
from
nni_annotation
import
expand_annotations
import
nni_node
from
.rest_utils
import
rest_get
,
rest_delete
,
check_rest_server_quick
,
check_response
from
.rest_utils
import
rest_get
,
rest_delete
,
check_rest_server_quick
,
check_response
from
.url_utils
import
trial_jobs_url
,
experiment_url
,
trial_job_id_url
,
export_data_url
,
metric_data_url
from
.url_utils
import
trial_jobs_url
,
experiment_url
,
trial_job_id_url
,
export_data_url
,
metric_data_url
from
.config_utils
import
Config
,
Experiments
from
.config_utils
import
Config
,
Experiments
...
@@ -424,13 +424,14 @@ def webui_nas(args):
...
@@ -424,13 +424,14 @@ def webui_nas(args):
'''launch nas ui'''
'''launch nas ui'''
print_normal
(
'Starting NAS UI...'
)
print_normal
(
'Starting NAS UI...'
)
try
:
try
:
entry_dir
=
get_nni_installation_path
()
entry_dir
=
nni_node
.
__path__
[
0
]
entry_file
=
os
.
path
.
join
(
entry_dir
,
'nasui'
,
'server.js'
)
entry_file
=
os
.
path
.
join
(
entry_dir
,
'nasui'
,
'server.js'
)
node_command
=
'node'
if
sys
.
platform
==
'win32'
:
if
sys
.
platform
==
'win32'
:
node_command
=
os
.
path
.
join
(
entry_dir
[:
-
3
],
'Scripts'
,
'node.exe'
)
node_command
=
os
.
path
.
join
(
entry_dir
,
'node.exe'
)
else
:
node_command
=
'node'
cmds
=
[
node_command
,
'--max-old-space-size=4096'
,
entry_file
,
'--port'
,
str
(
args
.
port
),
'--logdir'
,
args
.
logdir
]
cmds
=
[
node_command
,
'--max-old-space-size=4096'
,
entry_file
,
'--port'
,
str
(
args
.
port
),
'--logdir'
,
args
.
logdir
]
subprocess
.
run
(
cmds
)
subprocess
.
run
(
cmds
,
cwd
=
entry_dir
)
except
KeyboardInterrupt
:
except
KeyboardInterrupt
:
pass
pass
...
...
tools/nni
_cmd
/package_management.py
→
nni/
tools/nni
ctl
/package_management.py
View file @
80b6cb3b
...
@@ -6,7 +6,7 @@ from collections import defaultdict
...
@@ -6,7 +6,7 @@ from collections import defaultdict
import
json
import
json
import
pkginfo
import
pkginfo
import
nni
import
nni
from
nni.package_utils
import
read_installed_package_meta
,
get_installed_package_meta
,
\
from
nni.
tools.
package_utils
import
read_installed_package_meta
,
get_installed_package_meta
,
\
write_package_meta
,
get_builtin_algo_meta
,
get_not_installable_builtin_names
,
ALGO_TYPES
write_package_meta
,
get_builtin_algo_meta
,
get_not_installable_builtin_names
,
ALGO_TYPES
from
.constants
import
INSTALLABLE_PACKAGE_META
from
.constants
import
INSTALLABLE_PACKAGE_META
...
@@ -19,7 +19,7 @@ def install_by_name(package_name):
...
@@ -19,7 +19,7 @@ def install_by_name(package_name):
if
package_name
not
in
INSTALLABLE_PACKAGE_META
:
if
package_name
not
in
INSTALLABLE_PACKAGE_META
:
raise
RuntimeError
(
'{} is not found in installable packages!'
.
format
(
package_name
))
raise
RuntimeError
(
'{} is not found in installable packages!'
.
format
(
package_name
))
requirements_path
=
os
.
path
.
join
(
nni
.
__path__
[
0
],
INSTALLABLE_PACKAGE_META
[
package_name
][
'code_sub_dir'
],
'requirements.txt'
)
requirements_path
=
os
.
path
.
join
(
nni
.
__path__
[
0
],
'algorithms/hpo'
,
INSTALLABLE_PACKAGE_META
[
package_name
][
'code_sub_dir'
],
'requirements.txt'
)
assert
os
.
path
.
exists
(
requirements_path
)
assert
os
.
path
.
exists
(
requirements_path
)
return
install_requirements_command
(
requirements_path
)
return
install_requirements_command
(
requirements_path
)
...
...
tools/nni
_cmd
/rest_utils.py
→
nni/
tools/nni
ctl
/rest_utils.py
View file @
80b6cb3b
File moved
tools/nni
_cmd
/ssh_utils.py
→
nni/
tools/nni
ctl
/ssh_utils.py
View file @
80b6cb3b
File moved
tools/nni
_cmd
/tensorboard_utils.py
→
nni/
tools/nni
ctl
/tensorboard_utils.py
View file @
80b6cb3b
File moved
tools/nni
_cmd
/updater.py
→
nni/
tools/nni
ctl
/updater.py
View file @
80b6cb3b
File moved
Prev
1
…
13
14
15
16
17
18
19
20
21
…
33
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