Skip to content

Commit 1440fdc

Browse files
committed
fix: reset the epoch-dedup tracker per run
Reset `_logged_epoch_step` in `reset_metrics` (called once per fit/validate/test run, not per epoch) so the convenience `epoch` metric is re-emitted at the start of a fresh run instead of being suppressed when a standalone validate/test happens to reuse the same (step, epoch) as the preceding fit.
1 parent ae1f8e8 commit 1440fdc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/lightning/pytorch/trainer/connectors/logger_connector/logger_connector.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ def reset_metrics(self) -> None:
241241
self._progress_bar_metrics = {}
242242
self._logged_metrics = {}
243243
self._callback_metrics = {}
244+
# reset per-run so the convenience `epoch` metric is re-emitted at the start of a
245+
# fresh fit/validate/test run (this is called per-run, not per-epoch)
246+
self._logged_epoch_step = None
244247

245248
def reset_results(self) -> None:
246249
results = self.trainer._results

0 commit comments

Comments
 (0)