Skip to content

Implemented capabilities and executable examples

op_infer is pre-alpha and unreleased, with PyPI publication on hold. The architecture note describes the intended statistical layer; the table below describes the implementation. Adapters wrap native libraries and the study extra delegates orchestration to trade-study. No sampler, scoring-rule library or executor is reimplemented here.

Capability Available implementation Boundary
Provenance and forward artifacts ArtifactReference, Provenance, target/numerical references, ForwardRunReference Content identity and guarded loading; metadata alone is not numerical qualification.
Identified forward models ForwardModel, CallableForward, ForwardDesign, optional adapters.op.compiled_forward Forward models; schema-2 structural provenance, qualified fixed explicit CPU subset and observation-only retention. Legacy schema-1 identities remain unchanged.
Statistical priors and observations JointPrior, five scalar prior families, IIDObservation, BinnedNormalObservation, StatisticalModel Shared statistical models; independent fixed-shaped priors, seven iid observation laws, Normal clipping/censoring and fixed-partition Normal interval codes with NumPy/JAX/Torch CPU scoring. Scoped CUDA qualification covers the earlier families, not the new binned law. General transforms/hierarchy/dependence remain planned.
Structural/local information interoperability ScalingAssessment, InformationContext, native Gaussian mean information and optional engine adapters Scoped reports; physical coordinates, fixed independent Gaussian variance, explicit initial/measurement derivatives and local spectra. General structural identification and posterior geometry remain separate.
Fixed-forward execution baseline Grouped observation-interval scans and a fresh-process CPU pipeline harness Pipeline measurements; 60 successful grouped workers, separate compilation/warm/process/XLA memory, retained baseline censoring; no training/GPU claim.
Native posterior containers Named dimensions/coordinates, separate chain/seed semantics Posteriors; optional arviz adds guarded ArviZ 1.x/netCDF snapshots.
Random streams RandomKey, SimulationStreams, native NumPy and optional JAX/Torch lowering Streams; task addresses separate parameter and simulation randomness.
Native NUTS adapters.numpyro.fit_nuts, NutsSettings numpyro extra; bounded CPU scope and raw diagnostics, not automatic adequacy certification.
Named MCMC diagnostics adapters.arviz.diagnose_mcmc, MCMCDiagnostics diagnostics extra; rank R-hat and absolute bulk/tail ESS, original axes and unavailable elements retained; no adequacy thresholds.
Masked-cohort NPE adapters.sbi, NpeSettings, NpeEnsemble, guarded native save/load sbi extra; CPU or one explicit CUDA device, declared masks/counts, full real-vector support; see NPE.
Large NPE banks and training resume fit_npe borrowed-bank/checkpoint options Borrowed CPU banks can feed CPU or single-device CUDA training at the qualified sbi 0.27.0 boundary. Resumable training checkpoints remain CPU-only and retain exact bank/runtime guards.
Fixed-work NPE profiling examples/benchmark_npe_pipeline.py Fresh-process CPU/CUDA, storage, phase, memory and CPU-resume records for a bounded synthetic pilot; descriptive evidence only, with cross-node/shared-storage work still open.
Seeded criteria gates.Gate, GateSet, GateRecord (also in calibrate) Saved gate records: adequacy versus decision criteria, context checks, seeded callbacks and amendment disclosures.
Calibration readings readings.CalibrationPolicy, CalibrationEvidence, CalibrationRecord Saved policies: fixed cohorts, point/interval panels, usable floors, failure budgets and required quantities.
Coverage summaries calibrate.coverage_summary study extra; central-interval coverage, marginal Wilson intervals and explicit failed-attempt counts.
Coverage-rule planning CoverageRule, coverage_operating_characteristics, plan_coverage_replicates Coverage planning; fixed successful bank, inclusive bounds and a conservative union bound over the full supplied family.
TARP curves adapters.tarp.tarp_coverage tarp extra; reference curves with explicit points/coordinates, retained row failures and no automatic gate reading.
Rank calibration calibrate.pit, aggregate, gate, rank artifacts Calibration: atom-aware ranks, multiplicity, power floors, failure accounting and contraction.
Fixed-bank SBC execution sbc.run_sbc, SBCEstimand, SBCFit study extra; runner, stable IDs, guarded resume and retained failures.
Robustness under a perturbed generator stress.StressSpec, stress.stress_verdict, run_sbc(..., stress=) study extra; runner: paired control bank, Wilson coverage, counted failures, caller-supplied floor and drop; a robustness reading, not calibration.
Monte Carlo stability audit audit.audit_sample, stability_estimate, stability_label Stability audit: diagnostics-only stratified sample, shift and Monte Carlo noise of a contrast total, stable or not_assessable with caller-supplied ratios; scoring stays with the caller.
Three-valued paired contrast compare.three_valued_contrast, ThreeValuedContrast Stability audit: separated, borderline, tied or not assessable from a caller-supplied floor and multiplicity quantile; a failed stability check is never tied.
Per-member ensemble calibration ensemble_calibration.member_calibration, MemberRecords Per-member report: member and mixture standardised-error SD, 50/90% coverage, width gap, member agreement, rank-flag counts and validation-loss spread; descriptive, nothing gated.
Masked-unit SBC masked_sbc.MaskedSBCPlan, run_masked_sbc, summarize_masked_sbc study extra; masked banks, complete planned IDs, strata and independent-baseline width comparisons. No automatic informativeness verdict.
Held-out pipeline recovery and confusion table design.DesignStudy (summarize, confusion) and compare.paired_predictive_contrast study extra; design studies, real refits, aligned units, supplied gate evidence and fixed independent cohorts.
Numerical likelihood/gradient checks Provenance records and optional synthetic reference tests Numerical provenance; limited to declared references/backends and tolerances.
flepimop2 workflows Separate GPL flepimop2-op_infer process provider Executes calibration/SBC/design plans; the MIT core never imports flepimop2.

