KernelSpec#
- class aimz.model.KernelSpec(traced, sample_sites, return_sites, output_observed)[source]#
A dataclass describing the kernel structure.
Stores only the minimal information needed for downstream operations without re-tracing the NumPyro model.
- Parameters:
- sample_sites#
Names of latent (stochastic) sample sites encountered during tracing.
- return_sites#
Names of default return sites. Always includes the output first, followed by any deterministic sites. Latent sample sites are excluded.
- output_observed#
Trueif the output site was observed in the validating trace, used to distinguish prior-only from observed traces.- Type:
Notes
Re-tracing only upgrades a prior-only spec (
output_observedisFalse) to one that includes an observed output; the user kernel is assumed immutable after construction.