A sampler run that wall_time_fit stops after it has draws reports "Fitting complete" but writes no final credible intervals, histograms or diagnostics

Đang mở
#1,068 0 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
58/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
data

Hướng nghiên cứu

Start with tests/test_sampler_load_refusals_review4.py, especially test_a_budget_stopped_run_with_draws_writes_its_final_posterior_output, and trace how sampler shutdown writes posterior summaries after a wall_time_fit stop. Compare that path with the max_iterations completion path and check the AM continuation outputs mentioned in the test notes. Done when the test passes without xfail and budget stopped runs with draws write the expected final outputs.

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

Mô tả

bug

A sampler run that wall_time_fit stops after it has recorded draws exits 0 with "Fitting complete" and a non-empty samples.txt. But it writes none of the final posterior output that a run reaching max_iterations writes: no credible68.0_final.txt or credible95.0_final.txt, no *_final histograms, and no diagnostics.txt. A user who reads the latest credible intervals gets the last periodic file, written at an earlier iteration than the run's last draw. ADR-0093 says a budgeted run is a finished run whose search was cut short, and writes exactly what a converged one writes. Here it doesn't.

Found while reviewing #1066. Reproduced on main at cbb8159c.

Reproduction

Analytic target, so no model or simulator is involved:

edition = 2
objective = gaussian, mean = 0 0, variance = 1 1
uniform_var = g1 -10 10
uniform_var = g2 -10 10
random_seed = 1
verbosity = 1
output_dir = out
job_type = dream
population_size = 4
max_iterations = 100000000
burn_in = 10
sample_every = 1
wall_time_fit = 40

pybnf -c x.conf -o:

  • It prints "Wall-time budget reached: stopped after 0:00:40 ... 1083 completed simulation(s)", then "Fitting complete", and exits 0.
  • samples.txt holds 1262 draws.
  • Results/ has credible68.0_{100,200,300}.txt and credible95.0_{100,200,300}.txt, and Histograms/ has g1_{100,200,300}.txt. There is no *_final file and no diagnostics.txt.

The same conf with max_iterations = 300 and no wall_time_fit writes credible68.0_final.txt, credible95.0_final.txt, Histograms/g1_final.txt, g2_final.txt and diagnostics.txt.

The review's test covers mh, pt, dream and am. It is a strict xfail in tests/test_sampler_load_refusals_review4.py: test_a_budget_stopped_run_with_draws_writes_its_final_posterior_output. The test's notes say am also writes no combined_params.txt and nothing to adaptive_files/ for a later continue_run.

What should happen

A sampler run stopped early with draws in hand should write the same final outputs as one that reaches max_iterations, from the draws it has. Otherwise it should end with an error that says the posterior summary was not written. Remove the xfail with the fix.

The same end state follows a min_objective stop (#1072). A run stopped before its first draw is already an error since #921.

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

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.