Follow-up to the PEtab fixes: three valid jobs are refused, by checks added in PRs #940 and #943 and by numbered BNGL action lines that PyBNF does not recognise
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by reproducing the three cases described for PEtab export and numbered BNGL actions, comparing behavior on main and the referenced PR branches. Inspect export_job and the BNGLModel action scanner in pybnf/pset.py. Done means valid near-equal doses, molecule components named time, and numbered actions are handled without refusing or silently dropping valid work, with regression tests for each case.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Three checks refuse jobs that PyBNF should handle. None of them gives a wrong result without a message; each stops a job that is valid. Two of the checks were added by the PEtab fixes in open PRs #940 and #943, so they reach users once those PRs merge. The third is older: PyBNF does not recognise BNG's numbered action lines. On main that makes every simulation fail, and PR #944's export refuses the same file. Each is described below with the fix.
1. PR #943: two doses one float step apart are refused as "near-duplicates"
A parameter-scan experiment with two replicate files, where one file writes the dose as 0.3 and the other as 0.30000000000000004 (the same number after a floating-point sum), is refused by the PEtab export:
edition = 2
model: m.bngl
experiment: dr, data: ulp1.exp, ulp2.exp
uniform_var = kd 0.1 10
uniform_var = kb 0.1 10
ulp1.exp is # L A_tot B_tot / 0.3 0.15 0.1 / 1 0.5 0.45, and ulp2.exp is # L A_tot B_tot / 0.30000000000000004 0.16 0.1.
On #943's branch, export_job raises: "Experiment 'dr' has two distinct doses L = 0.3 (in 'ulp1.exp') and L = 0.30000000000000004 (in 'ulp2.exp') that differ by less than the fitter's dose-matching tolerance (relative 1e-05) …". main exports the job, with both rows under dr_0 at L = 0.3.
The refusal exists because the fitter matches a data row to a simulated dose within a relative 1e-5 (np.isclose, rtol = 1e-5). Between two doses that close but distinct, the fitter and a PEtab tool can pair a measurement with different simulations. For doses one or a few floating-point steps apart, however, both simulations are the same to machine precision, so exporting them as one dose is exact.
Fix: treat doses equal to within a few units in the last place as one dose, and refuse only above that, up to the fitter's tolerance.
2. PR #940: a molecule component named time is taken to mean the model reads the clock
PR #940 refuses to export a fixed-duration equilibration (equil_t_end:) for a model that reads the simulation time. Its detector also fires on a molecule type with a component named time:
begin molecule types
A()
T(time~0~1)
end molecule types
...
begin reaction rules
0 -> A() kp
A() -> 0 k*flag
T(time~0) -> T(time~1) kf
end reaction rules
with experiment: relax, preequilibrate: pre, condition: meas, equil_t_end: 0.1, data: relax.exp.
On #940's branch, export_job raises "… on model 'm.bngl', which reads the simulation time (the 'time' symbol (time() or a time-indexed tfun)) …". The model never reads time: time is a component name here.
Fix: match time() as a function call, a time-indexed tfun, or the name used in an expression, and never inside a species or molecule-type pattern.
3. Numbered action lines (1 generate_network(...)) are not recognised
BNG2.pl accepts a line index in front of an action, and runs this file without complaint:
begin actions
1 generate_network({overwrite=>1})
2 simulate({method=>"ode",t_end=>5,n_steps=>5})
end actions
PyBNF's action scanner matches generate_network only at the start of the line, so it treats 1 generate_network(...) as an ordinary action. The effect differs by branch:
- On
main, an edition-2 fit of this model (experiment: tc, data: tc.exp, a first-order decay) keeps that line in every evaluation's model. There it runs against the.netfile PyBNF has already generated, and BNG2.pl aborts every simulation with "Nothing to do: no reaction rules defined". The fit ends "Fitting complete" with objective inf, and the reason is only in each simulation's log. - On PR #944's branch, the export refuses the model, calling both lines actions "that the fit runs before its experiments but the PEtab export would drop".
- On
main, the export drops both lines, including thegenerate_network.
Fix: strip a leading line index when scanning actions (BNGLModel in pybnf/pset.py), so a numbered generate_network is recognised as one and a numbered simulate as a simulation action. The planned edition-2 rule that refuses hand-written state-changing actions at load should use the same scanner.
Found while fixing the PEtab issues #892–#908 (2026-09-25). Items 1 and 2 were reproduced on the PR branches, and item 3 on main at cd2be675 and on #944's branch.
- 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
-
Quick Installation step 2 installs from the plugin manager, but the plugin isn't published yetAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
jenkinsci/user-guide-ai-chatbot-plugin#132 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
gh-sync ship audits cards before writing station done, so every ship reports false STATUS findingsApertaharness
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
mruangutai/harness#2455 ·
I maintainer di solito rispondono entro 1 giorno
-
stripthink leaves thinking text in place when the chat template opens the think tag in the promptForse già presa @MaiAditya l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
xcorr sizes its bin array from the largest observed m/z, so one out-of-range peak kills the runForse già presa @BioGeek l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
instadeepai/winnow#312 ·