Reuse the baseline across UK local-area breakdown runs
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- python
- Bereich
- backend, performance
Rechercherichtung
Start by reading src/policyengine_simulation_executor/simulation_runtime.py, especially _uk_area_simulations, and inspect the JobStage.BASELINE spans to measure how much run time the baseline uses. If the cost is significant, compare the proposed cache and warm-worker options and choose an approach keyed by bundle, year, region, and the exact normalized baseline policy. Done means shared eligible runs reuse the baseline while disclosure checks and baseline stage reporting remain intact.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem
Each UK breakdown=local_areas run builds and computes its own baseline on the routed local-area dataset (_uk_area_simulations in projects/policyengine-simulation-executor/src/policyengine_simulation_executor/simulation_runtime.py). The baseline depends only on the bundle (model and dataset), the year, the region filter (UK-wide or a nation) and the baseline policy. For the usual case (current-law baseline), it is the same for every reform, but every breakdown request pays for it again.
The local-area dataset is the dense file, so the baseline is a large part of each breakdown's run time and cost.
Proposal
Reuse the baseline across breakdown requests that share the same bundle, year, region filter and baseline policy. Options:
- Cache the baseline's computed household-level outputs that the area builder reads (for example in the worker volume or object storage), keyed by bundle sha, year, region and a hash of the normalised baseline policy.
- Keep a warm baseline in the worker between jobs for the same key.
Things to keep: the disclosure checks, the stage reporting (JobStage.BASELINE), and an exact match on the baseline policy, so a custom baseline never reuses a current-law result.
Next step
Measure first: the share of a breakdown's run time that the baseline takes, from the stage spans. If it is large, choose option 1 or 2. Related: PolicyEngine/policyengine-app-v2#1411 (the app's duration estimate for a breakdown).
🤖 Generated with Claude Code
- Vorherrschende Sprache
- Python
- Sterne
- 1
- Forks
- 1
- Ø Merge
- 1 T. 12 Std.
- Gemergte PRs (30 T.)
- 71
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
-
Sim's table models still map the report columns API v1 dropsEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
PolicyEngine/policyengine-sim-api#1110 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Rename Populace to Microcosm in docstrings and test namesEvtl. vergeben @MaxGhenis hat das vor 6 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
PolicyEngine/policyengine-sim-api#1086 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Update policyengine to 6.20.2Evtl. vergeben @policyengine hat das vor 6 Tagen übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 63/100
PolicyEngine/policyengine-sim-api#1083 ·
Maintainer antworten meist innerhalb von 1 Tag
-
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 1 Tag
-
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 1 Tag
Alle Issues in PolicyEngine/policyengine-sim-api
Ähnliche Issues
-
eegprep-lean: set channel types from the Zarr group's channel_typeEvtl. vergeben @claude hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
sccn/eegprep#668 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Upgrade Django to 5.2.18Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
blacklanternsecurity/bbot#3679 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Link Checker ReportOffenBot Type: Bug Type: Documentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
speakeasy-api/speakeasy#2159 ·
Maintainer antworten meist innerhalb von 1 Tag