Skip to content

Commit b71effc

Browse files
committed
Clarify Stage 2 target config docs node
1 parent 67d661b commit b71effc

5 files changed

Lines changed: 41 additions & 41 deletions

File tree

docs/engineering/pipeline-map.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ Build sparse calibration matrix (targets x households x clones)
384384
| `util_takeup_s5` compute_block_takeup_for_entities() | `utility` | `unknown` | `unknown` | |
385385
| `util_scipy` scipy.sparse | `utility` | `unknown` | `unknown` | |
386386
| `stage2_target_config_identity` Stage 2 Target Config Identity | `library` | `current` | `moving` | `policyengine_us_data.calibration_package.specs.resolve_target_config_identity` |
387-
| `stage2_target_catalog_load` Load Stage 2 Target Config | `library` | `current` | `moving` | `policyengine_us_data.calibration.unified_calibration.load_target_config` |
387+
| `stage2_target_config_load` Load Stage 2 Target Config | `library` | `current` | `moving` | `policyengine_us_data.calibration.unified_calibration.load_target_config` |
388388
| `stage2_target_config_apply` Apply Stage 2 Target Config | `library` | `current` | `moving` | `policyengine_us_data.calibration.unified_calibration.apply_target_config_to_targets` |
389389
| `state_precomp` Per-State Simulation Precomputation | `library` | `current` | `moving` | `policyengine_us_data.calibration.unified_matrix_builder._compute_single_state` |
390390
| `clone_assembly` Clone Value Assembly | `library` | `current` | `moving` | `policyengine_us_data.calibration.unified_matrix_builder._assemble_clone_values_standalone` |
@@ -400,8 +400,8 @@ Build sparse calibration matrix (targets x households x clones)
400400
- `in_cps_s5` -> `target_resolve` `data_flow`
401401
- `in_db_s5` -> `target_resolve` `external_source` (SQL targets)
402402
- `in_config_s5` -> `stage2_target_config_identity` `data_flow` (config file)
403-
- `stage2_target_config_identity` -> `stage2_target_catalog_load` `data_flow` (resolved path and checksum)
404-
- `stage2_target_catalog_load` -> `stage2_target_config_apply` `data_flow` (include/exclude rules)
403+
- `stage2_target_config_identity` -> `stage2_target_config_load` `data_flow` (resolved path and checksum)
404+
- `stage2_target_config_load` -> `stage2_target_config_apply` `data_flow` (include/exclude rules)
405405
- `target_resolve` -> `stage2_target_config_apply` `data_flow` (candidate targets)
406406
- `stage2_target_config_apply` -> `target_uprate` `data_flow` (selected targets)
407407
- `target_uprate` -> `geo_build` `data_flow`

