Skip to content

What's the difference between on_step and on_epoch of pl_module.log #8806

Discussion options

You must be logged in to vote

Dear @marsggbo,

When using self.log(..., on_step=True), this will compute the metric per step locally as synchronisation adds performance hit.
When using self.log(..., on_step=True, sync_dist=True), this will compute the metric per step across GPUS.
When using self.log(..., on_epoch=True), this will compute the metrics across GPUS and epoch batches automatically.

Best,
T.C

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@marsggbo
Comment options

@marsggbo
Comment options

@rohitgr7
Comment options

Answer selected by rohitgr7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment