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
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 25
- フォーク
- 25
- 平均マージ
- 4時間 5分
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
lanl/PyBNF のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bug minor
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bug tech debt
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug minor
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
bug silent-incorrectness
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
jenkinsci/user-guide-ai-chatbot-plugin#132 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
gh-sync ship audits cards before writing station done, so every ship reports false STATUS findingsオープンharness
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mruangutai/harness#2455 ·
メンテナーはふだん 1 日以内に返信
-
stripthink leaves thinking text in place when the chat template opens the think tag in the prompt対応中かも @MaiAditya が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
xcorr sizes its bin array from the largest observed m/z, so one out-of-range peak kills the run対応中かも @BioGeek が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
instadeepai/winnow#312 ·