PEtab import_job writes sampler confs that cannot record a draw: max_iterations = 100 with the default burn_in of 10000, and pt with no beta_range

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

Đọc pybnf/petab/import_.py quanh _DEFAULT_SETTINGS và các thiết lập được ghi gần dòng 2077. Tái hiện bằng fixture được cung cấp và kiểm tra từng cấu hình sampler được tạo bằng check_fresh_run. Hoàn thành khi các cấu hình sampler có cửa sổ lấy mẫu và cấu hình pt có beta_range, cùng với một kiểm thử hồi quy bao phủ mọi cấu hình sampler mà trình nhập ghi ra.

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

Mô tả

bug

pybnf.petab.import_.import_job writes the same run settings for every job type: population_size = 50, max_iterations = 100 and verbosity = 0 (_DEFAULT_SETTINGS, pybnf/petab/import_.py:219, written at :2077). For a sampler, burn_in is left at its default of 10000, so the generated sampler confs cannot record a draw:

  • Since #1066, dream, p_dream, am, mh and pt are refused at start with "max_iterations (100) must be greater than burn_in (10000), otherwise no samples will be collected."
  • Before #1066 they ran to an empty samples.txt and reported "Fitting complete" (#921).
  • The pt conf also gets no beta_range, so loading it warns that its replica exchanges will accomplish nothing.
  • hmc is accepted (it does not read max_iterations).

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

Reproduction
import os, re
from pathlib import Path
from pybnf.petab.import_ import import_job
from pybnf import parse, config, printing

out = import_job(Path('tests/petab_fixtures/fixedsigma_v2/problem.yaml'), Path('/tmp/imp'), job_type='all')
os.chdir(out)
for c in sorted(out.glob('imported_*.conf')):
    try:
        conf = config.Configuration(parse.ploop(c.read_text().splitlines(keepends=True)))
        conf.check_fresh_run()
        print(c.name, 'accepted')
    except printing.PybnfError as e:
        print(c.name, 'refused:', e.message.splitlines()[0])

imported_am.conf, imported_dream.conf, imported_mh.conf, imported_p_dream.conf and imported_pt.conf are refused; imported_hmc.conf is accepted. The same happens with job_type='dream' (or any one sampler) in place of 'all'.

What should happen

For a sampler job type, the importer should write a run that records draws:

  • a burn_in below max_iterations, with a max_iterations long enough to leave a sampling window;
  • for pt, a beta_range.

A test should put every sampler conf the importer writes through check_fresh_run, as the reproduction does.

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.