Move the simulation executor to policyengine.py 6.14.0 and keep accepting US 2022 and 2023
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
- #1013 von @anth-volk — ohne Merge geschlossen
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Python
- Sterne
- 1
- Forks
- 1
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 89
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus PolicyEngine/policyengine-sim-api
-
Update policyengine to 6.7.3Evtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offen
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 70/100
PolicyEngine/policyengine-sim-api#823 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Integration tests fail due to missing UV virtual environment setupEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
PolicyEngine/policyengine-sim-api#314 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Retry run-time dataset downloads, and move latest only after a deploy's checksEvtl. vergeben @anth-volk hat das heute übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
PolicyEngine/policyengine-sim-api#1022 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Records written during a gateway request carry the route <unmatched>Evtl. vergeben @anth-volk hat das heute übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 30/100
PolicyEngine/policyengine-sim-api#1018 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Update policyengine to 6.15.0Evtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 1/100
PolicyEngine/policyengine-sim-api#1014 ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in PolicyEngine/policyengine-sim-api
Ähnliche Issues
-
Remove the `pull_request_target` workflow before GitHub blocks itEvtl. vergeben @jat255 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
IBM/mcp-context-forge#7483 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
bug good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
[Bug Report]: OpenAI 辅助 API 连通性测试因输出上限仅 1 token 误报“未知错误”Evtl. vergeben @fjfanjian hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Project-N-E-K-O/N.E.K.O#3640 ·
Maintainer antworten meist innerhalb von 1 Tag
-
author-page correction
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
acl-org/acl-anthology#10808 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag