Refresh local SOI state targets used by local calibration#664
Open
Refresh local SOI state targets used by local calibration#664
Conversation
anth-volk
added a commit
that referenced
this pull request
Mar 30, 2026
- Pass HUGGING_FACE_TOKEN to unit test step in pr.yaml so tests that transitively import huggingface.py can collect without crashing - Fix test_etl_national_targets.py: remove nonexistent TAX_EXPENDITURE_REFORM_ID import, use reform_id > 0 filter instead (mirrors fix from unmerged PR #664) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
anth-volk
added a commit
that referenced
this pull request
Mar 31, 2026
- Pass HUGGING_FACE_TOKEN to unit test step in pr.yaml so tests that transitively import huggingface.py can collect without crashing - Fix test_etl_national_targets.py: remove nonexistent TAX_EXPENDITURE_REFORM_ID import, use reform_id > 0 filter instead (mirrors fix from unmerged PR #664) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
78aea43 to
59a0a6a
Compare
baogorek
reviewed
Apr 9, 2026
Collaborator
baogorek
left a comment
There was a problem hiding this comment.
Just a comment for now: I see this as legacy ecps targeting enhancements. Nothing but love for the ECPS, but my primary aim is to make sure nothing gets undone with local area targets. (It shouldn't, because this doesn't touch the /etl folder, but I still get nervous!)
Do please see my comment about the max 500K bucket, given this is legacy.
policyengine_us_data/storage/calibration_targets/refresh_local_agi_state_targets.py
Outdated
Show resolved
Hide resolved
59a0a6a to
8d1f57c
Compare
Contributor
Author
|
Addressing Ben's top-bucket review note: the legacy state refresh now preserves the IRS state split for |
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.
Summary
agi_state.csvartifact consumed by local calibrationagi_state.csvfrom the latest IRS geographic state SOI file and fix the missing DCGEO_IDrowsContext
PR #660 refreshed the tracked national SOI workbook targets in
soi_targets.csv, but local calibration still reads the separateagi_state.csvartifact inutils/loss.py. This follow-up makes that local refresh path explicit and keeps the tracked file in sync with its IRS source.The IRS geographic state SOI file currently only goes through tax year 2022, so this PR refreshes the latest available local artifact rather than moving local calibration to TY2023.
Testing
uv run ruff format --check policyengine_us_data/storage/calibration_targets/refresh_local_agi_state_targets.py tests/test_refresh_local_agi_state_targets.pyuv run pytest tests/test_refresh_local_agi_state_targets.py tests/test_refresh_soi_table_targets.py -q