jaxrens.sampling.adaptation.stepsize_handler¶
Step size adjustment via trial moves — pure JAX functions.
Two production entry points, one per batcher regime:
adjust_step_size()— full in-XLA bisection (lax.while_loop) for SingleRun / VmapRuns / PmapVmapRuns. Vmaps cleanly over runs; per-replica convergence handled by the vmap-of-while_loop “any-active” semantics.adjust_step_size_sharded()— sibling for ShardedSingleRun. Same in-XLAlax.while_loopstructure, with cross-shardlax.psumreductions inside the body so each shard sees the global trial rate. Must be called inside ajax.shard_mapover the"shard"mesh axis.
Both share _process_rate_jax() (branchless rate-window decision).
The outer loop (when to trigger, how to write back into the population)
lives in jaxrens.sampling.adaptation.manager.build_adapt_step() and
its caller _run_loop.
Functions
Adjust step size for one move type until acceptance rate is in window. |
|
Adjust step size with the population sharded across |
Classes
Convert a string or number to a floating point number, if possible. |