Provenance slips: model_summary says boe_var is 'not-installed'; obr_shock records model_id 'obr-emulator' and the wrong source_url

オープン 初心者向け
#225 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 9 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python

調査の方向性

まず integration/src/policyengine_macro/core.py:4174 を確認し、その distribution の値を1432行目と1498行目の forecast_uk および latest_shocks のエントリと比較します。boe_var をインポートできる場合の svar_summary() の出所を検証する回帰テストを追加し、issue の提案どおり報告されたソースパスを変更すべきか確認します。パッケージのバージョンが正しく報告され、テストが通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

What

model_summary (MCP) and pe-macro summary (CLI) report package_version: "not-installed" for the BoE SVAR, even though boe_var is installed and every other SVAR tool records 0.1.0.

Evidence

integration/src/policyengine_macro/core.py:4174 (main 153cf41, same on the redesign branch) asks for the distribution "boe-var-model". The installed distribution is boe-var (uv pip install "policyengine-macro[models] @ git+…#subdirectory=integration" → + boe-var==0.1.0). forecast_uk / latest_shocks use distribution="boe_var" (core.py:1432, :1498) and get 0.1.0.

Hosted, 6 Nov 2026:

model_summary() ->
  "source": "/Users/janansadeqian/boe-var-model/results",
  "provenance": {"package": "boe-var-model", "package_version": "not-installed", "model_version": "not-installed", "source_revision": "42cbcbb…", ...}
forecast_uk(horizons=4) ->
  "provenance": {"package": "boe_var", "package_version": "0.1.0", ...}

Same locally from a fresh venv: core.svar_summary()["provenance"]["package_version"] == "not-installed".

Second, smaller point: the hosted source field is the container path /Users/janansadeqian/boe-var-model/results. That is by design (integration/modal_app.py:19-28 bakes repos at the same absolute paths), but to a user it reads as a developer's home directory. Consider reporting the path relative to the package, or omitting it in favour of source_url + source_revision.

Fix

Change distribution="boe-var-model" to "boe_var" at core.py:4174, plus a test that svar_summary()["provenance"]["package_version"] != "not-installed" when boe_var is importable.

Found in the r5 end-to-end test of the "Use the models" page.

🤖 Generated with Claude Code

主要言語
HTML
スター
3
フォーク
0
平均マージ
8日 15時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PolicyEngine/macro のほかの issue

PolicyEngine/macro の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。