Skip to content

Add scoped Stage 3 fit result bundles#1046

Merged
anth-volk merged 4 commits into
mainfrom
agent/stage-3/pr-3b-scoped-input-output-bundles
May 21, 2026
Merged

Add scoped Stage 3 fit result bundles#1046
anth-volk merged 4 commits into
mainfrom
agent/stage-3/pr-3b-scoped-input-output-bundles

Conversation

@anth-volk
Copy link
Copy Markdown
Collaborator

Fixes #1045

Summary

  • Add Stage 3 FittedWeightsInputBundle, FitResultBytes, and FittedWeightsOutputBundle types for scoped fit inputs/results.
  • Keep _collect_outputs(...) as the legacy stdout-marker adapter while routing through the transport model.
  • Convert regional and national remote results into scoped output bundles before writing files, and attach scope-specific fit diagnostics to step manifests.

Validation

  • ruff check modal_app/pipeline.py modal_app/remote_calibration_runner.py policyengine_us_data/fit_weights/__init__.py policyengine_us_data/fit_weights/bundles.py tests/unit/fit_weights/test_bundles.py tests/unit/fit_weights/test_pipeline_docs.py tests/unit/test_pipeline_source_contracts.py
  • ruff format --check modal_app/pipeline.py modal_app/remote_calibration_runner.py policyengine_us_data/fit_weights/__init__.py policyengine_us_data/fit_weights/bundles.py tests/unit/fit_weights/test_bundles.py tests/unit/fit_weights/test_pipeline_docs.py tests/unit/test_pipeline_source_contracts.py
  • uv run --no-sync --with pytest --with pyyaml --with huggingface-hub python -m pytest tests/unit/fit_weights/test_bundles.py tests/unit/fit_weights/test_pipeline_docs.py tests/unit/test_pipeline.py tests/unit/test_pipeline_doc_guards.py tests/unit/test_pipeline_docs_extractor.py tests/unit/test_pipeline_source_contracts.py tests/unit/test_remote_calibration_runner.py
  • uv run --no-sync --with pyyaml python scripts/run_quality_guards.py
  • uv run --no-sync --with pyyaml python scripts/extract_pipeline_docs.py --json /private/tmp/stage3-pr3b-pipeline-docs/pipeline_map.json --api-json /private/tmp/stage3-pr3b-pipeline-docs/pipeline_api.json --markdown /private/tmp/stage3-pr3b-pipeline-docs/pipeline-map.md
  • make lint
  • uv run --no-sync --with towncrier towncrier check --compare-with agent/stage-3/pr-3a-specs-artifact-identity
  • git diff --check

@anth-volk anth-volk force-pushed the agent/stage-3/pr-3a-specs-artifact-identity branch from cf9ef1e to a52a0e1 Compare May 20, 2026 15:22
@anth-volk anth-volk force-pushed the agent/stage-3/pr-3b-scoped-input-output-bundles branch from 6791792 to 171322a Compare May 20, 2026 16:02
@anth-volk anth-volk changed the base branch from agent/stage-3/pr-3a-specs-artifact-identity to main May 20, 2026 16:02
@anth-volk anth-volk force-pushed the agent/stage-3/pr-3b-scoped-input-output-bundles branch 4 times, most recently from e3eca4d to bc42eef Compare May 21, 2026 14:33
@anth-volk anth-volk force-pushed the agent/stage-3/pr-3b-scoped-input-output-bundles branch from bc42eef to 8f41e8b Compare May 21, 2026 16:20
@anth-volk anth-volk marked this pull request as ready for review May 21, 2026 16:53
@anth-volk anth-volk merged commit 275a1d3 into main May 21, 2026
13 checks passed
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.

Add scoped Stage 3 input and output bundles

1 participant