`info` method - expose information about the model

Đang mở
#1,178 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
cli, tooling

Hướng nghiên cứu

Issue không nêu tên tệp, bài kiểm thử hay các entry point; hãy bắt đầu bằng cách xác định nơi xử lý metadata của model đã biên dịch và các phương thức lệnh. Xác định metadata được info method mới cung cấp, bao gồm các chi tiết biên dịch và có thể cả nội dung Stan hoặc header, sau đó xác định cách tạo JSON tại thời điểm biên dịch hoặc một định dạng nhúng khác, đồng thời xác minh rằng đầu ra hỗ trợ các quyết định biên dịch lại và caching.

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

Mô tả

Summary:

Add a new info method that lets tools (or users) get info about the model to help e.g. deciding if the model needs recompilation.

Description:

Currently, a lot of the metadata about a compiled model can only be retrieved by running inference (Stan version, stanc flags) or not at all (cpp compile options, compiler, ...). This limits the ability of wrappers like cmdstanr to make good decisions on when to recompile a model as a change in compiler options or Stan version will not be recognized by checking modification times.

Beyond choosing to recompile or not, other tools may benefit from this metadata in my own work, the SBC package tries to do caching of its results and needs to check if the model it is given is substantially equivalent to a model the cached results were compiled with. It could rely on modification time, but this could result in some unnecessary recomputations (e.g. when the model is modified, found to be problematic and then the change is reverted). For those more extended usages by tools, it might make sense to also include the Stan code and the contents of user-provided extra .hpp in the information stored.

Since all of the information is known at a compile time, a simple implementation would have a .json (or other format) created at compile time and embedded as a resource. The output format could be configurable, but since the primary consumers are likely to be tools, it should probably default to JSON or similar.

Additional information:

If there is an agreement on implementing this, I'd be happy to write a PR.

Current Version:

v2.32.2

Ngôn ngữ chính
C++
Star
240
Fork
105
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 stan-dev/cmdstan

Tất cả issue của stan-dev/cmdstan

Issue tương tự

Thêm issue về C++

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.