Run one warm-up calculation in the simulation workers' snapshot hook
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Start in projects/policyengine-simulation-executor/src/modal/app.py and read the SimulationWorker and SimulationSegmentWorker @modal.enter(snap=True) hooks. Check how the baked region group and first precompute year are selected, then run the existing simulation checks to verify the warm-up produces identical results and a failure only logs a warning. Issue #1134 already has an open linked pull request.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
The simulation workers (SimulationWorker and SimulationSegmentWorker in projects/policyengine-simulation-executor/src/modal/app.py) load both countries' models in their @modal.enter(snap=True) hook, so containers restored from a memory snapshot start with the models loaded. A restored container's first calculation is still slower than its later ones, because a process's first calculation for a year does one-time work the preload doesn't do.
Measured on Modal testing:
- 2026-11-25, 8 CPUs: one warm-up calculation of a region group baked into the image, run in the snapshot hook, made restored containers' first calculation 11–15 s faster, with identical results. Containers that took the snapshot started 72–97 s later.
- 2026-11-26, 1 CPU: the same warm-up made the first calculation 13–16 s faster, and results were identical.
Wanted: the snapshot hook runs one calculation of a baked region group for the first precompute year before Modal takes the snapshot. A failed warm-up only logs a warning and never stops a container from starting. The warm-up opens no network connection, reads no Modal Secret, sends no telemetry, and leaves nothing that changes a later call's result.
- Vorherrschende Sprache
- Python
- Sterne
- 1
- Forks
- 1
- Ø Merge
- 1 T. 14 Std.
- Gemergte PRs (30 T.)
- 60
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
-
Rename Populace to Microcosm in docstrings and test namesEvtl. vergeben @MaxGhenis hat das vor 10 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 10 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
-
Read dynamics from API v1's dynamic_parameters and dynamic_parameter_values tablesEvtl. vergeben @anth-volk hat das vor 1 Tag übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
PolicyEngine/policyengine-sim-api#1128 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in PolicyEngine/policyengine-sim-api
Ähnliche Issues
-
claude-subscription-directsdk: tool calls with raw control characters in string values are droppedOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
NousResearch/hermes-official-plugins#538 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
bug(qdiffusion): EnergyModel.score_visible_logits computes biased visible/hidden on-ratios when solver returns variable solution counts per candidateEvtl. vergeben @houzhongyu hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
qboson/kaiwu-pytorch-plugin#2133 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
MakazhanAlpamys/Soup#3415 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 2 Tagen