docs/generated/pipeline_api.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3788,34 +3788,6 @@
37883788
"signature": "def save_calibration_package(path: str, X_sparse, targets_df: 'pd.DataFrame', target_names: list, metadata: dict, initial_weights: np.ndarray = None, cd_geoid: np.ndarray = None, block_geoid: np.ndarray = None) -> None",
37893789
"source_file": "policyengine_us_data/calibration/unified_calibration.py"
37903790
},
3791-
"stage2_target_catalog_load": {
3792-
"docstring": "Load target include/exclude config from YAML.\n\nArgs:\n path: Path to YAML config file.\n\nReturns:\n Parsed config dict with include and exclude lists.",
3793-
"id": "stage2_target_catalog_load",
3794-
"kind": "function",
3795-
"line": 525,
3796-
"metadata": {
3797-
"api_refs": [
3798-
"policyengine_us_data.calibration.unified_calibration.load_target_config"
3799-
],
3800-
"artifacts_in": "[DEFAULT_TARGET_CONFIG_RELATIVE_PATH]",
3801-
"description": "Load the include/exclude target-selection catalog used by Stage 2 package construction.",
3802-
"id": "stage2_target_catalog_load",
3803-
"label": "Load Stage 2 Target Config",
3804-
"node_type": "library",
3805-
"pathways": [
3806-
"calibration_package"
3807-
],
3808-
"source_file": "policyengine_us_data/calibration/unified_calibration.py",
3809-
"stability": "moving",
3810-
"status": "current",
3811-
"validation_commands": [
3812-
"uv run pytest tests/unit/calibration/test_target_config.py"
3813-
]
3814-
},
3815-
"object_path": "policyengine_us_data.calibration.unified_calibration.load_target_config",
3816-
"signature": "def load_target_config(path: str) -> dict",
3817-
"source_file": "policyengine_us_data/calibration/unified_calibration.py"
3818-
},
38193791
"stage2_target_config_apply": {
38203792
"docstring": "Filter target rows before matrix construction.",
38213793
"id": "stage2_target_config_apply",
@@ -3871,6 +3843,34 @@
38713843
"signature": "def resolve_target_config_identity(target_config_path: str | Path | None = None, *, all_active_targets: bool = False, repo_root: str | Path | None = None) -> TargetConfigIdentity",
38723844
"source_file": "policyengine_us_data/calibration_package/specs.py"
38733845
},
3846+
"stage2_target_config_load": {
3847+
"docstring": "Load target include/exclude config from YAML.\n\nArgs:\n path: Path to YAML config file.\n\nReturns:\n Parsed config dict with include and exclude lists.",
3848+
"id": "stage2_target_config_load",
3849+
"kind": "function",
3850+
"line": 525,
3851+
"metadata": {
3852+
"api_refs": [
3853+
"policyengine_us_data.calibration.unified_calibration.load_target_config"
3854+
],
3855+
"artifacts_in": "[DEFAULT_TARGET_CONFIG_RELATIVE_PATH]",
3856+
"description": "Load the YAML include/exclude target-selection config used by Stage 2 package construction.",
3857+
"id": "stage2_target_config_load",
3858+
"label": "Load Stage 2 Target Config",
3859+
"node_type": "library",
3860+
"pathways": [
3861+
"calibration_package"
3862+
],
3863+
"source_file": "policyengine_us_data/calibration/unified_calibration.py",
3864+
"stability": "moving",
3865+
"status": "current",
3866+
"validation_commands": [
3867+
"uv run pytest tests/unit/calibration/test_target_config.py"
3868+
]
3869+
},
3870+
"object_path": "policyengine_us_data.calibration.unified_calibration.load_target_config",
3871+
"signature": "def load_target_config(path: str) -> dict",
3872+
"source_file": "policyengine_us_data/calibration/unified_calibration.py"
3873+
},
38743874
"stage4_release_candidate_bundle_builder": {
38753875
"docstring": "Build a candidate bundle from a Stage 4 output contract shape.",
38763876
"id": "stage4_release_candidate_bundle_builder",

docs/generated/pipeline_map.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3781,12 +3781,12 @@
37813781
"edge_type": "data_flow",
37823782
"label": "resolved path and checksum",
37833783
"source": "stage2_target_config_identity",
3784-
"target": "stage2_target_catalog_load"
3784+
"target": "stage2_target_config_load"
37853785
},
37863786
{
37873787
"edge_type": "data_flow",
37883788
"label": "include/exclude rules",
3789-
"source": "stage2_target_catalog_load",
3789+
"source": "stage2_target_config_load",
37903790
"target": "stage2_target_config_apply"
37913791
},
37923792
{
@@ -3940,7 +3940,7 @@
39403940
"label": "run_calibration()",
39413941
"node_ids": [
39423942
"stage2_target_config_identity",
3943-
"stage2_target_catalog_load",
3943+
"stage2_target_config_load",
39443944
"target_resolve",
39453945
"stage2_target_config_apply",
39463946
"target_uprate",
@@ -4088,8 +4088,8 @@
40884088
"policyengine_us_data.calibration.unified_calibration.load_target_config"
40894089
],
40904090
"artifacts_in": "[DEFAULT_TARGET_CONFIG_RELATIVE_PATH]",
4091-
"description": "Load the include/exclude target-selection catalog used by Stage 2 package construction.",
4092-
"id": "stage2_target_catalog_load",
4091+
"description": "Load the YAML include/exclude target-selection config used by Stage 2 package construction.",
4092+
"id": "stage2_target_config_load",
40934093
"label": "Load Stage 2 Target Config",
40944094
"node_type": "library",
40954095
"pathways": [

docs/pipeline_map.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ stages:
806806
description: 'Build phase: resolve targets and constraints, assemble clone values, and package the sparse calibration matrix'
807807
node_ids:
808808
- stage2_target_config_identity
809-
- stage2_target_catalog_load
809+
- stage2_target_config_load
810810
- target_resolve
811811
- stage2_target_config_apply
812812
- target_uprate
@@ -902,10 +902,10 @@ stages:
902902
edge_type: data_flow
903903
label: config file
904904
- source: stage2_target_config_identity
905-
target: stage2_target_catalog_load
905+
target: stage2_target_config_load
906906
edge_type: data_flow
907907
label: resolved path and checksum
908-
- source: stage2_target_catalog_load
908+
- source: stage2_target_config_load
909909
target: stage2_target_config_apply
910910
edge_type: data_flow
911911
label: include/exclude rules

policyengine_us_data/calibration/unified_calibration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,10 @@ def parse_args(argv=None):
508508

509509
@pipeline_node(
510510
PipelineNode(
511-
id="stage2_target_catalog_load",
511+
id="stage2_target_config_load",
512512
label="Load Stage 2 Target Config",
513513
node_type="library",
514-
description="Load the include/exclude target-selection catalog used by Stage 2 package construction.",
514+
description="Load the YAML include/exclude target-selection config used by Stage 2 package construction.",
515515
source_file="policyengine_us_data/calibration/unified_calibration.py",
516516
status="current",
517517
stability="moving",

0 commit comments

Comments
 (0)