[codex] Cache PE SOI targets for rebuild PUF uprating#155
Open
anth-volk wants to merge 5 commits into
Open
Conversation
Contributor
Author
|
Review note: I was unsure how aggressively to move SOI target handling away from |
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 #147
Summary
--soi-pathas the explicit override for PE-SOI PUF uprating.microplex-usdownloads the pinned PE-style long SOI target table from thePolicyEngine/policyengine-us-datarepo into a versioned Microplex cache.policyengine_us_data/storage/soi.csvfile for SOI resolution while preserving repo-local PE-US-data handling for other PUF inputs, including raw PUF/demographics anduprating_factors.csv.soi.csv.Root Cause
The PE-SOI PUF uprating path previously expected
policyengine_us_data/storage/soi.csvwhen only--policyengine-us-data-repowas provided. Fresh PE-US-data checkouts do not reliably materialize that file, while the tracked historical PE-style target table lives atpolicyengine_us_data/storage/calibration_targets/soi_targets.csvin the PE-US-data repo.SOI Source
For this PR, the canonical default remains the PE-US-data SOI setup:
microplex-ususes the PE-style longsoi_targets.csvfrom a pinnedPolicyEngine/policyengine-us-datacommit and caches it assoi_targets_pe_us_data_<commit>.csv. This is a dependency on the PE-US-data repo artifact, not an import from the PE-US-data Python package.I checked the HF
policyengine-us-datamodel, but it does not currently publish the historical long SOI target table needed by this uprating path. It publishes current raw/target DB artifacts that do not cover the required 2015+ historical surface.Longer term, this should move to Arch: Arch should own source-backed IRS SOI facts/provenance across the needed years, while
microplex-usowns the adapter/export into the PE-style target surface used by PUF uprating.Validation
uv run --no-sync pytest -q tests/test_puf_source_provider.py -k "soi or download_pe_soi"-> 8 passed, 29 deselecteduv run --no-sync pytest -q tests/test_puf_source_provider.py tests/pipelines/test_pe_us_data_rebuild.py tests/pipelines/test_pe_us_data_rebuild_checkpoint.py::test_main_passes_donor_condition_selection_override-> 47 passeduv run --no-sync ruff check src/microplex_us/data_sources/puf.py tests/test_puf_source_provider.pyuv run --no-sync python -m py_compile src/microplex_us/data_sources/puf.py tests/test_puf_source_provider.pygit diff --checkNotes
rgcaller scan for the touched PUF/rebuild symbols before committing.