Add a cross-backend differential harness: evaluate one job at a fixed parameter set on every backend that can run it, and compare the simulated outputs and the objective value
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- testing-qa
調査の方向性
Start by reading tests/test_experiment_independence.py, tests/test_preequilibration.py, tests/test_bngsim_sbml_bridge.py, and benchmarks/run_pybnf_fitting_jobs.py, then compare their entry points with bngsim's parity_checks/ design. Define how the shared manifest, runner, comparator, and outcomes fit PyBNF before building the cross-backend harness. Done means the stated disagreement regressions fail when their fixes are reverted, exercised open bugs are recorded as KNOWN, and the per-push subset meets a stated time budget.
索引モデルが issue の本文から書いたものです。
説明
PyBNF has no harness that takes one job, evaluates it at a fixed parameter set on every simulation backend able to run it, and compares the results. Backends that disagree are the largest class in the 2026-09-23 audit: 35 of the 106 silently-wrong-result bugs (#929). The test suite passed with all of them present.
bngsim has this for engines, in parity_checks/ (lanl/bngsim). It compares bngsim with libRoadRunner, the legacy BioNetGen stack and AMICI over committed manifests, with one comparison kernel and one outcome taxonomy. It stops at the engine on purpose: its README says "Fitting/sampling parity is PyBNF's, not ours", and its corpus leaves out .conf and .exp files. Everything between the engine and the objective value is PyBNF's to check: the bridges, the synthesized actions, conditions and mutants, pre-equilibration, normalization, and the scoring.
What PyBNF has today
- Per-feature tests on two backends.
tests/test_experiment_independence.pyandtests/test_preequilibration.pyrun tiny models onbionetgenandbngsimagainst closed forms.tests/test_bngsim_sbml_bridge.pyandtests/test_bngsim_ssa_replaces_rr.pycompare the bngsim SBML backend with RoadRunner on one model each. Each test covers the feature its author had in mind. - A name-level differential.
tests/_bngl_differential.pycompares the entity names the PEtab BNGL reader finds with BNG2.pl's. It compares no numbers. - A launch smoke test.
benchmarks/run_pybnf_fitting_jobs.pystarts twelve jobs on BNG2.pl and on bngsim. It checks that each one starts, not that the two agree. - No use of bngsim's golden references.
parity_checkspublishes them so that PyBNF can regenerate them through its own bridges with only a pinned bngsim installed. Nothing in PyBNF does. - A manual rule. #929 asks every PR that can change a number to run the shipped examples before and after at a fixed parameter set. No committed script does that.
How this relates to #929 phase 3
Phase 3 is a conformance suite: tiny models on every backend, judged against closed forms. That is the only way to catch two backends returning the same wrong number (#830). But it covers only models small enough to solve by hand, and only the cases someone thought to write.
A differential harness covers the other side: real jobs, with combinations of features nobody listed. It cannot catch a shared wrong number, and a disagreement does not say which backend is wrong. The two should share one runner, one comparator and one set of outcomes.
Proposal
- Manifest. One committed file with one entry per job: the conf, the parameter set, the backends that apply, and the tolerances.
- Runner. For each job and each backend, load the conf the way a fit does and evaluate once at the parameter set. Record every simulated output table and the objective value.
- Backend pairs.
- BNGL, ODE and SSA:
bngl_backend = bionetgenagainstbngsim. - BNGL, network-free: BNG2.pl with NFsim against bngsim
nffor legacy-edition jobs, and bngsimnfagainstrm. Edition-2 network-free experiments are to be refused underbngl_backend = bionetgen(#929). - SBML:
sbml_backend = roadrunneragainstbngsim. - Antimony runs only on bngsim. It has no pair unless it is compared with its SBML translation on RoadRunner.
- BNGL, ODE and SSA:
- Comparator. Deterministic output tables must agree within a numeric tolerance, and then the objective values within a relative tolerance. Stochastic and network-free outputs need a statistical comparison over seeds;
parity_checks/rr_parity/ssa_screen.pyhas one to follow. Two backends that report different column names are a failure. The comparator must not compare only the columns they share (#817). - Outcomes. PASSED, FAILED, KNOWN and REFUSED.
- REFUSED: one backend rejects the job at load. That is correct behaviour and is recorded as such.
- KNOWN: a disagreement tied to an open issue number. A KNOWN row that now passes fails the run, so a stale entry cannot stay.
- Missing backend. If a backend the manifest names is not installed, the run stops with an error. It does not skip the row.
- Corpus. Start with the shipped
examples/confs that evaluate in seconds, plustests/full_tests. Then regenerate bngsim's golden references through PyBNF's bridges. - CI. A fast subset on every push, and the full sweep in
integration.yml.
The same runner can later check the other sibling paths named in AGENTS.md: the gradient against finite differences of the recorded objective, a fit against job_type = ms, and a conf against its PEtab export and re-import. Those are follow-ups, not part of this issue.
Depends on
- #923.
job_type = checksimulates a BNGL model with BNG2.pl whateverbngl_backendsays. The single evaluation above is a check, so either #923 is fixed first or the runner needs its own entry point. - #816. BNG2.pl must be available in every CI run.
- The open backend bugs (#866, #868, #870, #872, #873, #926, #927, #941 and others). They will make rows fail on the first run. Each enters the manifest as KNOWN with its number.
Worked if
- Reverting the fix for a closed backend-disagreement bug turns a row FAILED. This is shown for at least three such bugs.
- Every open backend-disagreement issue that a shipped example exercises appears as a KNOWN row.
- The per-push subset has a stated time budget and meets it.
Open question
Whether to import bngsim's parity_checks/_core (the differ, the outcome taxonomy, the fingerprint) or to copy its contract. It is in the bngsim repository but not in the wheel.
Related: #929 (roadmap), #923, #816, #817.
- 主要言語
- 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 日以内に返信