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 precision issue in calibration error #1919

Merged
merged 12 commits into from
Jul 25, 2023

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Jul 13, 2023

What does this PR do?

Fixes #1907
For specific cases the precision in calibration_error seems very important. PR simply make sure that if double precision input is provided, then all parts of the calculation are also initialized in double precision.

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

@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
@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Merging #1919 (4c9c0a5) into master (c7bca4e) will decrease coverage by 36%.
The diff coverage is 100%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1919     +/-   ##
========================================
- Coverage      85%     49%    -36%     
========================================
  Files         263     263             
  Lines       15085   15087      +2     
========================================
- Hits        12831    7428   -5403     
- Misses       2254    7659   +5405     

@mergify mergify bot added the ready label Jul 13, 2023
@mergify mergify bot removed the has conflicts label Jul 25, 2023
@SkafteNicki SkafteNicki merged commit 879595d into master Jul 25, 2023
61 checks passed
@SkafteNicki SkafteNicki deleted the bugfix/calibration_error_precision branch July 25, 2023 10:01
Borda pushed a commit that referenced this pull request Aug 1, 2023
* fix implementation

* add tests

* changelog

* skip on older versions

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* skip testing on older

---------

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Daniel Stancl <46073029+stancld@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

(cherry picked from commit 879595d)
Borda pushed a commit that referenced this pull request Aug 3, 2023
* fix implementation

* add tests

* changelog

* skip on older versions

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* skip testing on older

---------

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Daniel Stancl <46073029+stancld@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

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

for BinaryCalibrationError the n_bins needs to be 1 less than actual to match manual calculation
3 participants