load_restart_batched

jaxrens.init.restart.load_restart_batched(path)[source]

Multi-replica restart loader: flat-layout walker arrays + nested bundles.

Companion to load_restart(). Where load_restart returns one of three different shapes depending on the checkpoint, this loader is for callers that have already established they are in the multi-replica branch (n_total > 1) and want a uniform (n_total, K, ...) layout with the nested (n_gpu, n_per_gpu) bundle list that run_ns_multi_gpu consumes.

Handles both VmapRuns (1-D) and PmapVmapRuns (2-D) checkpoints; the 1-D case is normalised to n_gpu=1, n_per_gpu=R. Scalar SingleRun checkpoints raise ValueError — those go through load_restart + _resolve_init_restart.

Parameters:

path (Path | str) – Path to the checkpoint HDF5 file.

Returns:

A BatchedRestart carrying the live-walker arrays in flat (n_total, K, ...) layout plus the (n_gpu, n_per_gpu) nested bundle list.

Raises:
  • FileNotFoundError – if path does not exist.

  • ValueError – if the file is a scalar single-run checkpoint, lacks required fields, or has unsupported log_evidence rank.

Return type:

BatchedRestart