Skip to content

Use ACS-local data for US regional simulations - #726

Draft
anth-volk wants to merge 8 commits into
mainfrom
fix/717-acs-local-regional-defaults
Draft

anth-volk wants to merge 8 commits into
mainfrom
fix/717-acs-local-regional-defaults

Conversation

@anth-volk

@anth-volk anth-volk commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #717

Summary

  • Read regional dataset path templates from the certified policyengine.py data_releases.{country}.region_datasets structure.
  • Resolve every template to exactly one certified dataset and expose its identity in the runtime field region_dataset_identities.
  • Select populace_us_2024_acs_local for US state, DC, and congressional-district simulations while retaining populace_us_2024 for national and multi-region simulations.
  • Apply the same metadata-driven selection to direct and Stage 12 simulations, including annual and budget-window requests.
  • Validate each runtime dataset against its declared URI, artifact revision, SHA-256 digest, and materialized population digest.
  • Keep deployment precompute limited to the existing US national dataset for 2025, 2026, and 2027 and its distributed national baseline outputs. Do not prebuild ACS-local files.
  • Prepare ACS-local datasets on demand in regional request workers, retaining the existing isolated dataset directories and provenance validation.
  • Remove the additional Stage 12 precompute step and the regional artifact-manifest/image-download extensions. Keep the existing national executor precompute and manifest format unchanged.
  • Allocate 64 GiB to US workers that can load ACS-local data; national segmented workers retain their existing allocation.
  • Require and lock the published policyengine[models]==6.2.2 in both executor runtime dependency groups. Country-model and other dependency versions remain unchanged.

Dataset identity

The regional dataset resolves to revision populace-us-2024-buildo-acs-local-767312d60-20260923T074941Z with SHA-256 digest 769756c31f3ca646d12c272511744dec04c0e68870c6946dd945fbba65b6a7ec.

Dependency order

PolicyEngine/policyengine.py#552 merged and published 6.2.2 on PyPI. The executor lockfile now records that published release.

Merge and deploy this PR before PolicyEngine/policyengine-api#3868. The API PR retains its existing requirement to verify that the selected simulation service supports 6.2.2 before proceeding.

Provisioning

This change adds no environment variables, secrets, service accounts, data stores, or deployment targets. The existing artifact bucket and deployment identities are reused.

Validation

Current local validation after installing the published PyPI release from the updated frozen lockfile:

  • Executor focused precompute, artifact, image, deployment-script, bundle, and Stage 12 tests: 261 passed across the initial run and targeted reruns of two corrected test-fixture cases.
  • On-demand dataset-selection and loading tests: 12 passed.
  • Regression tests cover national-only precompute with and without forced recomputation, no additional Stage 12 precompute step, and no precomputed-artifact downloads in Stage 12 images.
  • Gateway endpoint tests: 74 passed.
  • Simulation-entry Stage 12 adapter tests: 18 passed.
  • Shared-contract manifest tests: 8 passed.
  • Direct packaged-bundle resolution confirms national US requests select populace_us_2024, while CA, state/DC, and congressional_district/CA-01 select populace_us_2024_acs_local.
  • uv lock --check, relevant source formatting checks, and git diff --check pass.
  • Ruff lint and formatting checks and Actionlint validation of the deployment workflow pass after the national-only correction. Earlier changed-module Pyright checks passed (0 type errors).

The complete executor suite, Docker builds, authenticated dataset checks, and live deployments were not run locally for this update. Pushing the branch triggers fresh PR checks.

@anth-volk
anth-volk force-pushed the fix/717-acs-local-regional-defaults branch from a81d683 to 7d91ac1 Compare October 7, 2026 14:03

This branch has not been deployed

No deployments
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.

Load the ACS local-area dataset for US state and district runs

1 participant