Repository navigation
differential: a model's checks share its cap, and a kill keeps what finished - #1321
Merged
Merged
Conversation
…inished The pool kills a model's worker at its cap (900 s on the nightly), and every row of the model with it. MODEL1006230049, 0053 and 0077 take 716-751 s of that on main, so any check a pull request added to every model turned all their rows TIMEOUT: lanl#1315, lanl#1318 and lanl#1319 each read 27-36 regressions, none of them a finding. check_all now takes a deadline, 0.9 of the cap. Every run has until it (run(timeout=)), no run or check starts past it, and a check that does not finish is its own TIMEOUT, said why. Each verdict is written as it is reached, so a worker the pool still kills (one compiling C past the deadline, which no run's timeout bounds) leaves the runner every row it finished; only the rest are TIMEOUT.
Montana
added a commit
to Montana/bngsim
that referenced
this pull request
Oct 27, 2026
…leaks restart, reuse and batch run after every check main runs, each run and run_batch with what is left of the model's cap; run_until takes no timeout, and a kill at the cap still leaves the model's other rows.
Montana
added a commit
to Montana/bngsim
that referenced
this pull request
Oct 27, 2026
…-vs-run steady_vs_run and newton_vs_run run after every check main runs, the runs to equilibrium bounded by what is left of the cap. A reference run the cap stops is this check's TIMEOUT, not a missing reference; steady_state() takes no timeout, and a kill still leaves the other rows.
Montana
added a commit
to Montana/bngsim
that referenced
this pull request
Oct 27, 2026
…ution lanl#1321 bounds every run by the model's cap, which replaces the deadline 6357188 threaded through stable and the arms alone. The order stays: main's checks, then the attribution's arms, then stable, each starting only with time left. A stable the cap stops is TIMEOUT, as any check's is under lanl#1321, where it was SKIP.
This was referenced Oct 27, 2026
With lanl#1321, PRs stacked on this one still read 11-12 regressions: main's own checks on MODEL1006230049 and 0053 did not fit the 810 s deadline of a 900 s cap. Across five runs of the same checks those models took 689-894 s, so the cap flipped their rows with runner speed. 1500 s puts the deadline at 1350, and costs only the few models that use it.
Montana
added a commit
to Montana/bngsim
that referenced
this pull request
Oct 27, 2026
…degen check_all keeps lanl#1321's deadline and its verdicts-as-reached; an SSA job is routed to check_ssa inside it, so its verdicts are kept the same way.
Montana
added a commit
to Montana/bngsim
that referenced
this pull request
Oct 27, 2026
An NF job is routed to check_nf inside lanl#1321's check_all, as an SSA job to check_ssa, so its verdicts are kept the same way.
…rash With the 1500 s cap this PR's nightly read 2 new crashes, both BIOMD0000000385: given the time to reach its codegen compile, 4.2 MB of C ran past bngsim's 600 s compile limit, which codegen=True reports as a RuntimeError. Those rows were TIMEOUT at 900 s, and a timeout they stay: one anywhere in the cause chain, or in codegen=True's refusal, which carries the compile's timeout in its text and not as its cause. The other five rows of the model went TIMEOUT -> PASS.
…before the cap Three things the review of lanl#1321 found, each pinned by a test that fails without the fix: - The locale child's own 600 s limit read as the model's cap: TIMEOUT, "not finished within the model's cap". Before the cap it read EXCEPTION, and a run a comma-decimal locale stalls, where the run under C finished, is that check's finding: from a DIFF or SKIP baseline the gate alerts on a new crash, and only files a TIMEOUT as changed. Only a limit the deadline set is the cap's now. - A worker that died after keeping rows gave the rest the note "cap of 900 s": nothing reached the cap. They now say the worker died, and its exit code. - A worker that raised past check_all dropped the rows it had kept, so a check that passed read EXCEPTION. What a worker finished stands however it ends; one block in to_results instead of two. The spent-cap test now asks for TIMEOUT on every row (it allowed SKIP, so a check skipping past the deadline went unseen), and the docs name the timeout verdict.
wshlavacek
added a commit
to Montana/bngsim
that referenced
this pull request
Oct 28, 2026
…onent of a number alone (lanl#1305) A model's checks share its cap (lanl#1321), and every check added since runs after main's. The transforms ran in main's loop, ahead of locale: four more runs that could tip a slow model's locale row (MODEL1006230049, 0053, 0077 already take 689-894 s), which the baseline holds as PASS, to TIMEOUT. _subst matched names inside numeric literals: with a parameter named e1, 2e1*e1 became 2mt_p1*mt_p1, which does not load. The branch also merges lanl/main, which it conflicted with (check_all's deadline, lanl#1321).
wshlavacek
added a commit
to Montana/bngsim
that referenced
this pull request
Oct 28, 2026
) verdicts.json of this PR's Path-agreement run 40721476951, on 18c677c merged with main at 9a26f5b. Every row main's checks give is the same as in main's scheduled night 40712357505 (lanl#1367 re-baselines main from it), plus this PR's 1,353 jacobian_values rows. Against the old file: - BIOMD0000000338|klu_vs_dense PASS -> EXCEPTION, from main (lanl#1302, lanl#1304); - BIOMD0000000385|ajac_vs_fdjac and |klu_vs_dense TIMEOUT -> PASS (lanl#1321); - MODEL1112050001|jacobian_values SKIP -> PASS (its base ran this time); - MODEL1006230049|jacobian_values TIMEOUT -> SKIP, no analytic Jacobian; - the seven models Model.jacobian() refuses stay SKIP (18c677c).
wshlavacek
added a commit
to Montana/bngsim
that referenced
this pull request
Oct 28, 2026
…a26f5b (lanl#1302, lanl#1304) verdicts.json of scheduled run 40712357505 on main at 9a26f5b, byte for byte. Three cases move, and no others: - BIOMD0000000338|klu_vs_dense PASS -> EXCEPTION. Since lanl#1302, the forced-dense jacobian="fd" leg fails at t = 0.72 (CV_CONV_FAILURE) on every Linux runner; the KLU leg completes (ajac_vs_fdjac, the same KLU run bit for bit, passes). The model is lanl#1304's. - BIOMD0000000385|ajac_vs_fdjac and |klu_vs_dense TIMEOUT -> PASS. The old file is lanl#1291's run, where the pool killed every row at the 900 s cap; with lanl#1321's per-check deadlines and the 1500 s cap these two finish.
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.
Follow-up to #1291 (#1257).
Why
The pool kills a model's worker at its cap (
--timeout 900on the nightly), and every row of the model goes with it. On main, MODEL1006230049, 0053 and 0077 already take 716–751 s of that 900 (run 40440170341). So any check a pull request adds to every model tips them over, and every check they passed before reads TIMEOUT. The baseline gate counts each of those as a regression:None is a finding. #1315's own baseline run even had these three passing, so they are also flaky at the edge, depending on runner speed.
What
A deadline per model.
check_all(job, locale, checks, deadline)takes 0.9 of the cap (CAP_SHARE):run(timeout=), and the sparsity rule's one-interval runs);backend_as_askedbuilds and compiles Simulators without running them, so no run's timeout bounds it; on MODEL1006230049 it started past a 180 s deadline and took the worker to 203 s.A check that doesn't finish is its own TIMEOUT, "not finished within the model's cap", and the model keeps every other row. A base that doesn't finish makes every row TIMEOUT rather than
no_base, and a sensitivity run that times out is TIMEOUT rather than a refusal.What a kill leaves. A constructor can still run past the deadline: deriving the sensitivity RHS takes 20 s, compiling C up to 50 s on these models. So each verdict is written as it is reached (
on_verdict, then_keep, to a per-model file in a temp directory). When the pool kills a worker,to_resultskeeps every row it finished, and only the rest are TIMEOUT.Without a deadline (any caller but the runner), nothing changes.
The cap itself (second commit)
With this PR merged into them, #1315, #1318, #1319 and #1320 still read 11–12 regressions. Main's own checks on MODEL1006230049 and 0053 did not fit the 810 s deadline: across five CI runs of the same checks those models took 689–894 s, so a 900 s cap flipped their rows with runner speed. The job's cap is now 1500 s (deadline 1350). It costs only the few models that use it: this PR's own job took 51 of its 180 minutes. Models that timed out at 900 s may now finish, which reads as improved, not as an alert.
A compile past bngsim's own limit (third commit)
With the 1500 s cap, this PR's nightly read 2 new crashes, both on BIOMD0000000385. Given the time to reach its codegen compile, its 4.2 MB of C ran past bngsim's own 600 s compile limit.
codegen=Truereports that as aRuntimeError, and the harness read it as EXCEPTION. Those rows were TIMEOUT at 900 s, and a timeout they stay._timed_outnow reads a timeout:TimeoutExpired);codegen=True's refusal carries without chaining its cause.The row's note says the compile timed out, not the model's cap. A compile that fails is still EXCEPTION. The model's other five rows went TIMEOUT → PASS ("improved", not an alert).
Tests: the in-text and the chained case are both TIMEOUT, and a compile failure stays EXCEPTION. Mutations, each caught: the chain walk off; the text match off.
Verified
End to end through the runner on the three models, at a deliberately tight
--timeout 200(3 workers, 194 s):grid,sparsity_covers_jacobian,backend_as_askedTIMEOUTcc_vs_mir,grid,sparsity_covers_jacobian,backend_as_askedTIMEOUTAt the nightly's 900 s their checks finish (716–751 s) inside the 810 s deadline as before, so main's verdicts are unchanged. A check a pull request adds then runs in what is left, and is TIMEOUT on its own row, which is a new case and not a regression.
Tests (
python/tests/test_differential_shapes.py):check_backendis never called);Mutations, each caught:
check_allsetting no deadline;_statesunbounded;no_base;Suites:
parity_checks/testsand the shapes give 1,103 passed, 28 skipped, 1 xfailed. One local failure,test_jacobian_characterization_gate, needs main'sfill_dense_fd_jacobian_half_step(#1002), which my local build predates; CI builds fresh. ruff 0.14.0 is clean.Once this lands I'll merge it into #1315, #1318 and #1319, and order each one's new checks after main's, so they run in what is left of the cap.