#1312·burn

train: metrics of the first resumed epoch are written to epoch-1

Author: jmspiewakCreated Feb 14, 2024Updated Sep 29, 2026
Labelsbugquestion

Describe the bug When restarting from a checkpoint (say epoch X) during the first epoch after restart metrics are stored to train/epoch-1 instead of train/epoch-{X+1}. The next epoch is correctly stored to train/epoch-{X+2}.

To Reproduce

  1. Train for a few epochs.
  2. Restart training from a checkpoint.
  3. Check stored metrics.

Expected behavior Metrics should be stored to the correct folder (train/epoch-{X+1}).

Desktop (please complete the following information):

  • OS: Linux

Additional context I've got a fix here: https://github.com/jmspiewak/burn/commit/54c7d4e5f9dcb6200de922560e8e39b878be7672. If you think it's fine I'll submit a PR.