Repository navigation
fix(calibrate): the per-type ECE of the report uses the choice bucket temperatures, as served - #24
Merged
Conversation
… temperatures, as served For calibration file 2 the type rows measured ECE with the type temperature only, while basal-serve applies a choice question's option-count bucket temperature first (2.0-mini, 402 labelled decisions: choice 0.060 in the type row, 0.080 as served and in the bucket row). test_calibrate2 checks that the type row equals the bucket row when all choice questions fall in one bucket.
Reviewer's GuideThe PR corrects calibration report type-level ECE to call the serving temperature logic with bucket temperatures, ensuring format-2 choice rows agree with their bucket rows and documenting the behavior. A focused regression test verifies the precedence and preserves format-1 behavior. Sequence diagram for served temperatures in calibration ECEsequenceDiagram
participant Fit as fit()
participant Served as served()
participant ECE as ece()
Fit->>Served: served(cert, shipped_T, shipped_B)
Served-->>Fit: served CERT probabilities
Fit->>ECE: ece(served CERT shipped)
ECE-->>Fit: ece_shipped
Fit->>Served: served(cert, temps, buckets)
Served-->>Fit: served CERT probabilities
Fit->>ECE: ece(served CERT fitted)
ECE-->>Fit: ece
alt format-2 choice question
Served->>Served: apply option-count bucket temperature
Served->>Served: apply type temperature
else format-1 question
Served->>Served: use type temperature
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Owner
|
Thanks! Merged for basal 2.3.1. The per-type ECE line now uses the temperatures as |
rkinas
added a commit
that referenced
this pull request
Nov 2, 2026
The short README drops its sections for 2.4.1 back to 2.0 and its previous-releases text. What they had and WHATS_NEW.md did not moves here: the 2.4.1 H100 start-up numbers, the 2.3.x community credits for #18, #21, #24 and #25, the precise 2.3 eager baselines, the 2.2 calibration summary and example, the release-note links for 2.1 to 2.3, and basal-1.5 / basal-1.0 under 'Previous releases'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
For a calibration file 2 (prompt-format-2 models),
basal-servetempers achoicequestion with its option-countbucket temperature before the type temperature (
server.temperature). The type rows of thebasal-calibratereportmeasured "ECE on CERT shipped -> fitted" with the type temperature only:
The bucket rows under it, the thresholds and the LOFO gate already pass the buckets. So the
choicerow disagreeswith the bucket row below it. On the 402 labelled decisions from #19 (basal-2.0-mini, shipped file,
--from-rows --report-only):0.060 is not what is served; 0.080 is.
Change
fit(): the type rows passshipped_B/bucketstoserved(), like the bucket rows. For format 1 the buckets areempty, so nothing changes there.
tests/test_calibrate2.py::test_type_ece_uses_the_bucket_temperature_as_served: allchoicerows in one bucketwith a shipped bucket temperature that differs from the type temperature; the type row must equal the bucket row.
It fails on main (0.123 vs 0.060) and passes here.
After the change the same report reads
choice ... 0.080 -> 0.027, equal to the bucket row.Verification
Refs #19
Summary by Sourcery
Measure calibration report ECE using the same temperature hierarchy that basal-serve applies.
Bug Fixes:
Enhancements:
Documentation:
Tests: