Skip to content

Commit

Permalink
Fix sigterm signal handling (#10189)
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Mocholí <[email protected]>
  • Loading branch information
awaelchli and carmocca authored Oct 29, 2021
1 parent 255e3ed commit 6ed7a0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed creation of `dirpath` in `BaseProfiler` if it doesn't exist ([#10073](https://github.com/PyTorchLightning/pytorch-lightning/pull/10073))


- Fixed an issue with `pl.utilities.seed.reset_seed` converting the `PL_SEED_WORKERS` environment variable to `bool` ([#10099](https://github.com/PyTorchLightning/pytorch-lightning/pull/10099))
- Fixed incorrect handling of sigterm ([#10189](https://github.com/PyTorchLightning/pytorch-lightning/pull/10189))


- Fixed an issue with `pl.utilities.seed.reset_seed` converting the `PL_SEED_WORKERS` environment variable to `bool` ([#10099](https://github.com/PyTorchLightning/pytorch-lightning/pull/10099))


## [1.4.9] - 2021-09-30
Expand Down
3 changes: 1 addition & 2 deletions pytorch_lightning/trainer/connectors/signal_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ def register_signal_handlers(self) -> None:
if self._is_on_slurm():
log.info("Set SLURM handle signals.")
sigusr1_handlers.append(self.slurm_sigusr1_handler_fn)

sigterm_handlers.append(self.sigterm_handler_fn)
sigterm_handlers.append(self.sigterm_handler_fn)

# signal.SIGUSR1 doesn't seem available on windows
if not self._is_on_windows():
Expand Down

0 comments on commit 6ed7a0c

Please sign in to comment.