-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test metrics not logging to Comet after training #760
Comments
Did you find a solution? |
I did solve the issue but in a kind of hacky way. It's not that elegant but it works for me, and I haven't had the time to think of a better solution. I solved it by getting the experiment key and creating another logger and trainer with it.
For this to work, I had to modify the
I can happily do the PR if this solution is acceptable for you guys, but I think a better solution can be achieved I haven't had the time to think about it @williamFalcon. |
@williamFalcon Any progress on this Issue? I am facing the same problem. |
@fdelrio89 Since the logger object is available for the lifetime of the trainer, maybe you can refactor to store the |
@xssChauhan good idea, I just submitted a PR (#892) considering this. Thanks! |
I assume that it was fixed by #892 |
Actually I'm still facing the problem. |
@dvirginz are you using the latest master? may you provide a minimal example? |
You are right, sorry. |
I should probably open a new issue, but it happens with Weights & Biases logger too. I haven't had the time to delve deep into it yet. |
🐛 Bug
When testing a model with
Trainer.test
metrics are not logged to Comet if the model was previously trained usingTrainer.fit
. While training metrics are logged correctly.Code sample
Expected behavior
Test metrics should also be logged in to Comet.
Environment
Additional context
I believe the issue is caused because at the end of the training routine,
logger.finalize("success")
is called. This in turn callsexperiment.end()
inside the logger and theExperiment
object doesn't expect to send more information after this.An alternative is to create another
Trainer
object, with another logger but this means that the metrics will be logged into a different Comet experiment from the original. This issue can be solved using theExistingExperiment
object form the Comet SDK, but the solution seems a little hacky and theCometLogger
currently doesn't support this kind of experiment.The text was updated successfully, but these errors were encountered: