Skip to content

Commit

Permalink
rename signals list var
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Jun 13, 2020
1 parent 564927f commit 7f218c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytorch_lightning/trainer/training_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def training_step(self, batch, batch_idx):
HOROVOD_AVAILABLE = True

# constant which signals should be catched for graceful trainer shutdown
SIGNAL_TERMINATE = ('SIGTERM', 'SIGSEGV', 'SIGINT')
FATAL_SIGNALS = ('SIGTERM', 'SIGSEGV', 'SIGINT')


class TrainerTrainLoopMixin(ABC):
Expand Down Expand Up @@ -822,7 +822,7 @@ def _signal_kill_handler(sig, frame):
atexit.register(self.run_training_teardown)

orig_signal_handlers = {}
for sig_name in SIGNAL_TERMINATE:
for sig_name in FATAL_SIGNALS:
orig_signal_handlers[sig_name] = signal.signal(
getattr(signal, sig_name), _signal_kill_handler
)
Expand Down

0 comments on commit 7f218c5

Please sign in to comment.