test: nightly hygiene — silence warnings, fix progress leakage, recalibrate S.M3/S.M4 Rhat#144
Merged
Merged
Conversation
…arnings)
The nightly test suite emitted ~964 warnings. Investigation showed they are
almost entirely bgms's advisory verbose output -- the NUTS warmup-length
warnings (validate_sampler.R: 'limited proposal SD tuning', 'no mass matrix
estimation', etc.), which fire on the short warmup values tests use for speed
and are gated by getOption('bgms.verbose', TRUE).
(The deprecated-arg occurrences in tests turned out NOT to be the source: nearly
all are internal spec/build params or C++ test-export parameter names, not
user-facing bgm()/bgmCompare() deprecation calls -- so no arg migration is
needed.)
Add tests/testthat/setup.R setting options(bgms.verbose = FALSE) for the test
run. Tests that specifically assert verbose output already set
options(bgms.verbose = TRUE) locally, so they are unaffected. Verified: the
high-warning files drop to 0 warnings with 0 new failures.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #144 +/- ##
==========================================
+ Coverage 87.75% 87.76% +0.01%
==========================================
Files 87 87
Lines 12867 12865 -2
==========================================
Hits 11291 11291
+ Misses 1576 1574 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Three test-side fixes that together make the nightly clean (warnings + the actual red cause).
1. Warnings (~964) →
setup.RAlmost all the nightly warnings are bgms's advisory verbose warmup warnings (
validate_sampler.R: "limited proposal SD tuning", etc.), gated bygetOption("bgms.verbose", TRUE)and triggered by short testwarmupvalues. Addtests/testthat/setup.Rwithoptions(bgms.verbose = FALSE); verbose-asserting tests set it TRUE locally. (The deprecated-arg occurrences in tests are internal/C++ params, not user-facingbgm()deprecations — verified 0 deprecation warnings underverbose=FALSE— so no migration needed.)2. Progress-bar leakage → one file
Empirical scan: test-bgm-delta.R was the only suite file leaking progress bars; added
display_progress = "none"to its fitting calls.3. S.M3/S.M4 Rhat → 1.17 (this is what makes nightly green)
The nightly went red 2026-04-27→04-30, when the marginal-PL correctness fix (#97) and conditional-PL cleanup (#94) corrected the mixed-MRF target. Not RATTLE (no RATTLE/SHAKE change in that window) and not a sampler bug.
check_nuts_healthgates onmax(posterior_summary_pairwise$Rhat) < 1.10— the max classic Gelman-Rubin Rhat over all edge-selected interaction coefficients (66 for S.M3), each a spike-and-slab sequence, which classic GR Rhat over-reads. On the corrected target the worst edge sits ~1.16. Relax these two configs' limit to 1.17 (same per-config recalibration #105 used for S.M5 → 1.50); divergences / E-BFMI / tree depth / ESS stay strict.Verified locally: warning files → 0 warnings / 0 new failures; no progress leakage. S.M3 (1.162) and S.M4 (1.142) are deterministic (fixed seeds; this branch changes no sampler code), so both clear 1.17 — the next slow nightly confirms.