Calculate and store households through the v2 household functions

未關閉
#956 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
12/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
python

研究方向

Start with the Simulation Entrypoint's existing tables for simulations, reports, runs and household outputs, plus the route that records a Modal call ending, and the v2 Modal household functions. The /v2/household-calculations endpoint and the household report flow are the public contract to match. Done means a household calculation can be created, dispatched to the household function, polled to success or failure with spm_config and spm_provenance returned, and a staging check passes after promotion. This is multi-part design work, so confirm scope with maintainers before coding.

由索引模型根據 Issue 內容生成。

描述

The Simulation Entrypoint has tables for simulations, reports, runs and household outputs, a route on which Modal reports that a call ended, and v2 Modal household functions, but nothing calculates a household through them yet. The Public API's /v2/household-calculations and household reports need the Simulation Entrypoint to:

  • accept a household calculation (one stored household under one policy, for a catalog version and year), record it as a simulation run, start the household function's Modal call, and let the caller poll it until it succeeds or fails, with the calculated household, its warnings, the SPM selection it applied (spm_config) and its SPM receipt (spm_provenance);
  • carry the household's saved SPM choice to the household function;
  • store a household report as a report and report runs whose baseline and reform simulation runs share one Modal call;
  • record each call's outcome when the household function reports that its call ended, with the safety check covering calls that never report and runs left dispatching;
  • check on every staging deployment, after its revision is promoted, that a household calculation succeeds end to end.

Without these, household calculations cannot move from the Public API's in-process calculation to the v2 workers.

主要語言
Python
星號
1
分支
1
平均合併
1 天 12 小時
30 天內合併 PR
71

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

PolicyEngine/policyengine-sim-api 的其他 Issue

查看 PolicyEngine/policyengine-sim-api 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。