A condition that sets the same target twice (perturbations: L = 2, L = 7) is accepted, and the last value silently wins
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 25
- Fork
- 25
- Merge trung bình
- 4 giờ 5 phút
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của lanl/PyBNF
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug tech debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug silent-incorrectness
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Quick Installation step 2 installs from the plugin manager, but the plugin isn't published yetĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
jenkinsci/user-guide-ai-chatbot-plugin#132 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
gh-sync ship audits cards before writing station done, so every ship reports false STATUS findingsĐang mởharness
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
mruangutai/harness#2455 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
stripthink leaves thinking text in place when the chat template opens the think tag in the promptCó thể đã có người làm @MaiAditya đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
xcorr sizes its bin array from the largest observed m/z, so one out-of-range peak kills the runCó thể đã có người làm @BioGeek đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
instadeepai/winnow#312 ·