An experiment name equal to another experiment's name plus a condition name collides in both exp_data and the simulation dict: one dataset is dropped and the other is scored against the wrong simulation
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 65/100
Direzione di ricerca
The bug is in pybnf/config.py line 1979 and pybnf/pset.py line 986. Start by reading the issue's reproduction steps and the linked code. Run the provided example with correct.conf and coll.conf to see the dataset collision. Check how experiment names and condition names are concatenated to form keys in exp_data and simulation dicts. Verify the fix by ensuring unique keys and that no data is silently dropped.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
A mutant's outputs are keyed by plain string concatenation, ds[suff + mut.suffix] (BNGLModel.execute 986; also SbmlModelNoTimeout 1640/1690 and the bngsim executes). These keys overwrite a base action whose suffix happens to equal the concatenation. On the config side, _resolve_experiment_data_key returns name+condition (config.py:1979) with no check against other experiment names, so exp_data[base][key] is also overwritten. The legacy analogue is action suffixes 'a' and 'ab' plus mutant 'b'.
Failure scenario
inducible_gene.bngl with 'condition: off (Stimulus_isOn = 0)', 'experiment: rise, condition: off, data: flat.exp', and 'experiment: riseoff, data: rise.exp'. The fit completes with n=6 (one 6-point dataset silently dropped). rise.exp is scored against the 'off' mutant of 'rise' (all zeros), so the objective is flat in k_deg, and the fit reports k_deg=2.75 from generation 0 (truth 2).
Reproduction (independent re-run)
pybnf loaded from pybnf/init.py.
LOAD (load_config):
- correct.conf, where the same two datasets are named wildtype and knockout+ko: get_suffixes ['wildtype','wildtypeko','knockout','knockoutko'], exp_data keys ['knockoutko','wildtype'], 34 data rows in total.
- coll.conf: get_suffixes ['wt','wtko','wtko','wtkoko'], exp_data keys ['wtko'] only, holding the wildtype data (Obs_B[-1]=62.18). experiment data keys {'wt': ('reversible_conversion','wtko'), 'wtko': ('reversible_conversion','wtko')}, 17 data rows in total. The knockout dataset is gone.
FIT (de, pop 24, seed 7, refine):
- correct.conf: 'objective function value of 1.08e-13', 'n=34', best kf=0.70000000, kr=0.19999999. The truth is 0.7/0.2.
- coll.conf: rc=0, 'Fitting complete', 'objective function value of 680.0964593695738', 'n=17', best kf=0.3707, kr=1.5173. kr is unidentified (1.5115 at the same objective). No warning in the console or the bnf_*.log, and FailedSimLogs is empty.
INDEPENDENT CHECK (numpy/scipy, analytic solutions):
- chi_sq of the wildtype data against the knockout curve at PyBNF's best: 680.0965 (matches PyBNF).
- The same data against the wildtype curve: 13711.1.
- The independent minimum over kf of wildtype data against the knockout curve: kf=0.37070, obj 680.0965.
- At the truth, both datasets fit with chi_sq about 1e-11.
Reachability
Any edition-2 conf in which an experiment name plus its condition name equals another experiment's name. I reproduced it with the Lesson-47 model (examples/tutorial/47_condition_perturbations/reversible_conversion.bngl) and this conf: edition = 2, model: reversible_conversion.bngl, bngl_backend = bngsim, condition: ko, perturbations: kr = 0, experiment: wt, condition: ko, data: wt.exp, experiment: wtko, data: wtko.exp, with job_type = de and objective = chi_sq. Every key used is documented. Two name pairs whose concatenations coincide ('a'+'bc' and 'ab'+'c') also trigger it. The trigger is a naming coincidence, but 'wt'/'ko'/'wtko'-style names are natural in biology, and nothing rejects them.
Where
pybnf/config.py:1979 pybnf/pset.py:986
Found in a whole-codebase audit for silently wrong results (2026-09-23); the reproduction above was re-run independently of the original finding.
- Lingua principale
- Python
- Stelle
- 25
- Fork
- 25
- Merge medio
- 4h 47m
- PR unite (30g)
- 82
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 silent-incorrectness
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
I maintainer di solito rispondono entro 1 giorno
-
bug silent-incorrectness
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/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 72/100
huggingface/sentence-transformers#4186 ·
I maintainer di solito rispondono entro 5 giorni
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
QuantEcon/QuantEcon.py#988 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
fabriziosalmi/certmate#1247 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 2/5 Mezza giornata Idoneità per principianti 72/100
sujithputta02/Esapay#13 ·