Run one warm-up calculation in the simulation workers' snapshot hook
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 1
- フォーク
- 1
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 60
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PolicyEngine/policyengine-sim-api のほかの issue
-
Rename Populace to Microcosm in docstrings and test names対応中かも @MaxGhenis が 10 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
PolicyEngine/policyengine-sim-api#1086 ·
メンテナーはふだん 1 日以内に返信
-
Update policyengine to 6.20.2対応中かも @policyengine が 10 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 63/100
PolicyEngine/policyengine-sim-api#1083 ·
メンテナーはふだん 1 日以内に返信
-
Update policyengine to 6.7.3再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 半日 初心者へのやさしさ 70/100
PolicyEngine/policyengine-sim-api#823 ·
メンテナーはふだん 1 日以内に返信
-
Integration tests fail due to missing UV virtual environment setup対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
PolicyEngine/policyengine-sim-api#314 ·
メンテナーはふだん 1 日以内に返信
-
Read dynamics from API v1's dynamic_parameters and dynamic_parameter_values tables対応中かも @anth-volk が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
PolicyEngine/policyengine-sim-api#1128 ·
メンテナーはふだん 1 日以内に返信
PolicyEngine/policyengine-sim-api の issue をすべて見る
似ている issue
-
claude-subscription-directsdk: tool calls with raw control characters in string values are droppedオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NousResearch/hermes-official-plugins#538 ·
メンテナーはふだん 3 日以内に返信
-
bug(qdiffusion): EnergyModel.score_visible_logits computes biased visible/hidden on-ratios when solver returns variable solution counts per candidate対応中かも @houzhongyu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
qboson/kaiwu-pytorch-plugin#2133 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MakazhanAlpamys/Soup#3415 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信