Skip to content

Use canonical regime-gated microimpute API#256

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/regime-aware-canonical-api-20260607
Jun 7, 2026
Merged

Use canonical regime-gated microimpute API#256
MaxGhenis merged 1 commit into
mainfrom
codex/regime-aware-canonical-api-20260607

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • switch the regime-aware donor adapter from the removed microimpute.models.zero_inflated import to canonical microimpute.Imputer
  • keep sign-regime gating explicit and preserve the QRF tree/train-sample budget wrapper
  • make the regime-aware tests require the canonical microimpute API instead of skipping when zero_inflated is absent

Why

The 1c2e1e9 SSA-split candidate build failed at the first donor block because startup guards checked only version/backend fields while RegimeAwareDonorImputer.fit still imported microimpute.models.zero_inflated. The pinned canonical microimpute branch exports microimpute.Imputer from microimpute.models.regime_gated, not zero_inflated.

Local checks

  • UV_PROJECT_ENVIRONMENT=.venv313 env -u PYTHONPATH -u UV_FROZEN uv run --python 3.13 --extra dev --extra policyengine python -m pytest tests/pipelines/test_regime_aware_donor_imputer.py -q
  • UV_PROJECT_ENVIRONMENT=.venv313 env -u PYTHONPATH -u UV_FROZEN uv run --python 3.13 --extra dev --extra policyengine python -m pytest tests/pipelines/test_regime_aware_donor_imputer.py tests/pipelines/test_pe_us_data_rebuild.py tests/pipelines/test_pe_us_data_rebuild_checkpoint.py tests/data_sources/test_scf_net_worth_components.py -q
  • UV_PROJECT_ENVIRONMENT=.venv313 env -u PYTHONPATH -u UV_FROZEN uv run --python 3.13 --extra dev --extra policyengine ruff check src/microplex_us/pipelines/donor_imputers.py tests/pipelines/test_regime_aware_donor_imputer.py

@MaxGhenis MaxGhenis merged commit a3a1934 into main Jun 7, 2026
5 checks passed
@MaxGhenis MaxGhenis deleted the codex/regime-aware-canonical-api-20260607 branch June 7, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant