recommend_model: needs_distribution drops every macro model, and horizon is ignored
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start in integration/src/policyengine_macro/capabilities.py at recommend, then trace the registered model capabilities and the MCP tool definition that exposes horizon. Check how incidence tools are registered and tested before choosing an approach. Done means distribution requests return useful guidance for macro candidates and the unused horizon argument is removed or given defined routing behavior, with tests covering both.
由索引模型根據 Issue 內容生成。
描述
Problem
recommend_model (integration/src/policyengine_macro/capabilities.py, recommend) routes on question_type and country only. Two of its inputs do less than a caller expects:
needs_distribution=Truedrops every macro model. The filter keeps onlype-microsimandog+microsim. Sorecommend("economic_shock", "us", needs_distribution=True)returns no model, with the "no registered model supports this request" warning. But the suite does answer that question:frbus_shock_incidence,hank_shock_incidence(andhank_shock(include_distribution=True)),svar_inflation_incidenceanddefine_scenario_incidenceall produce household distributions. The same is true forforecast/economic_diagnosis(UK, viasvar_inflation_incidence) andclimate_policy_scenario(viadefine_scenario_incidence).horizonis ignored. It is echoed back but never used, so "long run" and "next four quarters" route the same way. (The MCP docstring now says so, on branchvahid/r5-api-scenarios.)
Evidence
Matrix run on 6 Nov 2026 (all 10 question types × uk/us/fr × needs_distribution):
economic_shockuk/us,forecastuk,economic_diagnosisuk,climate_policy_scenariouk,structural_changeuk,translated_policy_scenariouk: a candidate withneeds_distribution=False, none withTrue.
Options
- Register the incidence pairs as capability entries (
frb-us+microsim,us-hank+microsim,boe-svar+microsim,define-uk+microsim). Each needs its own quality block, so this is the honest route, but it is more work. - Keep the registry and add an
incidence_toolshint to the response whenneeds_distributionfilters out a macro candidate: "frb-us has no distribution itself; frbus_shock_incidence overlays its labour-market path on the US microsim". - Leave it as it is and document that
needs_distributionmeans "the model itself is distributional".
For horizon: either drop the argument, or define a small vocabulary (short_run, medium_term, long_run) and match it against each model's horizon field.
Recommendation
Option 2 now (small, no new quality claims). Drop horizon from the tool until there is a vocabulary, so no caller thinks it is doing something.
🤖 Generated with Claude Code
- 主要語言
- HTML
- 星號
- 3
- 分支
- 1
- 平均合併
- 1 天 20 小時
- 30 天內合併 PR
- 53
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PolicyEngine/macro 的其他 Issue
-
HANK incidence overlay omits the model's labour-tax financing可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉question
難度 2/5 1-3 小時 新手友好度 67/100
PolicyEngine/macro#214 · 2 則留言 ·
維護者通常 1 天內回覆
-
Hosted score_reform (OBR, default window) has not finished within 10 minutes since the 30 Oct deploy未關閉
難度 4/5 1-2 天 新手友好度 25/100
PolicyEngine/macro#243 · 1 則留言 ·
維護者通常 1 天內回覆
-
Referee review of the model pages (6 Nov 2026)可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉question
難度 5/5 一週以上 新手友好度 22/100
PolicyEngine/macro#227 · 5 則留言 ·
維護者通常 1 天內回覆
-
question
難度 4/5 3-5 天 新手友好度 30/100
PolicyEngine/macro#223 · 2 則留言 ·
維護者通常 1 天內回覆
-
UK SVAR adapter publishes log-difference YoY as if it were the simple rate可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉bug
難度 4/5 3-5 天 新手友好度 45/100
PolicyEngine/macro#208 · 2 則留言 ·
維護者通常 1 天內回覆
查看 PolicyEngine/macro 的全部 Issue
相似的 Issue
-
triage
難度 1/5 1 小時以內 新手友好度 64/100
-
enhancement
難度 2/5 1-3 小時 新手友好度 78/100
meetecho/juturna_nodes#43 ·
維護者通常 2 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 77/100
ranxianglei/billion-context#7860 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 66/100
-
`RequestHandler.build_request_kwargs` drops empty request bodies such as `{}` or `""`可能已有人在做 @abhirajadhikary06 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
typesense/typesense-python#170 ·
維護者通常 1 天內回覆