Repository navigation
Restore ACS-local US regions on the microcosm#1263 rebuild - #649
Merged
Merged
Conversation
Not ready: the release id and SHA-256 of the microcosm#1263 rebuild are placeholders until its tag is published, and certification has not run. - Reverse #604's doc and test edits, and the interim-exception sections of the data-certification skill and the Build M runbook (28a30eb, 8acb31b). - legacy_spm registry: admit a certified source that cannot store a declaration because the pinned policyengine-us does not define its variable, and register the rebuild with the ACS household-population scope rule and no independence list (it stores the role). - Tests: the bundle pins move to the rebuild; Build O's integration fixture keeps Build O's identity; new unit and integration tests for the scope-only entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bundle.py certify-data --country us --data-producer populace with the national manifest populace-us-2024-spm-20260915 and the regional manifest of populace-us-2024-buildo-acs-local-766b7c7-20261017T030317Z, then generate --include-tros and check --include-tros (all exit 0). State and congressional-district templates select populace_us_2024_acs_local.h5 again, written by certification, not by hand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A scoped Simulation's spm_unit output does not carry spm_unit_spm_threshold unless asked; the Build O tests pass SPM_EXTRAS, and so does this one now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bundle certifies the microcosm#1263 rebuild, so a Build O record is now stale for populace_us_2024_acs_local and the rebuild's record is the current one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
October 18, 2026 21:28
Contributor
Author
|
Merged at
No other policyengine.py release was pending at merge time. Following the release now: push-run Test then Versioning, Publish, then the consumer update PRs. |
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.
Fixes #648
US state and congressional-district regions use the ACS-local Populace dataset again, on the release PolicyEngine/microcosm#1263 rebuilt so that every SPM unit has a classified adult. This ends the temporary national-file filter of #604.
populace_us_2024_acs_local.h5atpopulace-us-2024-buildo-acs-local-766b7c7-20261017T030317Z, sha2563ce781c440a7f933b1d952ff4e9d9f65f4698c64b94d2fad165af0c662838d6c. That is also the Hugging Face LFS oid for that path and revision (9,819,603,807 bytes).What changes
scripts/bundle.py certify-data --country us --data-producer populacewas run with the national manifestpopulace-us-2024-spm-20260915,--regional-manifest-urifor the rebuild and--model-version 2.2.1, thengenerate --include-trosandcheck --include-tros. Certification itself wrote the state and district templates (populace_us_2024_acs_local.h5), the pinned artifact and the regional manifest URIs; nothing was edited by hand. Both TRACE sidecars changed only becausemanifest.json's hash changed. Build O'ssource_spm_person_independencelist stays pinned, because Build O stays registered.POPULACE_US_2024_ACS_LOCAL_MICROCOSM_1263is registered inLEGACY_SPM_SOURCESwithspm_universe_rule="acs_household_population"and noindependence_list.is_spm_independent_minor_rolefor every person, so it needs no list.spm_unit_spm_universe_status: policyengine-us 2.2.1 doesn't define that variable, and Microcosm's stored-inputs gate refuses variables the model doesn't define.docs/engineering/runbooks/us-legacy-spm-sources.md) now admit a source that cannot store a declaration the pinned model doesn't define. The entry is to be removed once a release carries the scope natively (Separate SPM measurement scope from ordinary income policyengine-us#9462).create_datasetsandmanaged_microsimulation.How SPM is measured on this release
policyengine-us 2.2.1 can't read SPM scope, so runs over this source use the legacy SPM override mode (
legacy_spm/model_adapter.py):TYPEHUGQ2 or 3) are OUTSIDE the measurement, per Census's ACS household-population rule. They never reach spm-calculator, and their SPM outcomes are NaN ("not measured"): thresholds, net income, poverty and deep poverty.Evidence
Every figure below is aggregate and rests on 10 or more records. The W4 reviewer ran these independently on Modal, because the host is under a disk reservation:
110cfe07a, with policyengine-us 2.2.1, policyengine-core 3.33.0 and spm-calculator 1.0.0.ensure_datasets(datasets=[name]), then a scopedSimulation.Whole 2026 year file:
The release's own gate,
spm_measurement_composition, reports the same 0 over all 1,589,568 units.Region runs:
Both state/UT and UT-01 run to completion on this release. Poverty and deep poverty are NaN for exactly the same units, and net income is NaN only among them.
Tests:
110cfe07a.tests/test_us_legacy_spm.py,test_us_legacy_spm_integration.py,test_us_regions.pyandtest_release_manifests.pygive 146 passed.Independent review: GPT-6.1 Sol approved at
110cfe07awith no code blockers. It verified:ADAPTER_REVISIONnorYEAR_FILE_STAMP_REVISIONneeds to change, because stale Build O or national year files are refused or cut again;Disclosed limitations carried by the release
acs_group_quarters_children_outside_spm_universe(d1484 c). The 1,946 one-person group-quarters records of children under 15 are left out of the population: 0.037% of household weight. Calibration to the PUMA-ladder population totals re-spreads their weight.spm_unit_spm_universe_status(Separate SPM measurement scope from ordinary income policyengine-us#9462).acs_wic_takeup_assumed_interim. The file storestakes_up_wic_if_eligible: donor decisions are kept, and ACS people are set True. That is the rule policyengine.py's temporary ACS WIC mapping applies (keep stored decisions, assume claiming for ACS people), and because the file stores the live input name, that mapping no longer fires on it. Its removal (Remove temporary ACS WIC assumption after replacement certification #563) still waits on microcosm#1154.cd_population_marginal_vintage_2020. District population totals use 2020-apportionment Census populations. Utah's weighted people on this release are 3.33M, against 3.56M on the national file.axiom: n/a: data certification
🤖 Generated with Claude Code