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
098d89af
Unverified
Commit
098d89af
authored
Jan 05, 2021
by
J-shang
Committed by
GitHub
Jan 05, 2021
Browse files
fix process early exit and handle invalid in windows (#3258)
parent
7a1f09d9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
nni/experiment/launcher.py
nni/experiment/launcher.py
+7
-1
nni/experiment/pipe.py
nni/experiment/pipe.py
+0
-1
No files found.
nni/experiment/launcher.py
View file @
098d89af
...
@@ -88,7 +88,13 @@ def _start_rest_server(config: ExperimentConfig, port: int, debug: bool, experim
...
@@ -88,7 +88,13 @@ def _start_rest_server(config: ExperimentConfig, port: int, debug: bool, experim
for
arg_key
,
arg_value
in
args
.
items
():
for
arg_key
,
arg_value
in
args
.
items
():
cmd
.
append
(
'--'
+
arg_key
)
cmd
.
append
(
'--'
+
arg_key
)
cmd
.
append
(
str
(
arg_value
))
cmd
.
append
(
str
(
arg_value
))
return
int
(
time
.
time
()
*
1000
),
Popen
(
cmd
,
cwd
=
node_dir
)
if
sys
.
platform
==
'win32'
:
from
subprocess
import
CREATE_NEW_PROCESS_GROUP
proc
=
Popen
(
cmd
,
cwd
=
node_dir
,
creationflags
=
CREATE_NEW_PROCESS_GROUP
)
else
:
proc
=
Popen
(
cmd
,
cwd
=
node_dir
)
return
int
(
time
.
time
()
*
1000
),
proc
def
_check_rest_server
(
port
:
int
,
retry
:
int
=
3
)
->
None
:
def
_check_rest_server
(
port
:
int
,
retry
:
int
=
3
)
->
None
:
...
...
nni/experiment/pipe.py
View file @
098d89af
...
@@ -31,7 +31,6 @@ if sys.platform == 'win32':
...
@@ -31,7 +31,6 @@ if sys.platform == 'win32':
def
close
(
self
)
->
None
:
def
close
(
self
)
->
None
:
if
self
.
file
is
not
None
:
if
self
.
file
is
not
None
:
self
.
file
.
close
()
self
.
file
.
close
()
_winapi
.
CloseHandle
(
self
.
_handle
)
Pipe
=
WindowsPipe
Pipe
=
WindowsPipe
...
...
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