Skip to content

Commit c3fd95a

Browse files
committed
fix typing
1 parent 44bf493 commit c3fd95a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lightning/pytorch/callbacks/early_stopping.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def __init__(
138138
self.wait_count = 0
139139
self.stopped_epoch = 0
140140
self.stopping_reason = EarlyStoppingReason.NOT_STOPPED
141-
self.stopping_reason_message = None
141+
self.stopping_reason_message: Optional[str] = None
142142
self._check_on_train_epoch_end = check_on_train_epoch_end
143143
self.log_rank_zero_only = log_rank_zero_only
144144

@@ -239,7 +239,6 @@ def _run_early_stopping_check(self, trainer: "pl.Trainer") -> None:
239239
trainer.should_stop = trainer.should_stop or should_stop
240240
if should_stop:
241241
self.stopped_epoch = trainer.current_epoch
242-
# Store the stopping reason message
243242
self.stopping_reason_message = reason
244243
if reason and self.verbose:
245244
self._log_info(trainer, reason, self.log_rank_zero_only)

0 commit comments

Comments
 (0)