Keep PUF clone priors as support weights#1151
Conversation
dbf8702 to
f0481d2
Compare
|
Follow-up from the Modal package-build check: the exported enhanced_cps_2024.h5 failed stage-1 SIPP liquid-asset validation only because the old validator used a fixed T ceiling. The #1151 artifact has .2T in bank+stock+bond liquid assets, while the package's official SCF 2022 source columns total about .0T, so this is outside the old magic ceiling but still within a broad source-relative corruption bound.\n\nI updated the validation to derive the broad bounds from SCF instead of a hard-coded T maximum. Targeted local checks against the pulled Modal artifact now pass:\n\n- ============================= test session starts ============================== validation/stage_1/test_sipp_assets.py::test_ecps_has_liquid_assets PASSED [ 25%] ============================== 4 passed in 8.39s =============================== -> 4 passed\n- ============================= test session starts ============================== validation/stage_1/test_sipp_assets.py::test_ecps_has_liquid_assets PASSED [ 6%] ============================== 16 passed in 7.85s ============================== -> 16 passed\n- All checks passed! -> passed |
d52cbe8 to
4b6f349
Compare
4b6f349 to
5e61bf8
Compare
Rebased onto
|
Latest PyPI release; satisfies the PolicyEngine US freshness check (main was pinned to 1.715.2, now stale). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Independent code review — APPROVE WITH NITSA skeptical/adversarial review pass on the rebased branch: Verified clean:
Non-blocking nits — spun off as a follow-up (not bloating this PR):
Merging via admin override (author can't self-approve; all checks green). |
Post-merge current-main calibration comparisonI checked the two post-merge publication-candidate Stage 1 calibration logs:
Both Modal publication runs still failed Stage 1 validation before the regional/national release stages, so this is a Stage 1 Enhanced CPS calibration comparison rather than a completed release comparison.
Capital gains improved substantially:
The source-weight targets are also in much better shape:
Clone diagnostics in the current main run:
Interpretation: this is a clear improvement over the previous main build, especially for capital gains and the source split. It is still not release-ready: the current main publication run failed Stage 1 validation, and some high-income tail targets remain very poor, e.g. business net profits in AGI |
Summary
Reserve a small share of prior weight for zero-weight PUF clone rows so they stay usable in calibration, and validate that final enhanced CPS weights keep PUF clones above a floor rather than starving them — without an upper cap.
initialize_weight_priorsdefaultzero_weight_total_share:0.5 → 0.05(the old0.5caused 81.3% clone domination; near-zero starves clones — the original bug).validate_clone_household_weight_shareandvalidate_clone_diagnosticsnow enforce a 5% floor (MIN_PUF_CLONE_HOUSEHOLD_WEIGHT_SHARE_PCT), no upper cap — theloss.pyhousehold-count clone target governs how much weight clones carry.clone_taxes_exceed_market_incomedata-quality guard (25%).policyengine-us==1.715.2.Reconciles the contradictory clone-weight designs of this PR vs the merged #1150 — see the rebase comment below for detail.
Tests
uv run pytest tests/unit/test_enhanced_cps_clone_diagnostics.py tests/unit/datasets/test_enhanced_cps_seeding.py(26 passed)uv run ruff format --check ./uv run ruff checkon changed files