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
1256eb63
Unverified
Commit
1256eb63
authored
Jan 27, 2022
by
liuzhe-lz
Committed by
GitHub
Jan 27, 2022
Browse files
Create soft link "_latest" in nni-experiments (#4476)
parent
763f2c87
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
nni/experiment/launcher.py
nni/experiment/launcher.py
+10
-2
No files found.
nni/experiment/launcher.py
View file @
1256eb63
...
...
@@ -110,8 +110,6 @@ def start_experiment(action, exp_id, config, port, debug, run_mode, url_prefix):
_logger
.
info
(
'Setting up...'
)
rest
.
post
(
port
,
'/experiment'
,
config
.
json
(),
url_prefix
)
return
proc
except
Exception
as
e
:
_logger
.
error
(
'Create experiment failed'
)
if
proc
is
not
None
:
...
...
@@ -119,6 +117,16 @@ def start_experiment(action, exp_id, config, port, debug, run_mode, url_prefix):
proc
.
kill
()
raise
e
link
=
Path
(
config
.
experiment_working_directory
,
'_latest'
)
try
:
link
.
unlink
(
missing_ok
=
True
)
link
.
symlink_to
(
exp_id
,
target_is_directory
=
True
)
except
Exception
:
if
sys
.
platform
!=
'win32'
:
_logger
.
warning
(
f
'Failed to create link
{
link
}
'
)
return
proc
def
_start_rest_server
(
nni_manager_args
,
run_mode
)
->
Tuple
[
int
,
Popen
]:
node_dir
=
Path
(
nni_node
.
__path__
[
0
])
node
=
str
(
node_dir
/
(
'node.exe'
if
sys
.
platform
==
'win32'
else
'node'
))
...
...
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