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 bootstrapping with few samples #2052

Merged
merged 6 commits into from
Sep 6, 2023
Merged

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Sep 4, 2023

What does this PR do?

Fixes #2048
If bootstrapping is used with very little samples, there is a non-zero chance that non of them should be included in the bootstrap, which can lead to the underlying metric failing. Implements fix for this.

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

@SkafteNicki SkafteNicki added the bug / fix Something isn't working label Sep 4, 2023
@SkafteNicki SkafteNicki added this to the v1.1.x milestone Sep 4, 2023
@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Merging #2052 (2d3261a) into master (ca9fe3d) will decrease coverage by 48%.
Report is 1 commits behind head on master.
The diff coverage is 55%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #2052     +/-   ##
========================================
- Coverage      87%     39%    -48%     
========================================
  Files         281     281             
  Lines       15884   15886      +2     
========================================
- Hits        13781    6191   -7590     
- Misses       2103    9695   +7592     

@mergify mergify bot added the ready label Sep 4, 2023
@mergify mergify bot removed the ready label Sep 4, 2023
@SkafteNicki SkafteNicki enabled auto-merge (squash) September 6, 2023 10:03
@mergify mergify bot removed the has conflicts label Sep 6, 2023
@SkafteNicki SkafteNicki merged commit 8d82db0 into master Sep 6, 2023
66 checks passed
@SkafteNicki SkafteNicki deleted the bugfix/bootstrapping branch September 6, 2023 14:19
Borda pushed a commit that referenced this pull request Sep 9, 2023
* fix

* test

* changelog

(cherry picked from commit 8d82db0)
Borda pushed a commit that referenced this pull request Sep 11, 2023
* fix

* test

* changelog

(cherry picked from commit 8d82db0)
matsumotosan pushed a commit to matsumotosan/metrics that referenced this pull request Sep 19, 2023
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.

BootStrapper(F1Score(average=None)) update fails when only some classes are present in batch
3 participants