Skip to content

Emit Stage 2 calibration package contract#929

Merged
anth-volk merged 9 commits into
mainfrom
feat/stage-2-calibration-package-contract
May 11, 2026
Merged

Emit Stage 2 calibration package contract#929
anth-volk merged 9 commits into
mainfrom
feat/stage-2-calibration-package-contract

Conversation

@anth-volk
Copy link
Copy Markdown
Collaborator

Fixes #926

Summary

  • Add a Stage 2 calibration package contract builder and validator.
  • Write calibration_package_contract.json next to calibration_package.pkl during package build.
  • Keep the pickle as the runtime and diagnostic artifact while validating that the JSON sidecar matches it.

Testing

  • make lint
  • uv run --no-sync towncrier check --compare-with origin/main
  • uv run --no-sync ruff check policyengine_us_data/stage_contracts/calibration_package.py policyengine_us_data/stage_contracts/__init__.py policyengine_us_data/calibration/unified_calibration.py modal_app/remote_calibration_runner.py tests/unit/test_calibration_package_stage_contract.py tests/unit/test_remote_calibration_runner.py tests/unit/calibration/test_unified_calibration.py
  • uv run --no-sync pytest tests/unit/test_calibration_package_stage_contract.py tests/unit/test_stage_contracts.py tests/unit/test_remote_calibration_runner.py tests/unit/calibration/test_unified_calibration.py

@anth-volk anth-volk marked this pull request as draft May 8, 2026 14:34
@anth-volk anth-volk force-pushed the feat/stage-2-calibration-package-contract branch 2 times, most recently from 1710f2f to 1166a75 Compare May 11, 2026 12:17
@anth-volk anth-volk force-pushed the feat/stage-2-calibration-package-contract branch from 1166a75 to cc0771d Compare May 11, 2026 12:29
@anth-volk anth-volk marked this pull request as ready for review May 11, 2026 12:55
@anth-volk anth-volk merged commit d15085e into main May 11, 2026
12 checks passed
@anth-volk anth-volk deleted the feat/stage-2-calibration-package-contract branch May 11, 2026 12:55
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.

Emit Stage 2 calibration package contract

1 participant