General parameter/transform catalogs, correlated or hierarchical priors, AR(1)/per-cell or mixed exact-and-interval observations, integrated unit likelihood algorithms, LOO/PSIS, automatic general gate qualification, general Fisher/profile or general structural identifiability, other estimator adapters and EVSI remain planned. The presence of an extra or a placeholder module is not an implemented interface.

Run an analytic SBC bank

From a checkout:

uv sync --dev --extra study
just example-sbc /tmp/normal-sbc
just doctest

examples/normal_sbc.py uses the exact posterior for theta ~ Normal(0, 1) with four unit-variance observations: mean sum(y)/5, variance 1/5. It draws through NumPy's native normal generator, schedules 64 independently addressed replicates via trade-study, records full source/estimator provenance, resumes the same bank, and aggregates its ranks. Artifacts stay in the supplied directory. Scientific revisions require a new directory; resume refuses changed provenance.

The result is explicitly underpowered. An unflagged demonstration is not calibration evidence. The runner does not choose adequate replicate counts or certify its own gate's false-failure rate. A fixed Wilson precision calculation in trade-study addresses marginal precision, not gate power.

For native sampling, run just example-numpyro after installing numpyro and follow the NumPyro guide. Design recovery has an independent, executable normal-normal refit and proper held-out log-score fixture in tests/test_design_study.py. It checks separation of training/held-out data, three-way outcomes, failures and shard replay. Its synthetic gate fixtures are not consumer calibration evidence.

For a table of named raw MCMC diagnostics, install diagnostics and run python examples/mcmc_diagnostics.py. The diagnostic guide explains the deliberately shifted, constant and invalid quantities in that example.

What runs automatically

just ci includes lint, strict typing, library doctests, tests and a strict docs build. Public docstrings cover random keys/provenance, rank/gate bookkeeping, estimand transformation, paired unit contrasts and adapter settings. Default core checks do not require heavy optional fitting dependencies.

just doctest runs the core examples. just qualify-study requires trade-study and executes the standalone SBC example test plus the runner/design tests. CI runs that qualification at current and minimum trade-study versions. Separate required jobs perform real NumPyro and sbi CPU fitting, native JAX/Torch checks, ArviZ I/O and process-provider wheel tests. A skipped backend is not qualification. just qualify-diagnostics requires ArviZ Stats and NumPyro and compares named modern diagnostics with the reference library on synthetic and actual native draws. just qualify-coverage requires the TARP reference, tests fixed-coverage family planning and actual curves, and checks the generated table/figure inputs and exports.

Keep examples executable and check an independent mathematical result. Retain provenance, failed attempts, masks, independent units and stage names in examples as in production workflows. Run just ci before a PR.