Skip to content

Commit 8e99d14

Browse files
committed
update
1 parent 8ab4afa commit 8e99d14

File tree

1 file changed

+2
-1
lines changed
  • src/lightning/pytorch/trainer

1 file changed

+2
-1
lines changed

src/lightning/pytorch/trainer/call.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ def _call_and_handle_interrupt(trainer: "pl.Trainer", trainer_fn: Callable, *arg
5555
rank_zero_warn("Detected KeyboardInterrupt, attempting graceful shutdown...")
5656
# user could press Ctrl+C many times, disable KeyboardInterrupt for shutdown
5757
signal.signal(signal.SIGINT, signal.SIG_IGN)
58+
_interrupt(trainer, exception)
5859
launcher = trainer.strategy.launcher
5960
if isinstance(launcher, _SubprocessScriptLauncher):
6061
launcher.kill(signal.SIGKILL)
61-
exit(0)
62+
exit(1)
6263
except BaseException as exception:
6364
_interrupt(trainer, exception)
6465
trainer._teardown()

0 commit comments

Comments
 (0)