Wandb logger summary max accuracy instead last #7649
Unanswered
ValeKnappich
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment
-
Hey @ValeKnappich, You can use https://docs.wandb.ai/guides/track/log#customize-axes-and-summaries-with-define_metric |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Weights and biases has a summary per run, that shows an aggregation of the metric throughout the run. By default this shows the last value of the respective metric. While this makes sense for some scenarios, it certainly doesn't when using checkpointing; then you would want to compare the best performance. When using plain
wandb
(without lightning) one can update the summary every epoch or after the training asrun.summary["val_acc"] = max(val_acc_values)
.I tried doing the same thing in the Module Hooks (
on_epoch_end
andon_train_end
) but in the end the value will again be just the last value. Since it works fine without lightning, the problem is in the integration. How do I properly tell Lightning to use the best value instead of the last for the wandb summary?Workarounds are appreciated. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions