Return a client error for simulation years the model cannot project its dataset to
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
Start from the year-file preparation path and the projection limit in policyengine_uk/data/dataset_schema.py, where ValueError("No dataset found for year ...") is raised. Then read job_status_routes.get_job_status and the existing SPMInputError/spm_error_detail handling to mirror the typed-error and 400-response pattern. Done means a request outside the installed model's supported year range returns HTTP 400 with code DATASET_YEAR_UNAVAILABLE, including the requested year and supported range.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
A society-wide (economy) run for a year the country model cannot project its dataset to fails as a server error instead of a client error.
- policyengine-uk projects its single-year dataset only to
PROJECTION_END_YEAR(2032 since policyengine-uk 2.130.1; 2030 before). A UK run for a later year fails while .py prepares the year file:ValueError("No dataset found for year 2033.")frompolicyengine_uk/data/dataset_schema.py. - The gateway's job-status endpoint (
job_status_routes.get_job_status) re-raises the job's exception frommodal.FunctionCall.get, redacts it and returns HTTP 500 withstatus: "failed". The entry forwards that 500, and the Public API stores it as a computation failure and returns 502. - This happened on 2026-10-15 for 2031–2035 (when the limit was 2030) and on 2026-10-26 for 2033–2039.
- A US run outside its dataset's projection (data year 2024, last projected year 2035 with the current model) does not fail: before 2024 the year file holds default inputs, and after 2035 it holds carried-over or index-uprated inputs. Neither is a supported result.
Intended change
Before .py prepares the dataset, check the requested year against the years the installed model projects the dataset to (from the source's data year to the model's projection end year), and raise a typed error with a stable code, DATASET_YEAR_UNAVAILABLE, carrying the requested year and the supported range. The gateway returns it as a 400 with that code and a readable message, following the pattern of the SPM input errors (SPMInputError, spm_error_detail).
This is the simulation service part of a change that also touches the Public API (map the code to a 400) and the app (don't offer unsupported UK years, show a readable message).
- Lingua principale
- Python
- Stelle
- 1
- Fork
- 1
- Merge medio
- 1g 15h
- PR unite (30g)
- 78
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PolicyEngine/policyengine-sim-api
-
Accept the withheld-area code lists on UK local-area breakdown results before any executor sends themForse già presa @anth-volk l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
PolicyEngine/policyengine-sim-api#977 ·
I maintainer di solito rispondono entro 1 giorno
-
Update policyengine to 6.7.3Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 Mezza giornata Idoneità per principianti 70/100
PolicyEngine/policyengine-sim-api#823 ·
I maintainer di solito rispondono entro 1 giorno
-
Integration tests fail due to missing UV virtual environment setupForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
PolicyEngine/policyengine-sim-api#314 ·
I maintainer di solito rispondono entro 1 giorno
-
Calculate budget windows on the v2 economy pathForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
PolicyEngine/policyengine-sim-api#981 ·
I maintainer di solito rispondono entro 1 giorno
-
Run whole economy reports on v2 in the Simulation EntrypointForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
PolicyEngine/policyengine-sim-api#973 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di PolicyEngine/policyengine-sim-api
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
namespace operations
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
EclipseFdn/open-vsx.org#15057 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
FinanceFlash/unvibecode#349 ·
-
Mission statement: why this is free, in the README, Why This Exists and the wiki HomeForse già presa @ChiefGyk3D l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
ChiefGyk3D/Clouds-Against-Humanity#348 ·
I maintainer di solito rispondono entro 1 giorno
-
[Perf] Default --vllm-watermark 0.05 for rollouts (hybrid models re-preempt under KV pressure)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
vllm-project/vime#508 ·
I maintainer di solito rispondono entro 4 giorni