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
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
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- testing-qa
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- 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
-
Adopt size-ratchet v4.0.3Apertaarea: ci enhancement perceived difficulty: 1
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Nitjsefnie-Harness-Commons/daedalus#1826 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
vllm-project/vllm-sail#398 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
DiamondLightSource/sm-bluesky#476 ·
I maintainer di solito rispondono entro 1 giorno
-
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