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

Better support for classwise logging #832

Merged
merged 10 commits into from
Feb 10, 2022
Merged

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Feb 10, 2022

What does this PR do?

Fixes #815
Implement a ClasswiseWrapper that makes it easier to log classification metrics that return multiple values.

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

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 🙃

@codecov
Copy link

codecov bot commented Feb 10, 2022

Codecov Report

Merging #832 (c283269) into master (9daa5e2) will decrease coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #832   +/-   ##
=====================================
- Coverage      95%    95%   -0%     
=====================================
  Files         166    167    +1     
  Lines        6864   6896   +32     
=====================================
+ Hits         6522   6552   +30     
- Misses        342    344    +2     

Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank is soo COOL!!!

"""Test wrapper in combination with metric collection."""
labels = ["horse", "fish", "cat"]
metric = MetricCollection(
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but here it won't share states, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. That is common problem for all the wrappers because we assume that states are not nested when trying to figure out the compute groups.
I can try to come up with a general solution for this problem

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we maybe have a property that kind of forwards the states of the wrapped metrics?

@mergify mergify bot added the ready label Feb 10, 2022
@Borda Borda merged commit 6131d82 into master Feb 10, 2022
@Borda Borda deleted the feature/classwise_wrapper branch February 10, 2022 17:41
@Borda Borda added this to the v0.8 milestone May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improving Classwise Metrics Logging
3 participants