-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logs are logged twice with on_step=True and on_epoch=True #4100
Comments
The strategy in the code is always log the original metric. Even if he looks weird, but i don't think this is a bug. |
|
In my opinion, if you want to monitor the metric you defined in callback funciton (like ModelCheckpoint), any suffix or prefix should not add to your metric_name. I don't know if this is the reason. |
Hey @rohitgr7,
I used @rohitgr7 Please correct me if I am wrong, but you are suggesting IMO, I think it is a design choice from @williamFalcon to save a duplicated value, so the user can refer to it from its original logged key. Best regards, |
yeah, that's right. When you log something at both step and epoch, how do we title it correctly? that's where we add the _step and _epoch. But, when the user wants the metric directly, they rarely do metric_step but instead use the metric directly. Open to suggestions about avoiding double logging. Maybe one option is to not add a _step metric but instead use the original one as named? i think there were issues with that too though. |
ModelCheckpoint might not work if you do this, since it will monitor _step metric rather than _epoch metric. IMO a warning or info should be raised in case both
|
I believe it's fixed here #4169 |
馃悰 Bug
Logs are logged twice with
on_step=True
andon_epoch=True
To Reproduce
Code:
https://gist.github.com/rohitgr7/9322f92daee7d1991b836abd9f7b63f1
Expected behavior
Should log only
train_loss_step
andtrain_loss_epoch
.Environment
Please copy and paste the output from our
ptl
topl
聽#52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020Additional context
The text was updated successfully, but these errors were encountered: