A noise formula that uses a fixed model parameter (PEtab noiseFormula `0.5 * v3`) passes every load check, then fails each parameter set as it is scored, so the fit either stops with "Your simulations are failing to run" or finishes with an objective of inf

Đang mở
#961 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
54/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Trace the importer and scoring paths in pybnf/petab/import_.py:954-956, pybnf/config.py:2560 and 2616, pybnf/noise/source.py:616-626, and pybnf/algorithms/core.py:407-414. Reproduce the supplied PEtab example, then determine whether model parameters in noise formulas should be resolved like measurement formulas or rejected during loading. Done means the example reports the real configuration error or computes the expected objective, rather than recording every evaluation as a failed simulation with inf.

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

Mô tả

bug silent-incorrectness

A PEtab problem whose noiseFormula uses a model parameter that is not estimated, such as 0.5 * v3 with v3 = 3 in the model, imports as noise_model y = gaussian, sigma = prediction_formula 0.5 * v3 and passes every check when the job loads. Every parameter set then fails as it is scored, because PyBNF looks for v3 among the simulated columns. PyBNF counts each of these as a failed simulation, and the real cause goes only to the log file. With the importer's default settings, the fit stops after 100 of them with "Your simulations are failing to run. Logs from failed simulations are saved in the FailedSimLogs directory", although no simulation failed and FailedSimLogs is empty. A run with fewer than 100 evaluations prints only "Fitting complete", exits 0, and reports a random draw as the best fit, with an objective of inf for every parameter set. The correct noise SD is 0.5 × 3 = 1.5, which gives an objective of 0.1667 at the problem's start point.

Example

Model m.bngl: y()=v1*(x^2)+(v2*x)+v3 over a counter x that grows at rate 1 from 0, with v1 0.5, v2 1, v3 3.

PEtab tables (libpetab v2 lint: no issues):

parameters.tsv    parameterId  lowerBound  upperBound  nominalValue  estimate
                  v1           0           10          0.5           true
                  v2           0           10          1             true
observables.tsv   observableId  observableFormula  noiseFormula  noiseDistribution
                  obs_y         y                  0.5 * v3      normal
measurements.tsv  obs_y  e1  time 0, 1, 2  measurement 3.5, 4, 7.5
experiments.tsv   e1  0  (no condition)
from pybnf.petab import import_job
import_job('problem.yaml', 'imp')          # writes imp/imported.conf

Then pybnf -c imported.conf, run in imp/:

  • With the importer's default settings (population_size = 50): Error: Your simulations are failing to run. Logs from failed simulations are saved in the FailedSimLogs directory. FailedSimLogs is empty.
  • With population_size = 3, max_iterations = 1: the console shows Fitting complete, the exit code is 0, and sorted_params_final.txt lists three parameter sets, each with Obj inf. The first one listed is a random draw (v1 = 4.70, v2 = 7.37).
  • The log file has one line per evaluation: A prediction-dependent noise formula for 'y' references 'v3', which is neither a declared free parameter nor a simulated output column.

Correct value: the same job with sigma = fix_at 1.5 scores the start point (0.5, 1) at 0.16667, and numpy gives Σ(y − d)²/(2·1.5²) = 0.75/4.5 = 0.16667.

The same thing happens to other errors in the conf that PyBNF finds only while scoring. For example, a constraint file that uses par.x.par (constraint.py:469) gives "Your simulations are failing to run" with an empty FailedSimLogs, or "Fitting complete" with inf in a short run.

Why

At load, the prediction_formula is checked against the model's names, which include its parameters, so v3 passes (pybnf/config.py:2616). When each parameter set is scored, the noise source looks up every name that is not a free parameter as a simulated column and raises when it is not there (pybnf/noise/source.py:616-626). Measurement formulas (observable: ..., formula:) avoid this by reading model parameters from a constants table (config.py:2560); the noise formula has no such table. The scoring step catches every exception and records it as a failed simulation (pybnf/algorithms/core.py:407-414, from #388). The importer chooses prediction_formula because v3 is a model name (pybnf/petab/import_.py:954-956).

Possible fix

Give the noise formula the same treatment of model parameters as measurement formulas, or refuse at load and name the parameter. Separately, an error in the conf that is raised while scoring should end the run with its own message, not be counted as a failed simulation.

Related: #817 (the same scoring-step catch), #836 (measurement formulas that read a parameter changed by a condition).

Found while fixing the PEtab issues #892–#908 (2026-09-25); reproduced on main at cd2be675.

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.