Skip to content

Fix bugs in multicalibration library (#257)#257

Closed
TaXxER wants to merge 1 commit intomainfrom
export-D98852527
Closed

Fix bugs in multicalibration library (#257)#257
TaXxER wants to merge 1 commit intomainfrom
export-D98852527

Conversation

@TaXxER
Copy link
Copy Markdown
Contributor

@TaXxER TaXxER commented Mar 31, 2026

Summary:

Bug: Wrong variable validated in calibration_free_normalized_entropy (metrics.py:1401)
The shape check validated labels instead of predicted_scores. This meant 2D prediction arrays (e.g., multi-class probabilities) were silently accepted, producing incorrect results, while 2D label arrays were incorrectly rejected.

Differential Revision: D98852527

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 31, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 31, 2026

@TaXxER has exported this pull request. If you are a Meta employee, you can view the originating Diff in D98852527.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.13%. Comparing base (25b1a59) to head (4cbfa15).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #257      +/-   ##
==========================================
+ Coverage   96.08%   96.13%   +0.05%     
==========================================
  Files           9        9              
  Lines        1917     1917              
==========================================
+ Hits         1842     1843       +1     
+ Misses         75       74       -1     
Flag Coverage Δ
unittests 96.13% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Summary:

**Bug: Wrong variable validated in `calibration_free_normalized_entropy` (metrics.py:1401)**
The shape check validated `labels` instead of `predicted_scores`. This meant 2D prediction arrays (e.g., multi-class probabilities) were silently accepted, producing incorrect results, while 2D label arrays were incorrectly rejected.

Differential Revision: D98852527
@meta-codesync meta-codesync bot changed the title Fix two bugs in multicalibration library Fix bugs in multicalibration library (#257) Mar 31, 2026
@meta-codesync meta-codesync bot closed this in 613b591 Apr 2, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 2, 2026

This pull request has been merged in 613b591.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant