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

Đang mở Phù hợp với người mới
#225 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 9 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend-api-design

Hướng nghiên cứu

Bắt đầu với integration/src/policyengine_macro/core.py:4174 và so sánh giá trị distribution của nó với các mục forecast_uk và latest_shocks ở dòng 1432 và 1498. Thêm kiểm thử hồi quy cho nguồn gốc của svar_summary() khi có thể import boe_var, đồng thời kiểm tra xem có nên thay đổi đường dẫn nguồn được báo cáo như issue đề xuất hay không. Hoàn tất khi phiên bản package được báo cáo chính xác và kiểm thử chạy thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
HTML
Star
3
Fork
0
Merge trung bình
8 ngày 15 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PolicyEngine/macro

Tất cả issue của PolicyEngine/macro

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.