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
f98ee672
Unverified
Commit
f98ee672
authored
Oct 20, 2020
by
liuzhe-lz
Committed by
GitHub
Oct 20, 2020
Browse files
[v2.0] Refactor code hierarchy (part 1) (#2962)
parent
f1105409
Changes
645
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
14 additions
and
11 deletions
+14
-11
nni/nni_cmd/command_utils.py
nni/nni_cmd/command_utils.py
+0
-0
nni/nni_cmd/common_utils.py
nni/nni_cmd/common_utils.py
+0
-0
nni/nni_cmd/config_schema.py
nni/nni_cmd/config_schema.py
+0
-0
nni/nni_cmd/config_utils.py
nni/nni_cmd/config_utils.py
+0
-0
nni/nni_cmd/constants.py
nni/nni_cmd/constants.py
+0
-0
nni/nni_cmd/launcher.py
nni/nni_cmd/launcher.py
+7
-5
nni/nni_cmd/launcher_utils.py
nni/nni_cmd/launcher_utils.py
+0
-0
nni/nni_cmd/nnictl.py
nni/nni_cmd/nnictl.py
+0
-0
nni/nni_cmd/nnictl_utils.py
nni/nni_cmd/nnictl_utils.py
+7
-6
nni/nni_cmd/package_management.py
nni/nni_cmd/package_management.py
+0
-0
nni/nni_cmd/rest_utils.py
nni/nni_cmd/rest_utils.py
+0
-0
nni/nni_cmd/ssh_utils.py
nni/nni_cmd/ssh_utils.py
+0
-0
nni/nni_cmd/tensorboard_utils.py
nni/nni_cmd/tensorboard_utils.py
+0
-0
nni/nni_cmd/updater.py
nni/nni_cmd/updater.py
+0
-0
nni/nni_cmd/url_utils.py
nni/nni_cmd/url_utils.py
+0
-0
nni/nni_gpu_tool/__init__.py
nni/nni_gpu_tool/__init__.py
+0
-0
nni/nni_gpu_tool/gpu_metrics_collector.py
nni/nni_gpu_tool/gpu_metrics_collector.py
+0
-0
nni/nni_trial_tool/__init__.py
nni/nni_trial_tool/__init__.py
+0
-0
nni/nni_trial_tool/aml_channel.py
nni/nni_trial_tool/aml_channel.py
+0
-0
nni/nni_trial_tool/base_channel.py
nni/nni_trial_tool/base_channel.py
+0
-0
No files found.
tools
/nni_cmd/command_utils.py
→
nni
/nni_cmd/command_utils.py
View file @
f98ee672
File moved
tools
/nni_cmd/common_utils.py
→
nni
/nni_cmd/common_utils.py
View file @
f98ee672
File moved
tools
/nni_cmd/config_schema.py
→
nni
/nni_cmd/config_schema.py
View file @
f98ee672
File moved
tools
/nni_cmd/config_utils.py
→
nni
/nni_cmd/config_utils.py
View file @
f98ee672
File moved
tools
/nni_cmd/constants.py
→
nni
/nni_cmd/constants.py
View file @
f98ee672
File moved
tools
/nni_cmd/launcher.py
→
nni
/nni_cmd/launcher.py
View file @
f98ee672
...
...
@@ -9,8 +9,9 @@ import random
import
time
import
tempfile
from
subprocess
import
Popen
,
check_call
,
CalledProcessError
,
PIPE
,
STDOUT
from
nni_annotation
import
expand_annotations
,
generate_search_space
from
nni.package_utils
import
get_builtin_module_class_name
,
get_nni_installation_path
from
nni.nni_annotation
import
expand_annotations
,
generate_search_space
from
nni.package_utils
import
get_builtin_module_class_name
import
nni_node
from
.launcher_utils
import
validate_all_content
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
...
...
@@ -52,15 +53,16 @@ def start_rest_server(port, platform, mode, config_file_name, foreground=False,
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
)):
print_error
(
'Fail to find nni under python library'
)
exit
(
1
)
entry_file
=
os
.
path
.
join
(
entry_dir
,
'main.js'
)
node_command
=
'node'
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
]
if
mode
==
'view'
:
cmds
+=
[
'--start_mode'
,
'resume'
]
...
...
tools
/nni_cmd/launcher_utils.py
→
nni
/nni_cmd/launcher_utils.py
View file @
f98ee672
File moved
tools
/nni_cmd/nnictl.py
→
nni
/nni_cmd/nnictl.py
View file @
f98ee672
File moved
tools
/nni_cmd/nnictl_utils.py
→
nni
/nni_cmd/nnictl_utils.py
View file @
f98ee672
...
...
@@ -13,8 +13,8 @@ from functools import cmp_to_key
from
datetime
import
datetime
,
timezone
from
subprocess
import
Popen
from
pyhdfs
import
HdfsClient
from
nni.
package_utils
import
get_nni_installation_path
from
nni_annotation
import
expand_annotations
from
nni.
nni_annotation
import
expand_annotations
import
nni_node
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
.config_utils
import
Config
,
Experiments
...
...
@@ -424,13 +424,14 @@ def webui_nas(args):
'''launch nas ui'''
print_normal
(
'Starting NAS UI...'
)
try
:
entry_dir
=
get_nni_installation_path
()
entry_dir
=
nni_node
.
__path__
[
0
]
entry_file
=
os
.
path
.
join
(
entry_dir
,
'nasui'
,
'server.js'
)
node_command
=
'node'
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
]
subprocess
.
run
(
cmds
)
subprocess
.
run
(
cmds
,
cwd
=
entry_dir
)
except
KeyboardInterrupt
:
pass
...
...
tools
/nni_cmd/package_management.py
→
nni
/nni_cmd/package_management.py
View file @
f98ee672
File moved
tools
/nni_cmd/rest_utils.py
→
nni
/nni_cmd/rest_utils.py
View file @
f98ee672
File moved
tools
/nni_cmd/ssh_utils.py
→
nni
/nni_cmd/ssh_utils.py
View file @
f98ee672
File moved
tools
/nni_cmd/tensorboard_utils.py
→
nni
/nni_cmd/tensorboard_utils.py
View file @
f98ee672
File moved
tools
/nni_cmd/updater.py
→
nni
/nni_cmd/updater.py
View file @
f98ee672
File moved
tools
/nni_cmd/url_utils.py
→
nni
/nni_cmd/url_utils.py
View file @
f98ee672
File moved
tools/nni_cmd
/__init__.py
→
nni/nni_gpu_tool
/__init__.py
View file @
f98ee672
File moved
tools
/nni_gpu_tool/gpu_metrics_collector.py
→
nni
/nni_gpu_tool/gpu_metrics_collector.py
View file @
f98ee672
File moved
tools/nni_gpu
_tool/__init__.py
→
nni/nni_trial
_tool/__init__.py
View file @
f98ee672
File moved
tools
/nni_trial_tool/aml_channel.py
→
nni
/nni_trial_tool/aml_channel.py
View file @
f98ee672
File moved
tools
/nni_trial_tool/base_channel.py
→
nni
/nni_trial_tool/base_channel.py
View file @
f98ee672
File moved
Prev
1
…
12
13
14
15
16
17
18
19
20
…
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