min_objective stops a sampler run early and reports "Fitting complete": samplers should refuse it

Đang mở Phù hợp với người mới
#1,072 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ó
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
testing

Hướng nghiên cứu

Bắt đầu bằng cách lần theo cách min_objective được phân tích cú pháp và xác thực cho các loại sampler được liệt kê, sau đó kiểm tra tài liệu của khóa và các bài kiểm thử cấu hình hiện có. Bổ sung các bài kiểm thử để xác nhận mỗi sampler từ chối thiết lập này khi khởi động và giải thích rằng thiết lập này chỉ dành cho optimizer; công việc hoàn tất khi bài kiểm thử từ chối đạt và tài liệu nêu rõ min_objective áp dụng cho optimizer.

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

Mô tả

bug

min_objective is an optimizer's stop: "Stop fitting if an objective function lower than this value is reached." Samplers honour it too. A sampler run stops at the first proposal that scores below it, prints "Minimum objective value achieved" and "Fitting complete", and exits 0. It has run a small fraction of the requested iterations, and has a correspondingly small samples.txt.

A low objective on a sampler is just a draw near the mode, not a goal reached. And because when the run stops depends on the chain's own path, the draws it kept are not a fixed-length sample of the posterior. The run also writes no final credible intervals or histograms, the same end state as a wall_time_fit stop (#1068).

Found while reviewing #1066. Reproduced on main at cbb8159c. Since #921, a min_objective stop before the first draw is an error, whose hint says this key stops a sampler. A stop after the first draw is still reported as success.

Reproduction
edition = 2
objective = gaussian, mean = 0 0, variance = 1 1
uniform_var = g1 -10 10
uniform_var = g2 -10 10
random_seed = 1
output_dir = out
job_type = dream
population_size = 4
max_iterations = 20000
burn_in = 10
min_objective = 0.002

pybnf -c x.conf -o:

  • It prints "Completed iteration 610 of 20000", "Minimum objective value achieved" and "Fitting complete", and exits 0.
  • samples.txt has 24 draws, against about 800 for the full run at the default sample_every = 100.
  • Results/ has no credible* files.
What should happen

Refuse min_objective for every sampler (am, dream, p_dream, mh, pt, hmc) at start, naming the key and saying it applies to optimizers. Add a test for the refusal. Update the key's documentation to say so.

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.