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
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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 showsFitting complete, the exit code is 0, andsorted_params_final.txtlists three parameter sets, each with Objinf. 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.
- Lingua principale
- Python
- Stelle
- 25
- Fork
- 25
- Merge medio
- 4h 5m
- PR unite (30g)
- 10
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lanl/PyBNF
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug tech debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
bug silent-incorrectness
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
software-mansion-labs/Diplomat#20 ·
I maintainer di solito rispondono entro 1 giorno
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaForse già presa @lijy91 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
libnativeapi/nativeapi#53 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
View Counts discarded due to field name mismatchForse già presa @rsiva0400 l’ha presa oggi. Apertasite-bug triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Model version publishes the new UK firm entity as a personForse già presa @vahid-ahmadi l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
PolicyEngine/policyengine.py#764 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
spcl/HPCAgent-Bench#264 ·
I maintainer di solito rispondono entro 1 giorno