-
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
[Metrics] MetricCollection #4318
[Metrics] MetricCollection #4318
Conversation
Co-authored-by: Teddy Koker <[email protected]>
Co-authored-by: Teddy Koker <[email protected]>
Co-authored-by: Teddy Koker <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just I think that have seen some other metric collection from @tchaton?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jury-rigged a similar class for my own project, glad to see a formalized API!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job ! Small ideas to consider.
…metric_collection
Co-authored-by: Jirka Borovec <[email protected]>
Hi, it seems that the Edit: |
Hi @chris-clem, |
Hi @SkafteNicki, |
@xfffrank I see your point. We are going to release v1.3 of lightning soon and then stable will instead take you to this page https://pytorch-lightning.readthedocs.io/en/latest/extensions/metrics.html which will redirect you to the torchmetrics documentation. |
But I need to manually install torchmetrics 0.3.0 to have the "prefix" argument. |
Yes, torchmetrics 0.3.0 is in rc right now, which can be installed as: |
What does this PR do?
Adds generic
MetricCollection
object to chain together multipleMetric
objects.I seen both on slack and here on github (#4255) that users are defining dictionaries of metrics, to easy evaluate multiple at once. This PR adds support for this by introducing the
MetricCollection
object that can wrap multiple metrics into a single callable metric.Also adds a
prefix
argument toself.log_dict
such that users easily can reuse the sameMetricCollection
in both train, val, test.Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