Lightning-AI/pytorch-lightning

Make logging_mode (`on_step` or `on_epoch`) available to loggers

Open

#20,502 建立於 2024年12月17日

在 GitHub 查看
 (5 留言) (0 反應) (0 負責人)Python (3,233 fork)batch import
featurehelp wanted

倉庫指標

Star
 (26,687 star)
PR 合併指標
 (平均合併 9天 15小時) (30 天內合併 3 個 PR)

描述

Description & Motivation

Lightning lets you log on_step, or on_epoch. However, even when using on_epoch, the global step is logged on the x-axis, not the epoch number.

Loggers can manually extract epoch from the logged metrics and pass that as the step. However, this would break on_step logging.

Making the logging mode for a logging call available would let loggers conditionally use either the global_step or current_epoch as the step for that particular metric.

Pitch

No response

Alternatives

No response

Additional context

No response

cc @lantiga @borda

貢獻者指南