SingleRun¶
- class jaxrens.sampling.batch_descriptor.SingleRun(n_runs=1, shape_prefix=())[source]¶
Bases:
_UniformBatcherDescriptor for a single NS run (no batching).
Used by
run_ns. All three methods are identity / thin wrappers around plain JAX primitives.- Variables:
n_runs (
int) – Always 1.shape_prefix (
tuple[int,]) – Always().
- Parameters:
- wrap_step(ns_step_fn, step_fn, n_mcmc_steps, n_extra)[source]¶
Return
jax.jit(ns_step_fn, static_argnums=(1, 2, 3)).The caller uses the returned function as:
jit_step(ns_state, step_fn, n_mcmc_steps, n_extra)
which is exactly the current
run_nspattern.
- split_keys(rng_key, n_sub_keys)[source]¶
Delegate directly to
jax.random.split.Returns shape
(n_sub_keys,)with typed-key dtype.- Parameters:
rng_key (Array)
n_sub_keys (int)
- Return type:
Array