RestartBundle¶
- class jaxrens.init.restart.RestartBundle(dead_energies, dead_positions, dead_volumes, log_evidence, iteration, emax, n_dead, step_sizes=None, rng_key_data=None)[source]¶
Bases:
objectNS-state fields needed to resume a run after a crash.
Live-walker state (positions, types, cells, energies, symbol_map) is carried separately in ResolvedInit; this bundle holds only the NS-state scalars and dead-point history that init_ns needs to seed NSState.
- Variables:
dead_energies (jax.jaxlib._jax.Array | None) – Dead-point potentials, shape (n_dead,).
dead_positions (jax.jaxlib._jax.Array | None) – Dead-point positions, shape (n_dead, n_atoms, 3).
dead_volumes (jax.jaxlib._jax.Array | None) – Dead-point volumes, shape (n_dead,), or None for NVT.
log_evidence (float) – Running log-evidence estimate at checkpoint time.
iteration (int) – NS iteration count at checkpoint time.
emax (float) – NS contour at checkpoint time (last enforced by
ns_step). Legacy checkpoints lacking theemaxfield surface here as+inf; the first post-restartns_steprewrites it frompop.energy, andrun_loopsuppresses adapt at the restored iter via thei > 0gate so a stale +inf can’t leak into trial-walker constraints.n_dead (int) – Number of dead points stored.
step_sizes (jax.jaxlib._jax.Array | None) – Adapted per-move step sizes for this slot’s live walkers, shape
(K, n_moves), orNonefor legacy checkpoints that pre-date persisting them. When present,init_nsoverrides the freshly-seeded population step sizes with these so a resumed run continues from the converged step instead of re-running burn-in adaptation from the configured initial step size.rng_key_data (ndarray | None) – Raw uint32 PRNG buffer (output of
jax.random.key_data) for this slot, orNonefor legacy checkpoints that pre-date persisting the PRNG state.init_nsre-wraps withjax.random.wrap_key_datawhen present, so resumed runs continue the saved random stream instead of silently reseeding from the CLI seed.
- Parameters: