Skip to content
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

How can I retrieve metrics from training and testing #1768

Closed
Uroc327 opened this issue May 9, 2020 · 2 comments
Closed

How can I retrieve metrics from training and testing #1768

Uroc327 opened this issue May 9, 2020 · 2 comments
Labels
question Further information is requested won't fix This will not be worked on

Comments

@Uroc327
Copy link

Uroc327 commented May 9, 2020

❓ Questions and Help

How can I extract the metrics returned from training_step, training_epoch_end, validation_step, validation_epoch_end, test_step, test_epoch_end after a train() or a test() run?

I'd like to return some dictionary (e.g. {'loss': ..., 'log': ..., 'param a: 'a', 'param b': 'b', 'param c': {...}}) from e.g. test_epoch_end and retrieve this after calling trainer.test(net). It seems like the data is available some where, as the Weights and Biases logger prints at least the training metrics before uploading. Where can I find those metrics from training and testing?

@Uroc327 Uroc327 added the question Further information is requested label May 9, 2020
@appleparan
Copy link

It seems it's a duplicate. See #1694 .
BTW, If you need just postprocessing, I hacked this problem by putting everything (including plotting, I/O, etc.) in test_epoch_end . I think it's not best practice but I also couldn't find any method to get the test result.

I just write the file that records what I need. After then, I write another script to process the file. I wish this helps you.

@stale
Copy link

stale bot commented Jul 19, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the won't fix This will not be worked on label Jul 19, 2020
@stale stale bot closed this as completed Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested won't fix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants