test: drop flaky joint-vs-single assertion in LPV multi-dataset test - #199
Merged
Conversation
The final assertion `e1 < e2_only1` was both apples-to-oranges (joint-fit training error on d1 vs single-d1-fit held-out error on d2) and, even after fixing the names to `e2 < e2_only1`, would still be flaky: with σy = 0.005 the noise floor is ~2.5e-5, and both quantities saturate there because the true LPV system is identical across d1 and d2 and a 2-state, 22-parameter model fit to 1200 samples already recovers θ to within noise. The "joint beats single" signal does not exist in this regime — the relative ordering is just BFGS noise. The remaining assertions (shape of x0_mat, per-dataset MSE bounds) still validate that the multi-dataset path runs to completion, gives each dataset its own initial state, and explains both datasets well. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #199 +/- ##
=======================================
Coverage 89.49% 89.49%
=======================================
Files 15 15
Lines 2722 2722
=======================================
Hits 2436 2436
Misses 286 286
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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.
Summary
LPV PEM multi-datasettestset (test/test_lpv.jl:145), which has been failing intermittently on CI.Root cause
The failing assertion was
@test e1 < e2_only1, comparing the joint-fit's training error on d1 against the single-d1-fit's held-out error on d2 — apples-to-oranges. Even after fixing the names to the obviously-intendede2 < e2_only1, the comparison would remain flaky:σy = 0.005⟹ noise floor~2.5e-5.simulate_affine_lpvfactory, different seeds for input/noise/λ trajectory only).e_jointande_only1therefore saturate at the noise floor, and the relative ordering is just BFGS/optimizer noise.Sample failure (deterministic on Julia 1.12 / ubuntu-latest):
What remains
The multi-dataset path is still adequately covered by:
size(x0_mat) == (2, 2)— one initial-state column per experiment.all(isfinite, x0_mat)— optimizer didn't blow up.e1 < 0.05ande2 < 0.05— joint fit explains both datasets within bound.To revive a genuine joint-beats-single signal we'd need disjoint λ-coverage across experiments (so a single-dataset fit is data-poor in the other half) — happy to do that in a follow-up if useful.
Test plan