Commit 2a91af7
Fix val_loss metric key ambiguity for HPO callbacks
With on_step=True and on_epoch=True, Lightning creates val_loss_step
and val_loss_epoch keys, making the plain val_loss key unreliable in
callback_metrics. This caused ModelCheckpoint, EarlyStopping, and the
HPO trial result to silently fail. Setting on_step=False ensures the
metric is logged only as val_loss at epoch end.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 23a0aa4 commit 2a91af7
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
0 commit comments