Synthesized experiments are not isolated: a pre-equilibration experiment's setParameter values and its saveConcentrations() snapshot carry into every experiment emitted after it
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
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- backend, testing-qa
Direzione di ricerca
The bug is in pybnf/pset.py lines 1229-1257 and 1096-1098. Start by reading the ADR-0052 docstring about experiment independence. Run the reproduction scripts (repro.py, repro_scan.py) with the tutorial lesson 9 model (inducible_gene.bngl) to confirm the parameter and snapshot leakage. The fix involves adding resetParameters() calls to isolate experiments properly.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
_append_preequilibration_actions (1229-1257) emits resetConcentrations(), then setParameter(...) for the pre-equilibration condition, an unmeasured simulate, setParameter(...) for the measurement condition, [saveConcentrations() for a scan], and the measured action. add_action (1096-1098) separates later experiments with resetConcentrations() only. Nothing ever emits resetParameters(), so the measurement condition's setParameter stays in force for every later experiment in the action list. After a pre-equilibrated scan, saveConcentrations() also redefines what resetConcentrations() resets to, so a later experiment starts from the pre-equilibrated snapshot, not the seed species. bngsim interprets both the same way (net_model.py:870-918). The ADR-0052 docstring says resetConcentrations() gives 'independence from any other experiment's simulation', which does not hold for parameters.
Failure scenario
Tutorial lesson 9 model (inducible_gene.bngl) with both of its experiments in one job, washout declared first: 'experiment: washout, preequilibrate: stim_on, condition: stim_off' then 'experiment: doseresponse, data: dose_response.exp'. The dose-response scan runs with Stimulus_isOn=0 left over from washout, so A_tot = 0 at every dose. The fit completes with best obj 42.63. Swapping the two experiment lines gives obj 1.4e-7. Only declaration order differs. Separately, a pre-equilibrated scan (equilibrate at kf=5, restore kf=1, scan) followed by a plain time course makes the time course start at X=100 instead of X=0.
Reproduction (independent re-run)
- CLI fits (
pybnf -c,bngl_backend = bngsim, DE, seed 1):
- AB.conf (washout first): "objective function value of 42.62573194514001", best k_deg = 2.039. 42.625 is exactly half the sum of squares of dose_response.exp, so every dose was predicted as A_tot = 0.
- BA.conf (the same two lines swapped): 1.427e-07.
- repro.py builds the real Configuration and simulates at the true k_deg = 2 on both BNG2.pl (
BNGLModel.execute) and bngsim (BngsimModelbuilt on the generated .net, as base.py builds it). pybnf was imported from pybnf/init.py. For the WGD order (washout, then growth, then doseresponse):
- growth: PyBNF gives [0,0,0,0,0] on both backends; correct is [0, 0.94818, 1.297, 1.42532, 1.47253], i.e. 1.5(1-e^-2t).
- doseresponse: PyBNF gives [0,0,0,0,0] on both backends; correct is [0.5, 1, 2, 4, 8], i.e. k_prod/k_deg.
- In the GDW order, growth and doseresponse match the correct values.
- repro_scan.py, order SG (a pre-equilibrated
washscanscan, then plain growth): growth gives [1.5, 0.55182, 0.203, 0.07468, 0.02747] on both backends; correct is [0, 0.948, 1.297, 1.425, 1.473]. It starts from the saved snapshot A = 1.5 and decays with the stimulus left off, so both the snapshot and the parameter leak are confirmed.
Reachability
Documented edition-2 keys on tutorial lesson 9's inducible_gene.bngl:
condition: stim_on, perturbations: Stimulus_isOn = 1
condition: stim_off, perturbations: Stimulus_isOn = 0
experiment: washout, preequilibrate: stim_on, condition: stim_off, data: washout.exp
experiment: doseresponse, data: dose_response.exp
Any other experiment declared after the preequilibrate: one on the same model inherits Stimulus_isOn=0. After a pre-equilibrated scan (t_end: 1 with an indvar=k_prod data file), it also starts from the saveConcentrations() snapshot. This happens with bngl_backend = bngsim (the auto default picks it) and with BNG2.pl.
Where
pybnf/pset.py:1230 pybnf/pset.py:1232 pybnf/pset.py:1248 pybnf/pset.py:1249
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
- 5h 40m
- PR unite (30g)
- 66
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
-
tunneld on Windows: Wi-Fi devices are not discovered because uvicorn runs on a ProactorEventLoopAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
doronz88/pymobiledevice3#2051 ·
I maintainer di solito rispondono entro 1 giorno
-
Remove DatacircleAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
collabnix/awesome-mcp-lists#230 ·
I maintainer di solito rispondono entro 9 giorni
-
Groc schedules with out of range values pass config validation and fail later when the scheduler is builtForse già presa @auraseb l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
autowarefoundation/autoware_carla_scenario#342 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ianktoo/project-monitor#14 ·