Require policyengine-core 3.32.9 and stop exporting HF_TOKEN in CI - #1898
Merged
Merged
Conversation
policyengine-core 3.32.9 (PolicyEngine/policyengine-core#538) treats a Hugging Face repo as requiring authentication when it is private or gated, so it now passes HUGGING_FACE_TOKEN explicitly to hf_hub_download for policyengine/policyengine-uk-data-private, which is public but gated. The HF_TOKEN export added in #1817 only worked around core sending token=None for that repo, so remove it from both test workflows and raise the core floor so the fix is always installed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Merged at the reviewed head 7b578f5 with a merge commit, per this repo's history. Gates at merge time:
Follow-up outside this repo: Carried out under decision d051 (Max 2026-09-29). |
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 #1816
Summary
policyengine-core 3.32.9 (PolicyEngine/policyengine-core#538, released 2026-09-29) treats a Hugging Face repo as requiring authentication when it is private or gated, so
download_huggingface_datasetnow passesHUGGING_FACE_TOKENexplicitly tohf_hub_downloadforpolicyengine/policyengine-uk-data-private, which has been public but gated since 31 July 2026. Before that release core senttoken=Nonefor this repo, and #1817 worked around it by also exportingHF_TOKEN, huggingface_hub's implicit-token variable.This PR:
policyengine-core>=3.32.9(and relocks:uv.lockmoves core from 3.30.4 to 3.32.9; the lock's own entry for this package also catches up from 2.102.0 to the 2.102.3 already inpyproject.toml, and nothing else changes);HF_TOKENexport and its comment fromcode_changes.yamlandpr_code_changes.yaml, keeping theHUGGING_FACE_TOKENexport.policyengine_uk/simulation.pyis the only place in this repo that downloads from Hugging Face, and it goes through core'sdownload_huggingface_dataset.test_behavioral_responses.pychecksHUGGING_FACE_TOKEN, notHF_TOKEN, so it is unaffected. CI's separateuv pip install policyengine --systemstep does not pin core (thepolicyengine-core==pins inpolicyengine6.1.2 are only in its extras).Verification
HUGGING_FACE_TOKENset (noHF_TOKEN,HF_HUB_DISABLE_IMPLICIT_TOKEN=1, a freshHF_HOME), downloadingenhanced_frs_2023_24_tiny.h5frompolicyengine/policyengine-uk-data-private:hugging_face.pybefore Simplify Housing Benefit and Guarantee Credit income variables #538 (a0ccbdac):GatedRepoError: 401 Client Error;HUGGING_FACE_TOKENexported, so it is the end-to-end check that the workaround is no longer needed.make test(dataset-backed and heavy; CI runs it) andmake format(no Python files change).axiom: n/a: CI and dependency floor only, no policy change.
🤖 Generated with Claude Code