Skip to content

Calibrate the CS-vs-FA precision tolerances from their measured spread - #1291

Merged
yspolyakov merged 1 commit into
devfrom
issue1290
Sep 8, 2026
Merged

yspolyakov merged 1 commit into
devfrom
issue1290

Conversation

@pascoec

@pascoec pascoec commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Each UTCKKSRNSCSvsFA test compares one COMPOSITESCALINGAUTO run against one FLEXIBLEAUTO run with unseeded randomness, so the precision gap is a random variable. The shared 3.0-bit tolerance sat only ~2.4 standard deviations above the mean gap for the three scenarios with a positive mean, which failed about one run in 200; the failures were not CS precision losses but FA reference runs that happened to land high.

Measure the gap distribution per test (200 runs each, 52 for the two expensive scenarios) and set each tolerance at least 5 standard deviations above its own mean and at most half the pre-fix gap it guards against, so every test stays both stable and sensitive. Hold each tolerance in a named kGapTol constant and build the failure message from it, so the value can no longer desync between the assertion and its message.

Each UTCKKSRNSCSvsFA test compares one COMPOSITESCALINGAUTO run against one
FLEXIBLEAUTO run with unseeded randomness, so the precision gap is a random
variable. The shared 3.0-bit tolerance sat only ~2.4 standard deviations above
the mean gap for the three scenarios with a positive mean, which failed about
one run in 200; the failures were not CS precision losses but FA reference runs
that happened to land high.

Measure the gap distribution per test (200 runs each, 52 for the two expensive
scenarios) and set each tolerance at least 5 standard deviations above its own
mean and at most half the pre-fix gap it guards against, so every test stays
both stable and sensitive. Hold each tolerance in a named kGapTol constant and
build the failure message from it, so the value can no longer desync between
the assertion and its message.
@pascoec pascoec added this to the Release 1.6.0 milestone Sep 4, 2026
@pascoec
pascoec requested a review from yspolyakov September 4, 2026 20:01
@pascoec pascoec self-assigned this Sep 4, 2026
@yspolyakov
yspolyakov merged commit dcc3262 into dev Sep 8, 2026
19 checks passed
@dsuponitskiy
dsuponitskiy deleted the issue1290 branch September 16, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky test: UTCKKSRNSCSvsFA.StCFirstSparseBootstrapLargeModRaiseHeadroom fails ~0.5% of runs

2 participants