pytyche.bcf.hurdle.orchestrationΒΆ
Hurdle BCF chunk machinery and PPC summary.
These are internal helpers used by the joint hurdle MCMC orchestrator.
The module-level _chunk_fn_cache dict holds JIT-compiled chunk functions
keyed by (n, hyperparams, freeze_gamma, sev_weight) tuples. Keyed lookups
avoid re-tracing the JAX scan across chunks with identical config.
The cache key includes retain_topology_history so a fit with retention
on compiles to a separate XLA variant; default-off code paths inherit the
same key shape with byte-identical XLA codegen.
_single_chain_step lives at pytyche.bcf.hurdle.model; it is imported
lazily inside _make_chunk_fn to avoid a circular import (model.py imports
orchestration.py for _run_chunk / _run_sampling_chunk).