Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/us-sipp-person-file-read-once.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The US fiscal-refresh release tool now parses the full SIPP 2023 person file once, checking its digest in that one read, and builds the financial-asset, SSI disability, Head Start, vehicle and voluntary-filing donor tables from that one read, instead of hashing and parsing the 3.73 GB file once per donor. The read tokenizes the file with `low_memory=True`, keeping only the columns the donors use, and then infers their types over each whole chunk, so it no longer holds the field positions of the file's thousands of unused columns for 100,000 rows at a time. The donor tables are unchanged; the vehicle and voluntary-filing donors refuse a column whose values their former `low_memory=True` parse could have converted differently. `read_sipp_december_person_rows` and one `build_sipp_2023_*_donor` function per donor replace the per-donor loaders that took a file path; `load_sipp_2023_ssi_disability_donor` remains for the ACS local-area build.
16 changes: 8 additions & 8 deletions docs/evidence/spec-engine/us-f0-coverage.json
Original file line number Diff line number Diff line change
Expand Up @@ -1642,13 +1642,13 @@
"compiler_ir.node_slices"
],
"expected": {
"map_sha256": "1dda5e09b93e4acd51844bfbd62555adfc91d309e0f7647d64b959e0820d1d1e",
"protocol_sha256": "90d566bb670521cc79f42cba8afe14fe79330ac2c990858dbe8f7debe1466fa5"
"map_sha256": "74aa4ed49e24b76e6126d440180a71553c767f0cc60156ddd183033fd8972505",
"protocol_sha256": "24bb621745b2b753c1f89843c90f29949c0ad764df4cdcd315afdbf9aa7f6403"
},
"failures": [],
"observed": {
"map_sha256": "1dda5e09b93e4acd51844bfbd62555adfc91d309e0f7647d64b959e0820d1d1e",
"protocol_sha256": "90d566bb670521cc79f42cba8afe14fe79330ac2c990858dbe8f7debe1466fa5"
"map_sha256": "74aa4ed49e24b76e6126d440180a71553c767f0cc60156ddd183033fd8972505",
"protocol_sha256": "24bb621745b2b753c1f89843c90f29949c0ad764df4cdcd315afdbf9aa7f6403"
},
"status": "covered"
},
Expand All @@ -1663,7 +1663,7 @@
"compiler_ir.seed_stream_map"
],
"expected": {
"implementation_sha256": "90d566bb670521cc79f42cba8afe14fe79330ac2c990858dbe8f7debe1466fa5",
"implementation_sha256": "24bb621745b2b753c1f89843c90f29949c0ad764df4cdcd315afdbf9aa7f6403",
"protocol": "legacy-v1",
"streams": [
"build_model",
Expand All @@ -1684,7 +1684,7 @@
},
"failures": [],
"observed": {
"implementation_sha256": "90d566bb670521cc79f42cba8afe14fe79330ac2c990858dbe8f7debe1466fa5",
"implementation_sha256": "24bb621745b2b753c1f89843c90f29949c0ad764df4cdcd315afdbf9aa7f6403",
"protocol": "legacy-v1",
"streams": [
"build_model",
Expand Down Expand Up @@ -2585,7 +2585,7 @@
"country": "us",
"schema_id": "country_spec",
"schema_version": 1,
"spec_sha256": "2e3093b6acc4926e80e96b080c3bfe2727baa22127ebfb9faf8a1ef05eda0f50"
"spec_sha256": "499389d4b1f0c967c54a6f2fa81b8a07a7e59c045bf2a8fe6bb909f08561d049"
}
},
"report_schema_version": 3,
Expand All @@ -2595,7 +2595,7 @@
"country": "us",
"schema_id": "country_spec",
"schema_version": 1,
"spec_sha256": "2e3093b6acc4926e80e96b080c3bfe2727baa22127ebfb9faf8a1ef05eda0f50"
"spec_sha256": "499389d4b1f0c967c54a6f2fa81b8a07a7e59c045bf2a8fe6bb909f08561d049"
},
"status": "pass"
}
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,10 @@
# os.cpu_count() in microcosm.fit.qrf, moves both again; no draw changes.
# calibrate's return_frame option in solve moves both again; the default
# is unchanged, and no draw changes.
"seed_map": "1dda5e09b93e4acd51844bfbd62555adfc91d309e0f7647d64b959e0820d1d1e",
"seed_protocol": "90d566bb670521cc79f42cba8afe14fe79330ac2c990858dbe8f7debe1466fa5",
# microcosm#1686's shared SIPP person-file read moves both again: the five
# SIPP donor tables are byte-identical, and no draw changes.
"seed_map": "74aa4ed49e24b76e6126d440180a71553c767f0cc60156ddd183033fd8972505",
"seed_protocol": "24bb621745b2b753c1f89843c90f29949c0ad764df4cdcd315afdbf9aa7f6403",
"source_manifest": "dc3879886d2a69f20fb982a675d7fb322c0e4017afef6471be54b0ee3cbd2af6",
"take_up": "9522ce40f7dea569312dd7a7beb474e5a5afadd2f1e10cb5876534c3ef623d35",
"tail": "565f0ceeadab69d3e96a886a00dd0305f7425fa3acde24d12ba48db2b37d5fc0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,10 @@
us_scf_wealth_summary,
with_us_scf_wealth_inputs,
)
from microcosm.build.us_runtime.sipp_december_person_rows import (
SippDecemberPersonRows,
read_sipp_december_person_rows,
)
from microcosm.build.us_runtime.sipp_financial_assets import (
SIPP_2023_FINANCIAL_ASSET_DONOR_REPOSITORY_ID_PARTS,
SIPP_2023_FINANCIAL_ASSET_DONOR_REPOSITORY_TYPE,
Expand All @@ -843,9 +847,9 @@
SIPP_FINANCIAL_ASSET_SOURCE_COLUMNS,
SIPP_FINANCIAL_ASSET_TARGET_ALLOCATION_COLUMNS,
SIPP_FINANCIAL_ASSET_TARGET_SOURCE_COLUMNS,
build_sipp_2023_financial_asset_donor,
fetch_sipp_2023_financial_asset_donor,
impute_us_sipp_financial_assets,
load_sipp_2023_financial_asset_donor,
)
from microcosm.build.us_runtime.sipp_head_start import (
HEAD_START_SIPP_DICTIONARY_URL,
Expand All @@ -861,9 +865,9 @@
US_SIPP_HEAD_START_OUTPUT_COLUMNS,
US_SIPP_HEAD_START_REQUIRED_SOURCE_COLUMNS,
US_SIPP_HEAD_START_STAGE_NAME,
build_sipp_2023_head_start_donor,
fetch_sipp_2023_head_start_donor,
impute_us_sipp_head_start,
load_sipp_2023_head_start_donor,
us_sipp_head_start_signal_gate,
us_sipp_head_start_stage_spec,
us_sipp_head_start_summary,
Expand Down Expand Up @@ -894,10 +898,11 @@
SIPP_2023_VEHICLE_DONOR_SHA256,
SIPP_2023_VEHICLE_DONOR_SIZE_BYTES,
SIPP_2023_VEHICLE_DONOR_URL,
SIPP_VEHICLE_SOURCE_COLUMNS,
US_SIPP_VEHICLE_NONCONSTANT_HOUSEHOLD_COLUMNS,
US_SIPP_VEHICLE_OUTPUT_COLUMNS,
build_sipp_2023_vehicle_donor,
fetch_sipp_2023_vehicle_donor,
load_sipp_2023_vehicle_donor,
us_sipp_vehicles_signal_gate,
us_sipp_vehicles_stage_spec,
us_sipp_vehicles_summary,
Expand Down Expand Up @@ -992,6 +997,7 @@
US_SSI_DISABILITY_CRITERIA_NONCONSTANT_PERSON_COLUMNS,
US_SSI_DISABILITY_CRITERIA_OUTPUT_COLUMNS,
US_SSI_DISABILITY_CRITERIA_STAGE_NAME,
build_sipp_2023_ssi_disability_donor,
fetch_sipp_2023_ssi_disability_donor,
impute_us_ssi_disability_criteria,
load_sipp_2023_ssi_disability_donor,
Expand Down Expand Up @@ -1071,9 +1077,9 @@
VOLUNTARY_FILING_ARCHIVED_DERIVATION_URL,
VOLUNTARY_FILING_ARCHIVED_PARAMETERS_URL,
VOLUNTARY_FILING_SIPP_DICTIONARY_URL,
build_sipp_2023_voluntary_filing_donor,
fetch_sipp_2023_voluntary_filing_donor,
impute_us_voluntary_filing,
load_sipp_2023_voluntary_filing_donor,
us_voluntary_filing_signal_gate,
us_voluntary_filing_stage_spec,
us_voluntary_filing_summary,
Expand Down Expand Up @@ -1684,9 +1690,11 @@
"SIPP_FINANCIAL_ASSET_SOURCE_COLUMNS",
"SIPP_FINANCIAL_ASSET_TARGET_ALLOCATION_COLUMNS",
"SIPP_FINANCIAL_ASSET_TARGET_SOURCE_COLUMNS",
"SippDecemberPersonRows",
"read_sipp_december_person_rows",
"build_sipp_2023_financial_asset_donor",
"fetch_sipp_2023_financial_asset_donor",
"impute_us_sipp_financial_assets",
"load_sipp_2023_financial_asset_donor",
"HEAD_START_SIPP_DICTIONARY_URL",
"SIPP_2023_HEAD_START_DONOR_REVISION",
"SIPP_2023_HEAD_START_DONOR_SHA256",
Expand All @@ -1700,9 +1708,9 @@
"US_SIPP_HEAD_START_OUTPUT_COLUMNS",
"US_SIPP_HEAD_START_REQUIRED_SOURCE_COLUMNS",
"US_SIPP_HEAD_START_STAGE_NAME",
"build_sipp_2023_head_start_donor",
"fetch_sipp_2023_head_start_donor",
"impute_us_sipp_head_start",
"load_sipp_2023_head_start_donor",
"us_sipp_head_start_signal_gate",
"us_sipp_head_start_stage_spec",
"us_sipp_head_start_summary",
Expand All @@ -1724,6 +1732,7 @@
"US_SSI_DISABILITY_CRITERIA_NONCONSTANT_PERSON_COLUMNS",
"US_SSI_DISABILITY_CRITERIA_OUTPUT_COLUMNS",
"US_SSI_DISABILITY_CRITERIA_STAGE_NAME",
"build_sipp_2023_ssi_disability_donor",
"fetch_sipp_2023_ssi_disability_donor",
"impute_us_ssi_disability_criteria",
"load_sipp_2023_ssi_disability_donor",
Expand Down Expand Up @@ -1783,8 +1792,9 @@
"SIPP_2023_VEHICLE_DONOR_URL",
"US_SIPP_VEHICLE_NONCONSTANT_HOUSEHOLD_COLUMNS",
"US_SIPP_VEHICLE_OUTPUT_COLUMNS",
"SIPP_VEHICLE_SOURCE_COLUMNS",
"build_sipp_2023_vehicle_donor",
"fetch_sipp_2023_vehicle_donor",
"load_sipp_2023_vehicle_donor",
"us_sipp_vehicles_signal_gate",
"us_sipp_vehicles_stage_spec",
"us_sipp_vehicles_summary",
Expand All @@ -1801,9 +1811,9 @@
"VOLUNTARY_FILING_ARCHIVED_DERIVATION_URL",
"VOLUNTARY_FILING_ARCHIVED_PARAMETERS_URL",
"VOLUNTARY_FILING_SIPP_DICTIONARY_URL",
"build_sipp_2023_voluntary_filing_donor",
"fetch_sipp_2023_voluntary_filing_donor",
"impute_us_voluntary_filing",
"load_sipp_2023_voluntary_filing_donor",
"us_voluntary_filing_signal_gate",
"us_voluntary_filing_stage_spec",
"us_voluntary_filing_summary",
Expand Down
Loading
Loading