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 天内回复