Move the simulation executor to policyengine.py 6.14.0 and keep accepting US 2022 and 2023
维护者通常 2 天内回复
评估
调研方向
Read _load_dataset in projects/policyengine-simulation-executor/src/policyengine_simulation_executor/simulation_runtime.py and the dependency lists in projects/policyengine-simulation-executor/pyproject.toml; inspect the existing unit tests and the precompute calls. Update the dependency and lockfile, add the temporary opt-out and a test for US 2022 or 2023, then confirm precompute calls are unchanged.
由索引模型根据 Issue 内容生成。
描述
Problem
Since policyengine.py 6.13.0 (PolicyEngine/policyengine.py#730), create_datasets and ensure_datasets raise UnsupportedDatasetYearError when a requested year is outside the years the installed country model supports the source dataset for. For the US, that refuses 2022 and 2023, which come before the 2024 data year of the certified dataset. Passing allow_unsupported_years=True skips the check. Year files that already exist are loaded without it, so the check applies whenever a year file has to be created.
The executor loads the dataset year for every simulation job through country_module.ensure_datasets(...) in _load_dataset (projects/policyengine-simulation-executor/src/policyengine_simulation_executor/simulation_runtime.py). That covers the main simulation runtime and the Stage 12 society-wide worker. The Public API and the app still offer US 2022 and 2023 for society-wide runs. If the executor moved to policyengine.py 6.13.0 or later without a change, those runs would fail partway through with an error the caller is not told the reason for.
The executor pins policyengine[models]==6.12.0, whose ensure_datasets has no allow_unsupported_years argument, so the opt-out and the version change have to ship in the same pull request. The automated update pull requests (#1011 for 6.14.0, #1002 for 6.13.0 and #990 for 6.12.1) change only the version.
Plan
- Move the executor to policyengine.py 6.14.0, and pass
allow_unsupported_years=Truefrom_load_dataset, so the simulation service keeps accepting every year the Public API offers. The precompute steps that build dataset year files keep the check; they build 2025, 2026 and 2027, which are supported. - The Public API stops offering US 2022 and 2023 for society-wide runs and refuses them with a 400.
- This repository then removes the opt-out, so the executor refuses unsupported years as well.
This issue covers step 1. Until step 3, policyengine.py updates are not held back by the year check.
Acceptance criteria
projects/policyengine-simulation-executor/pyproject.tomlrequirespolicyengine[models]==6.14.0in both of its dependency lists, anduv.lockis regenerated._load_datasetpassesallow_unsupported_years=Truetoensure_datasets, with a comment saying the opt-out is temporary and when it is removed.- The precompute calls to
ensure_datasetsare unchanged. - A unit test with a fake country module shows that a request for US 2022 or 2023 loads its dataset.
- 主要语言
- Python
- 星标
- 1
- 派生
- 1
- 平均合并
- 2 天 48 分钟
- 30 天内合并 PR
- 87
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PolicyEngine/policyengine-sim-api 的其他 Issue
-
Update policyengine to 6.7.3可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 半天 新手友好度 70/100
PolicyEngine/policyengine-sim-api#823 ·
维护者通常 2 天内回复
-
Integration tests fail due to missing UV virtual environment setup可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
PolicyEngine/policyengine-sim-api#314 ·
维护者通常 2 天内回复
-
Update policyengine to 6.15.0可能已有人在做 @policyengine 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 1/100
PolicyEngine/policyengine-sim-api#1014 ·
维护者通常 2 天内回复
-
Update policyengine to 6.14.0可能已有人在做 @policyengine 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 58/100
PolicyEngine/policyengine-sim-api#1010 ·
维护者通常 2 天内回复
-
Move the deploy workflow's routing and sentinel steps into tested scripts可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 1/100
PolicyEngine/policyengine-sim-api#1003 ·
维护者通常 2 天内回复
查看 PolicyEngine/policyengine-sim-api 的全部 Issue
相似的 Issue
-
request-theme
难度 1/5 1 小时以内 新手友好度 78/100
LizardByte/ThemerrDB#9883 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
Project-MONAI/MONAI#9258 ·
维护者通常 3 天内回复
-
catalog:deprecation
难度 1/5 1 小时以内 新手友好度 88/100
surendranb/free-inference#31 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
fritzprix/libr-agent#2612 ·
维护者通常 1 天内回复
-
needs-triage presubmit-gate
难度 2/5 1-3 小时 新手友好度 76/100
gke-labs/kube-agents#5001 ·
维护者通常 1 天内回复