Skip to content

test(nuts): bound the divergence rate instead of requiring exactly zero - #215

Merged
MaartenMarsman merged 1 commit into
developfrom
test/nuts-divergence-rate
Oct 21, 2026
Merged

MaartenMarsman merged 1 commit into
developfrom
test/nuts-divergence-rate

Conversation

@MaartenMarsman

Copy link
Copy Markdown
Collaborator

NUTS trajectories differ across platforms. The M.2F block in test-mixed-nuts.R has one divergent transition on the Linux x86 runner and none on arm64 with identical seeds, and the weekly certification job has failed on that single assertion every Sunday since 2026-08-09; the sampler-agreement comparisons in the same block pass on both platforms.

Change: the ten assertions in test-mixed-nuts.R and test-ggm-nuts.R that required total_divergences == 0 now require divergence_rate < 1e-3 (the rate the diagnostics already report; 0.1% of post-warmup transitions). One header note per file states the rule. No package code changes.

Verification, locally under the certification gate (BGMS_RUN_SLOW_TESTS and BGMS_RUN_CERTIFICATION set): test-mixed-nuts.R 254 pass / 0 fail, test-ggm-nuts.R 82 pass / 0 fail.

The other weekly failure, the difference-scale reweighting block in test-prior-sensitivity.R, is not touched here: it measures a real limitation of reweighting at a doubled scale and is addressed by the prior-sensitivity engine design.

NUTS trajectories differ across platforms: the M.2F block in
test-mixed-nuts.R has one divergent transition on the Linux x86 runner
and none on arm64, with identical seeds, and the weekly certification
job has failed on it every Sunday since 2026-08-09. The sampler-agreement
comparisons in that block pass on both. The ten exact-zero assertions in
test-mixed-nuts.R and test-ggm-nuts.R now require the divergence rate the
diagnostics already compute to stay below 0.1% of post-warmup
transitions.
@MaartenMarsman
MaartenMarsman merged commit 8fa0886 into develop Oct 21, 2026
7 of 8 checks passed
@MaartenMarsman
MaartenMarsman deleted the test/nuts-divergence-rate branch October 21, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant