Skip to content

Accept additional compatible model specifiers on release manifests#798

Open
MaxGhenis wants to merge 1 commit intomainfrom
expand-compatible-models
Open

Accept additional compatible model specifiers on release manifests#798
MaxGhenis wants to merge 1 commit intomainfrom
expand-compatible-models

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

Extends build_release_manifest with an additional_compatible_specifiers parameter so the published release_manifest.json can declare compatibility with a range of policyengine-us versions, not only the exact version used at build time.

Why

The current behaviour emits exactly one entry in compatible_model_packages==<build_version> — even when the build-time model has the same data_build_fingerprint as a range of neighbouring versions. Downstream consumers (policyengine.py, policybench) can only certify against that one pin.

In practice this has bitten us: the latest HF main release manifest pins ==1.637.0, which fails parameter validation against policyengine-core>=3.25.0. Downstream projects that want to use the certified bundle have no compatible model version to install.

Giving the data build pipeline the ability to declare e.g. ">=1.637.0,<2.0.0" when the fingerprint is stable closes that gap.

Companion PR

PolicyEngine/policyengine.py#284 extends the consuming side to parse full PEP 440 specifiers via packaging.specifiers.SpecifierSet.

Test plan

  • New test test_build_release_manifest_adds_additional_compatible_specifiers — passes
  • All 6 existing release-manifest tests continue to pass

🤖 Generated with Claude Code

`build_release_manifest` now takes `additional_compatible_specifiers`:
a list of PEP 440 specifier strings that extend the
`compatible_model_packages` list beyond the single `==<build_version>`
entry it emits by default.

Motivation: when the `data_build_fingerprint` is stable across a range
of `policyengine-us` versions, the data package can declare
compatibility without forcing downstream consumers (policyengine.py,
policybench) to rebuild the dataset for every model patch release.
Without this, the published release manifest lists only the exact
build-time model version, which in practice is sometimes a broken pin
(1.637.0 fails parameter validation against current policyengine-core).

The policyengine.py side that consumes these specifiers was extended
in PolicyEngine/policyengine.py#284 to handle full PEP 440 specifiers
via packaging.specifiers.SpecifierSet.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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