continue_run applies adaptive_files/MLE_params.txt by position, with no check of its length or of which parameter each value belongs to

Đang mở
#1,044 0 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 1 ngày

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/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ệ
numpy, python
Lĩnh vực
data

Hướng nghiên cứu

Read pybnf/algorithms/samplers/base.py around lines 371–374 and pybnf/algorithms/samplers/adaptive_mcmc.py around lines 283 and 630 to trace how MLE values are saved and loaded. Check the existing tests for continue_run and how configuration parameter names are represented. Done when loading rejects a count or name mismatch with a clear error, and a one-parameter file loads without an indexing error.

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

Mô tả

bug silent-incorrectness

adaptive_files/MLE_params.txt holds values only, with no parameter names (written by np.savetxt at pybnf/algorithms/samplers/adaptive_mcmc.py:630). continue_run = 1 applies those values by position (pybnf/algorithms/samplers/base.py:371-374; adaptive_mcmc.py:283). Nothing checks the file against the configuration:

  • Too many values: an extra value is silently dropped.
  • Reordered declarations: if the uniform_var lines are reordered between runs, or the file is permuted, every chain starts from the wrong values, possibly outside the boxes, with no error.
  • One free parameter: np.loadtxt returns a 0-d array, so self.mle_start[i] should raise "too many indices". The 0-d return is confirmed; the full continue_run run is not.

#1013 covers the same problems for starting_params; this is the continue_run side. It was found in independent review of the #984 follow-ups.

Fix: write the names, and on load check the count and the names against the configuration. Refuse a mismatch, naming it.

Ngôn ngữ chính
Python
Star
25
Fork
25
Merge trung bình
4 giờ 5 phút
Pull request đã merge (30 ngày)
10

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 lanl/PyBNF

Tất cả issue của lanl/PyBNF

Issue tương tự

Thêm issue về Python

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.