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

Commit

Permalink
catch error
Browse files Browse the repository at this point in the history
  • Loading branch information
Ning Shang committed Dec 10, 2020
1 parent 956a0f0 commit 1325371
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ts/nni_manager/training_service/local/localTrainingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@ class LocalTrainingService implements TrainingService {
}
tkill(trialJob.pid, 'SIGTERM');
const pid = trialJob.pid;
setTimeout((pid: number) => {
if (isAlive(pid)) {
tkill(pid, 'SIGKILL');
}
}, 5 * 1000, 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));

Expand Down

0 comments on commit 1325371

Please sign in to comment.