bayesmithDocumentation0.10.0 source

Extension contracts

Extend at the boundary that owns the behavior, and preserve the evidence needed by its consumers.

A new model or distribution

Compose an ordinary Graph first. A distribution needs correct support, event/batch shapes, normalized density where claimed and sampling semantics where supported. A custom density does not automatically qualify for Gaussian elimination or pointwise predictive export. Unsupported certification should remain unresolved or refused while a valid general route can still execute.

A new numerical backend

  1. Define the smallest backend-independent compiled problem, including normalization and support assumptions.
  2. Translate into the upstream engine in a thin adapter. Keep graph interpretation and eligibility in bayesmith.
  3. Return output with backend version, termination, uncertainty and approximation information.
  4. Compare against independent analytic oracles, failure cases and repeated-run behavior before enabling a public route.
  5. Test absent and installed optional-dependency states without importing a backend merely to detect it.

An adapter file existing is insufficient for a supported route. Public dispatch, result assembly, budgets, errors and diagnostic gates must also agree.

A new evaluation check

Consume a completed Result, define applicability, identify the statistic and its premise, and return an EvaluationReport pointing to that Result. Choose a single owner for numerical thresholds. Gate aggregation should file that report rather than recompute or override its verdict.

A schema or API change

Update the owning schema, codec registration, compatibility/migration notes and consumers together. Check old artifact loading intentionally. Public facade exports should point to the owning object instead of constructing a second equivalent object. Consult the source-derived API inventory before adding another entry point.

Record architecture decisions at their existing home, update user-facing explanation, and run focused behavior tests plus relevant integration checks. See contributing.

Type a concept or API name.