Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
change SIGKILL to SIGTERM in local cancel trial job
Browse files Browse the repository at this point in the history
  • Loading branch information
Ning Shang committed Dec 10, 2020
1 parent dbb2434 commit 533d8bd
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,14 @@ class LocalTrainingService implements TrainingService {

return Promise.resolve();
}
tkill(trialJob.pid, 'SIGKILL');
tkill(trialJob.pid, 'SIGTERM');
const pid = trialJob.pid;
setTimeout(((pid: number) => {
tkill(pid, 'SIGKILL', (err) => {
this.log.warning(`cancel trial job {pid: ${pid}} failed: ${err?.message}`);
});
}).bind(this), 5 * 1000, pid);

this.setTrialJobStatus(trialJob, getJobCancelStatus(isEarlyStopped));

return Promise.resolve();
Expand Down

0 comments on commit 533d8bd

Please sign in to comment.