Skip to content

Add optional mortality and ageing population graph - #420

Draft
MaxGhenis wants to merge 2 commits into
masterfrom
population-graph-slice-20260904
Draft

Add optional mortality and ageing population graph#420
MaxGhenis wants to merge 2 commits into
masterfrom
population-graph-slice-20260904

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

The new optional population graph reuses the existing M6 mortality fitter and mortality/ageing steps through typed model artifacts. It fits a historical exposure panel, applies the model to a separate starting population with stable person-ID random draws, and retains both the original and next-period observations with explicit lineage and mass accounting.

The synthetic engineering report separates execution/accounting checks from held-out fixture checks. Source declarations keep future holdout outcomes out of fitting and application. Validated JSON models preserve the fit boundary and external vintage; the all-dead case adds neither observations nor an orphan period group. Household accounting is explicitly unsupported in this first slice.

Depends on PolicyEngine/microcosm#873. The optional graph extra pins graph and Frame to core commit 3ff92b0aea14407d09479bff5623dc7d1a92d008; it requires Python 3.13+. Default Dynamics imports remain usable on Python 3.10–3.14. CI installs the pinned extra, requires the typed interfaces, and runs the graph plus existing mortality regressions on Python 3.13 and 3.14.

Validation: 49 targeted tests passed, including 25 new graph tests and 24 existing refit/step tests, in development, against installed Dynamics/core wheels, and with a fresh installation of the pinned Git extra. The historical birth-evidence identity check excludes the six new graph files by exact path, following its existing treatment of later additions. Import-reachability coverage proves those graph modules stay outside the historical reducer and its registered production roots. All nine birth-evidence tests plus the 49 graph/mortality regressions pass. Full test collection verifies the ordinary inventory at 5,783 tests. Ruff, Black, actionlint and Python 3.10/3.12 optional-import checks passed. Cold/warm CLI runs pass with all seven nodes reusable.

GitHub CI passed at 19a80e0c097a3c878de432bf0586e9aa3cf6e259: all four legacy shards, graph integration on Python 3.13 and 3.14, build, lint and the aggregate test gate are green. Both graph jobs ran all 49 tests with no skips.

The existing simulation loop, Q5 campaign, candidate registries, locked scientific gates and historical evidence artifacts are unchanged. Core interface review precedes release of this dependent integration.

@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
social-security-model Ready Ready Preview Sep 4, 2026 11:32pm UTC

Request Review

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