Skip to content

Commit 6416afa

Browse files
committed
Update publication candidate
1 parent 3333a7b commit 6416afa

6 files changed

Lines changed: 75 additions & 7 deletions

File tree

changelog.d/995.changed.md renamed to .github/publication_candidates/usdata-gha26002017534-a1/changelog.d/995.changed.md

File renamed without changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"base_release_version": "1.115.2",
3+
"candidate_scope": "1.115.2-patch",
4+
"release_bump": "patch",
5+
"run_id": "usdata-gha26002017534-a1",
6+
"would_release_as_at_build_time": "1.115.3"
7+
}

.github/publication_scope.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"base_release_version": "1.115.2",
33
"candidate_scope": "1.115.2-patch",
44
"release_bump": "patch",
5-
"run_id": "usdata-gha25997959504-a1",
5+
"run_id": "usdata-gha26002017534-a1",
66
"would_release_as_at_build_time": "1.115.3"
77
}

docs/engineering/pipeline-map.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,14 @@ def create_stratified_cps_dataset(target_households = 30000, oversample_poor = F
844844

845845
Create a stratified sample of CPS data preserving high-income households
846846

847+
### `policyengine_us_data.datasets.cps.extended_cps.ExtendedCPS._validate_housing_assistance_microsimulation`
848+
849+
```python
850+
def _validate_housing_assistance_microsimulation(cls, data, time_period, microsimulation_cls = None)
851+
```
852+
853+
Check formula-reconstructed housing assistance before export.
854+
847855
### `policyengine_us_data.calibration.publish_local_area.load_calibration_geography`
848856

849857
```python

docs/generated/pipeline_api.json

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@
810810
"docstring": "Replace clone-half person-level feature variables with donor matches.",
811811
"id": "clone_features",
812812
"kind": "function",
813-
"line": 404,
813+
"line": 405,
814814
"metadata": {
815815
"api_refs": [
816816
"policyengine_us_data.datasets.cps.extended_cps._splice_clone_feature_predictions"
@@ -873,7 +873,7 @@
873873
"docstring": "Assert that final exported variables are leaf inputs.",
874874
"id": "computed_export_contract",
875875
"kind": "function",
876-
"line": 1267,
876+
"line": 1449,
877877
"metadata": {
878878
"api_refs": [
879879
"policyengine_us_data.datasets.cps.extended_cps.ExtendedCPS._assert_no_computed_variables_exported"
@@ -967,7 +967,7 @@
967967
"docstring": "Second-stage QRF: train on CPS, predict for PUF clones.\n\nFor the PUF clone half of the extended CPS we need plausible values\nof CPS-only variables (retirement distributions, transfers, hours,\nSPM components, etc.) that are consistent with the clone's\nPUF-imputed income -- not just naively copied from the CPS donor.\n\nWe train a QRF on CPS person-level data where:\n * predictors = demographics + key income variables\n * outputs = CPS-only variables listed in\n ``CPS_ONLY_IMPUTED_VARIABLES``\n\nFor PUF clone prediction we use the PUF-imputed income values\nfrom the second half of ``data`` (the clone half, which already\nhas PUF-imputed income from stage 1).\n\nUses ``fit_predict()`` with ``max_train_samples`` instead of\nmanual sampling + separate fit/predict.\n\nArgs:\n data: Extended dataset dict after ``puf_clone_dataset()`` --\n already doubled, with PUF-imputed income in the second half.\n time_period: Tax year.\n dataset_path: Path to the CPS h5 file for Microsimulation.\n\nReturns:\n DataFrame with one column per CPS-only variable, containing\n predicted values for the PUF clone half (person-level).",
968968
"id": "cps_only",
969969
"kind": "function",
970-
"line": 443,
970+
"line": 444,
971971
"metadata": {
972972
"api_refs": [
973973
"policyengine_us_data.datasets.cps.extended_cps._impute_cps_only_variables"
@@ -1175,6 +1175,37 @@
11751175
"signature": "def derive_geography_from_blocks(block_geoids: np.ndarray) -> Dict[str, np.ndarray]",
11761176
"source_file": "policyengine_us_data/calibration/block_assignment.py"
11771177
},
1178+
"housing_assistance_microsim_validation": {
1179+
"docstring": "Check formula-reconstructed housing assistance before export.\n\nThe final H5 must not export formula outputs such as ``housing_assistance``.\nThis guard verifies that the remaining leaf inputs still make those\nformulas produce nonzero values before the export contract strips or\nrejects computed variables.",
1180+
"id": "housing_assistance_microsim_validation",
1181+
"kind": "function",
1182+
"line": 1321,
1183+
"metadata": {
1184+
"api_refs": [
1185+
"policyengine_us_data.datasets.cps.extended_cps.ExtendedCPS._validate_housing_assistance_microsimulation"
1186+
],
1187+
"artifacts_in": [
1188+
"extended_cps_stage2"
1189+
],
1190+
"artifacts_out": [
1191+
"housing_validated_extended_cps"
1192+
],
1193+
"description": "Runs a temporary microsimulation before final export to ensure housing-assistance leaf inputs reconstruct nonzero modeled housing assistance and capped SPM housing subsidy.",
1194+
"id": "housing_assistance_microsim_validation",
1195+
"label": "Validate Housing Assistance Microsimulation",
1196+
"node_type": "process",
1197+
"pathways": [
1198+
"data_build"
1199+
],
1200+
"pydoc": true,
1201+
"source_file": "policyengine_us_data/datasets/cps/extended_cps.py",
1202+
"stability": "moving",
1203+
"status": "transitional"
1204+
},
1205+
"object_path": "policyengine_us_data.datasets.cps.extended_cps.ExtendedCPS._validate_housing_assistance_microsimulation",
1206+
"signature": "def _validate_housing_assistance_microsimulation(cls, data, time_period, microsimulation_cls = None)",
1207+
"source_file": "policyengine_us_data/datasets/cps/extended_cps.py"
1208+
},
11781209
"impute_puf_demographics": {
11791210
"docstring": "",
11801211
"id": "impute_puf_demographics",
@@ -2619,7 +2650,7 @@
26192650
"docstring": "Replace PUF clone half of CPS-only variables with QRF predictions.\n\nAfter ``puf_clone_dataset()`` the CPS-only variables in the second\nhalf are naive copies of the CPS donor values. This function\nreplaces them with the second-stage QRF predictions that are\nconsistent with the clone's PUF-imputed income.\n\nArgs:\n data: Extended dataset dict (already doubled).\n predictions: DataFrame from ``_impute_cps_only_variables()``.\n time_period: Tax year.\n dataset_path: Path to CPS h5 file for entity mapping.\n\nReturns:\n Modified data dict with CPS-only variables spliced in.",
26202651
"id": "qrf_pass2",
26212652
"kind": "function",
2622-
"line": 749,
2653+
"line": 790,
26232654
"metadata": {
26242655
"api_refs": [
26252656
"policyengine_us_data.datasets.cps.extended_cps._splice_cps_only_predictions"

docs/generated/pipeline_map.json

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,28 @@
259259
"uv run pytest tests/unit/calibration/test_create_stratified_cps.py"
260260
]
261261
},
262+
{
263+
"api_refs": [
264+
"policyengine_us_data.datasets.cps.extended_cps.ExtendedCPS._validate_housing_assistance_microsimulation"
265+
],
266+
"artifacts_in": [
267+
"extended_cps_stage2"
268+
],
269+
"artifacts_out": [
270+
"housing_validated_extended_cps"
271+
],
272+
"description": "Runs a temporary microsimulation before final export to ensure housing-assistance leaf inputs reconstruct nonzero modeled housing assistance and capped SPM housing subsidy.",
273+
"id": "housing_assistance_microsim_validation",
274+
"label": "Validate Housing Assistance Microsimulation",
275+
"node_type": "process",
276+
"pathways": [
277+
"data_build"
278+
],
279+
"pydoc": true,
280+
"source_file": "policyengine_us_data/datasets/cps/extended_cps.py",
281+
"stability": "moving",
282+
"status": "transitional"
283+
},
262284
{
263285
"api_refs": [
264286
"policyengine_us_data.build_outputs.geography_loader.CalibrationGeographyLoader",
@@ -1311,9 +1333,9 @@
13111333
}
13121334
],
13131335
"metadata": {
1314-
"api_node_count": 63,
1336+
"api_node_count": 64,
13151337
"canonical_stage_count": 5,
1316-
"decorated_object_count": 112,
1338+
"decorated_object_count": 113,
13171339
"mapped_decorated_node_count": 49,
13181340
"stage_count": 17,
13191341
"substage_count": 17

0 commit comments

Comments
 (0)