A condition that sets the same target twice (perturbations: L = 2, L = 7) is accepted, and the last value silently wins
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 68/100
調査の方向性
Start with the condition grammar in pybnf/parse.py around lines 604–635 and the condition loading in config.py. Trace how repeated perturbation targets are applied, then inspect the PEtab export path. Done means duplicate targets are rejected with the condition and target named, with coverage for both backends and the export.
索引モデルが issue の本文から書いたものです。
説明
A condition: line may list the same parameter more than once, for example condition: c, perturbations: L = 2, L = 7. PyBNF accepts it without a message and applies the values in order, so the experiment runs at L = 7 on both BNG2.pl and bngsim. A line like this is almost always a mistake, such as a copy-paste slip or two conditions merged by hand. Nothing says which value was meant, so PyBNF should refuse it at load and name the condition and the target. The PEtab export also writes both rows (cond_c L 2 and cond_c L 7) into conditions.tsv, and libpetab's lint accepts them, so the ambiguity passes into the exported problem too.
Example
m.bngl (A is made at rate L and decays at rate k·A, starting from 0):
begin model
begin parameters
k 1
L 1
end parameters
begin molecule types
A()
end molecule types
begin seed species
A() 0
end seed species
begin observables
Molecules A_tot A()
end observables
begin reaction rules
0 -> A() L
A() -> 0 k
end reaction rules
end model
e1.exp holds 2(1 − e^(−t)) at t = 0, 0.5, 1, 2, 4, which is the model at L = 2 and k = 1.
edition = 2
job_type = de
objective = sos
model: m.bngl
condition: c, perturbations: L = 2, L = 7
experiment: e1, condition: c, data: e1.exp
uniform_var = k 0.99999 1.00001
The narrow box on k makes every evaluation use k ≈ 1:
| backend | objective |
|---|---|
bngl_backend = bngsim |
28.3212 |
bngl_backend = bionetgen |
28.3212 |
| closed form at L = 7 | 28.3218 |
| closed form at L = 2 | 0 |
The closed forms are 0.5·Σ(L(1 − e^(−t)) − y)². Both backends use L = 7. Neither the console nor the log mentions the duplicate. export_job writes both rows for cond_c, and petab.v2.lint.lint_problem returns no issues.
The same line can come out of a PEtab import. On main, two PEtab condition ids that map to one PyBNF name (cond_a and a) are merged into a single condition: line with both targets (see #950). Open PR #947 refuses that merge.
Why
The condition: grammar (pybnf/parse.py around 604–635) accepts any list of perturbations, and config.py's condition loading turns each one into a mutation applied in order, with no check for a repeated target. The exporter writes one row per perturbation.
Possible fix
When the conf loads, refuse a condition that names the same target more than once, whatever the operators (L = 2, L = 7, and also L = 2, L * 3). The error should name the condition and the target. Add a test on both backends and one for the export.
Found while fixing the PEtab issues #892–#908 (2026-09-25); reproduced on main at cd2be675.
- 主要言語
- 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時間 初心者へのやさしさ 74/100
software-mansion-labs/Diplomat#20 ·
メンテナーはふだん 1 日以内に返信
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client area対応中かも @lijy91 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
libnativeapi/nativeapi#53 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
View Counts discarded due to field name mismatch対応中かも @rsiva0400 が今日担当しました。 オープンsite-bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Model version publishes the new UK firm entity as a person対応中かも @vahid-ahmadi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PolicyEngine/policyengine.py#764 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
spcl/HPCAgent-Bench#264 ·
メンテナーはふだん 1 日以内に返信