Record simulation runs and report runs, and their outcomes when Modal reports that a call ended
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 15/100
调研方向
Start at the Simulation Entrypoint and the existing schema/migrations that define simulation.simulation_runs and simulation.report_runs. Trace how v2 Modal calls are dispatched and where sim's main URL receives callbacks, then map the conditional status transitions and the Cloud Run safety job. Done means runs move only through expected-status updates, Modal callbacks are verified and idempotent, abandoned dispatching runs are failed by the sweeper, and deploys pass sim's Modal token to the entrypoint.
由索引模型根据 Issue 内容生成。
描述
Each simulation can run many times (on newer model or data versions, or when a user runs a report again), and a report run should reuse a simulation run that already exists, most often the current-law baseline. The Simulation Entrypoint needs to record those executions and learn their outcomes without any caller polling:
simulation.simulation_runs: one execution of a simulation for a catalog version and year, with the region and dataset rows it resolved in that version, its status (pending,dispatching,running,succeeded,failed), Modal call ID, timings, error, trigger and attempt number; unique per simulation, catalog version, year and attempt.simulation.report_runs: one calculation of a report, joining a baseline and a reform simulation run of the same catalog version and year, with the economy comparison step's own status and Modal call.- Every status change is one conditional update on the expected status, so a second writer changes nothing; only the caller that moves runs from
pendingtodispatchingstarts their Modal call; a household report's two runs share one call and change together. - When a v2 Modal call ends, it reports that to sim's main URL with the call ID and run IDs (no result). sim checks that the request comes from sim's own Modal function, asks Modal for the call's outcome itself, and records it. A repeated report changes nothing.
- A safety check, a Cloud Run job that Cloud Scheduler starts every few minutes, records calls whose report never arrived and fails runs left
dispatching. It runs only the promoted revision's image. - The web service keeps no CPU or instance for recording, so a rejected or rolled-back revision never records anything. Every deploy gives the entrypoint sim's own Modal token.
No route creates runs yet; the stage 2 routes do, and the v2 Modal functions call the sender then.
- 主要语言
- Python
- 星标
- 1
- 派生
- 1
- 平均合并
- 1 天 12 小时
- 30 天内合并 PR
- 71
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PolicyEngine/policyengine-sim-api 的其他 Issue
-
Sim's table models still map the report columns API v1 drops可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
PolicyEngine/policyengine-sim-api#1110 ·
维护者通常 1 天内回复
-
Rename Populace to Microcosm in docstrings and test names可能已有人在做 @MaxGhenis 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
PolicyEngine/policyengine-sim-api#1086 ·
维护者通常 1 天内回复
-
Update policyengine to 6.20.2可能已有人在做 @policyengine 于 6 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 63/100
PolicyEngine/policyengine-sim-api#1083 ·
维护者通常 1 天内回复
-
Update policyengine to 6.7.3可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 半天 新手友好度 70/100
PolicyEngine/policyengine-sim-api#823 ·
维护者通常 1 天内回复
-
Integration tests fail due to missing UV virtual environment setup可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
PolicyEngine/policyengine-sim-api#314 ·
维护者通常 1 天内回复
查看 PolicyEngine/policyengine-sim-api 的全部 Issue
相似的 Issue
-
eegprep-lean: set channel types from the Zarr group's channel_type可能已有人在做 @claude 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
blacklanternsecurity/bbot#3679 ·
维护者通常 2 天内回复
-
Bot Type: Bug Type: Documentation
难度 1/5 1 小时以内 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 80/100
speakeasy-api/speakeasy#2159 ·
维护者通常 1 天内回复