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
e9f832df
Unverified
Commit
e9f832df
authored
Dec 15, 2020
by
J-shang
Committed by
GitHub
Dec 15, 2020
Browse files
change SIGKILL to SIGTERM in local mode cancel trial job (#3173)
parent
12a5e3de
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
ts/nni_manager/training_service/local/localTrainingService.ts
...ni_manager/training_service/local/localTrainingService.ts
+14
-1
No files found.
ts/nni_manager/training_service/local/localTrainingService.ts
View file @
e9f832df
...
@@ -253,7 +253,20 @@ class LocalTrainingService implements TrainingService {
...
@@ -253,7 +253,20 @@ class LocalTrainingService implements TrainingService {
return
Promise
.
resolve
();
return
Promise
.
resolve
();
}
}
tkill
(
trialJob
.
pid
,
'
SIGKILL
'
);
tkill
(
trialJob
.
pid
,
'
SIGTERM
'
);
const
startTime
=
Date
.
now
();
while
(
await
isAlive
(
trialJob
.
pid
))
{
if
(
Date
.
now
()
-
startTime
>
4999
)
{
tkill
(
trialJob
.
pid
,
'
SIGKILL
'
,
(
err
)
=>
{
if
(
err
)
{
this
.
log
.
error
(
`kill trial job error:
${
err
}
`
);
}
});
break
;
}
await
delay
(
500
);
}
this
.
setTrialJobStatus
(
trialJob
,
getJobCancelStatus
(
isEarlyStopped
));
this
.
setTrialJobStatus
(
trialJob
,
getJobCancelStatus
(
isEarlyStopped
));
return
Promise
.
resolve
();
return
Promise
.
resolve
();
...
...
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