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 label checking in classification #2427

Merged
merged 9 commits into from
Mar 15, 2024

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Mar 5, 2024

What does this PR do?

Fixes #2425
In the case of providing a label tensor for the prediction tensor in classification metrics, the input was not correctly validated. Fixed this, add tests and compressed the code a bit.

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--2427.org.readthedocs.build/en/2427/

@SkafteNicki SkafteNicki added the bug / fix Something isn't working label Mar 5, 2024
@SkafteNicki SkafteNicki added this to the v1.3.x milestone Mar 5, 2024
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Merging #2427 (695c75f) into master (0a6ad01) will decrease coverage by 27%.
The diff coverage is 100%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #2427     +/-   ##
========================================
- Coverage      69%     41%    -27%     
========================================
  Files         307     307             
  Lines       17363   17357      -6     
========================================
- Hits        11961    7201   -4760     
- Misses       5402   10156   +4754     

@mergify mergify bot added the ready label Mar 7, 2024
@Borda Borda enabled auto-merge (squash) March 14, 2024 19:12
@Borda Borda merged commit 5980744 into master Mar 15, 2024
61 checks passed
@Borda Borda deleted the bugfix/label_checking_classification branch March 15, 2024 15:25
Borda pushed a commit that referenced this pull request Mar 16, 2024
* Implementation
* tests
* changelog

(cherry picked from commit 5980744)
Borda pushed a commit that referenced this pull request Mar 18, 2024
* Implementation
* tests
* changelog

(cherry picked from commit 5980744)
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.

Error during argument validation: predictions can not contain ignore_index
3 participants