Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #744
Context
This starts the H5 architecture migration as a series of smaller,
scoped, backwards-compatible PRs instead of one large overhaul branch.
The live pipeline on
mainworks. The goal here is not to replace theruntime flow yet. The goal is to introduce the first internal seams that
later PRs can build on without continuing to widen the legacy
procedural surface.
How This Fits The Broader Migration
This is PR 1 in the incremental
local_h5migration.It establishes:
results
It does not yet move:
Those land in later migration PRs.
What This PR Does
policyengine_us_data/calibration/local_h5/__init__.pypolicyengine_us_data/calibration/local_h5/contracts.pypolicyengine_us_data/calibration/local_h5/partitioning.pyAreaFilterAreaBuildRequestPublishingInputBundleValidationPolicyValidationIssueValidationResultAreaBuildResultWorkerResultpartition_weighted_work_items(...)modal_app/local_area.py::partition_work(...)to become acompatibility wrapper over the new pure helper
What This PR Does Not Do
build_h5(...)USAreaCatalogWorkerSessionExisting Interface: Preserved vs Replaced
Preserved:
modal_app/local_area.pypublic behaviorpartition_work(...)compatibility wrapper and call shape{"type": ..., "id": ..., "weight": ...}"type:id"Replaced internally:
heapqscheduling logic inmodal_app/local_area.pyis nolonger the canonical implementation
New canonical internal owner:
policyengine_us_data.calibration.local_h5.partitioning.partition_weighted_work_itemsTesting
Passed:
python -m py_compileon touched modules and testsBlocked in this environment:
uv run pytest tests/unit/calibration/test_local_h5_contracts.py tests/unit/calibration/test_local_h5_partitioning.py tests/unit/test_modal_local_area.pybecause
torch==2.9.1has no compatible wheel for macOS x86_64 herepython -m pytest ...because shared
tests/conftest.pyimportsgoogle.auth, which is notinstalled in the active environment