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

Fix prefix/postfix interaction between MetricCollection and ClasswiseWrapper #1918

Merged
merged 8 commits into from
Jul 25, 2023

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Jul 13, 2023

What does this PR do?

Fixes #1915
The introduction of prefix/postfix (introduced here #1866) arguments in ClasswiseWrapper had some untested interaction with the same arguments in MetricCollection, that leads to the wrong result. PR fixes this with a simple internal renaming and add test.

Before submitting
  • Was this discussed/agreed 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 🙃


📚 Documentation preview 📚: https://torchmetrics--1918.org.readthedocs.build/en/1918/

@SkafteNicki SkafteNicki added the bug / fix Something isn't working label Jul 13, 2023
@SkafteNicki SkafteNicki added this to the v1.0.x milestone Jul 13, 2023
@SkafteNicki SkafteNicki requested a review from Borda as a code owner July 13, 2023 08:31
@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Merging #1918 (85888e2) into master (44afba6) will decrease coverage by 45%.
The diff coverage is 100%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1918     +/-   ##
========================================
- Coverage      85%     40%    -45%     
========================================
  Files         263     263             
  Lines       15087   15087             
========================================
- Hits        12833    6079   -6754     
- Misses       2254    9008   +6754     

@mergify mergify bot added the ready label Jul 13, 2023
@anivegesana
Copy link

@SkafteNicki Thank you for working on this fix!

@justusschock @stancld Is there a timeline for when this bug fix will be reviewed?

@stancld stancld enabled auto-merge (squash) July 24, 2023 20:23
@stancld stancld merged commit c7bca4e into master Jul 25, 2023
61 checks passed
@stancld stancld deleted the bugfix/prefix_postfix_interaction branch July 25, 2023 08:48
Borda pushed a commit that referenced this pull request Aug 1, 2023
…iseWrapper` (#1918)

* fix
* tests
* changelog

(cherry picked from commit c7bca4e)
Borda pushed a commit that referenced this pull request Aug 3, 2023
…iseWrapper` (#1918)

* fix
* tests
* changelog

(cherry picked from commit c7bca4e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug / fix Something isn't working ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ClasswiseWrapper double prefixes with self.prefix when enclosed in a MetricCollection
4 participants