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

Bugfix for classwise wrapper compute logic #1225

Merged
merged 10 commits into from
Sep 16, 2022

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Sep 15, 2022

What does this PR do?

Fixes #1220
Some of the logic in _wrap_update and _wrap_compute was messing with the compute method in the ClasswiseWrapper. This PR makes them empty wrappers for that metric and also adds relevant testing.

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 🙃

@SkafteNicki SkafteNicki added the bug / fix Something isn't working label Sep 15, 2022
@SkafteNicki SkafteNicki added this to the v0.10 milestone Sep 15, 2022
@SkafteNicki SkafteNicki changed the title Bugfix/classwise wrapper forward Bugfix for classwise wrapper compute logic Sep 15, 2022
@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Merging #1225 (c6b2e39) into master (3fd3dc4) will decrease coverage by 48%.
The diff coverage is 100%.

@@           Coverage Diff            @@
##           master   #1225     +/-   ##
========================================
- Coverage      86%     37%    -48%     
========================================
  Files         191     191             
  Lines       11319   11325      +6     
========================================
- Hits         9699    4235   -5464     
- Misses       1620    7090   +5470     

@Borda Borda enabled auto-merge (squash) September 15, 2022 07:52
@mergify mergify bot added the ready label Sep 15, 2022
src/torchmetrics/wrappers/classwise.py Outdated Show resolved Hide resolved
src/torchmetrics/wrappers/classwise.py Outdated Show resolved Hide resolved
@mergify mergify bot removed the has conflicts label Sep 15, 2022
@Borda Borda merged commit 5659805 into master Sep 16, 2022
@Borda Borda deleted the bugfix/classwise_wrapper_forward branch September 16, 2022 13:00
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.

__call__ using ClassWrapper does not update wrapped metric
3 participants