Move the simulation executor to policyengine.py 6.14.0 and keep accepting US 2022 and 2023
Mantenedores costumam responder em até 2 dias
Ninguém assumiu esta issue ainda.
- #1013 de @anth-volk — fechado sem integrar
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 25/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 1
- Forks
- 1
- Merge médio
- 1d 23h
- PRs com merge (30d)
- 89
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de PolicyEngine/policyengine-sim-api
-
Update policyengine to 6.7.3Talvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Aberta
Dificuldade 2/5 Meio dia Facilidade para iniciantes 70/100
PolicyEngine/policyengine-sim-api#823 ·
Mantenedores costumam responder em até 2 dias
-
Integration tests fail due to missing UV virtual environment setupTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
PolicyEngine/policyengine-sim-api#314 ·
Mantenedores costumam responder em até 2 dias
-
Retry run-time dataset downloads, and move latest only after a deploy's checksTalvez já em andamento @anth-volk assumiu hoje. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
PolicyEngine/policyengine-sim-api#1022 ·
Mantenedores costumam responder em até 2 dias
-
Records written during a gateway request carry the route <unmatched>Talvez já em andamento @anth-volk assumiu há 1 dia. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 30/100
PolicyEngine/policyengine-sim-api#1018 ·
Mantenedores costumam responder em até 2 dias
-
Update policyengine to 6.15.0Talvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 1/100
PolicyEngine/policyengine-sim-api#1014 ·
Mantenedores costumam responder em até 2 dias
Todas as issues de PolicyEngine/policyengine-sim-api
Issues semelhantes
-
[BUG]: Compliance rules never see Unity Catalog views as viewsTalvez já em andamento @wagnercsantos assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
databrickslabs/ontos#1348 ·
Mantenedores costumam responder em até 3 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
ibm-granite/granite.build#649 ·
Mantenedores costumam responder em até 1 dia
-
`forum_pr_poster` action will always return `none` when checking for pre-existing feedback threads, even if a feedback thread already exists.Talvez já em andamento @pgmzeta assumiu hoje. AbertaE-Verified P-Major
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
goonstation/goonstation#28259 ·
Mantenedores costumam responder em até 2 dias
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
woonstadrotterdam/monumenten#70 ·
Mantenedores costumam responder em até 15 dias
-
binding:python bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia