Skip to content

docs(notes): Stan re-implementation of Garki ctl_bb — ODE-fit benchmark#431

Merged
vsbuffalo merged 5 commits into
mainfrom
docs/stan-ctl-bb-benchmark
Jul 17, 2026
Merged

docs(notes): Stan re-implementation of Garki ctl_bb — ODE-fit benchmark#431
vsbuffalo merged 5 commits into
mainfrom
docs/stan-ctl-bb-benchmark

Conversation

@vsbuffalo

Copy link
Copy Markdown
Owner

A dated dev note capturing the Stan-vs-camdl timing benchmark on the Garki ctl_bb ODE model. Faithful Stan port (validated at camdl's MAP), measured timings, honest caveats, and the conclusion that NUTS-through-a-60-yr-ODE is impractical — plus a standalone sub-finding (§5): Stan's compiled RK4 forward solve beats camdl's resolved-expression evaluator per solve, a potential ~10× lever for camdl's own ODE fits, tracked as next work. Data reference is external, so the note is the durable record.

A faithful Stan port of the ctl_bb ODE model (70 states, beta-binomial,
full 60.9-yr burn-in), validated at camdl's MAP. Measured timing: 0.055 s
forward solve, ~1.2 s per NUTS gradient, full fit extrapolating to ~7 hr–
few days vs camdl mh-ode's ~28 min. NUTS-through-the-burn-in is impractical
(reproduces garki's F21 independently). Records a standalone lever: Stan's
compiled RK4 solve (0.055 s) beats camdl's resolved-expression evaluator
per solve — worth chasing for camdl's own ODE fits.
vsbuffalo added a commit that referenced this pull request Jul 17, 2026
## Problem

Branch protection requires the `test` check, but `ci.yml`'s
`paths-ignore` (`docs/**`, `**/*.md`, …) means the workflow never
triggers on doc-only changes — so `test` never reports and doc-only PRs
are BLOCKED forever (unmergeable except by admin override). This is
currently blocking #421, #427, #431.

## Fix

Restructure into `changes` → `test` → `ci` (the original gate design,
re-applied to the current single-job workflow):

- **`changes`** — detects whether any non-doc path changed (plain `git
diff` + grep, no third-party action).
- **`test`** — the full suite, steps unchanged; runs only when code
changed.
- **`ci`** — a tiny always-runs gate; fails only if `test`
failed/cancelled (or the detector failed). A *skipped* `test` (the
legitimate doc-only case) passes.

`paths-ignore` is removed so the workflow always fires; the expensive
`test` job is skipped instead, preserving the cost saving. Every PR now
reports a verdict via `ci`.

## Required follow-up (maintainer, one-time)

After merge, repoint branch protection: **require `ci`, not `test`.**

\`\`\`
gh api -X PATCH
repos/:owner/:repo/branches/main/protection/required_status_checks \
  -f 'checks[][context]=ci'
\`\`\`

Until that switch, doc-only PRs remain blocked (they skip `test`); code
PRs are unaffected (both `test` and `ci` run green).
@vsbuffalo
vsbuffalo merged commit 39121ae into main Jul 17, 2026
3 checks passed
@vsbuffalo
vsbuffalo deleted the docs/stan-ctl-bb-benchmark branch July 17, 2026 03:53
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