OptimCheckpoint#
- class liesel.optim.OptimCheckpoint(_carry, duration=0.0, versions=<factory>, _rebuild_model_state=False, _data_structure=())[source]#
Bases:
objectAn explicit snapshot from which an optimization run can continue.
Pass a result’s
checkpointtoOptimEngine.fit. The snapshot retains optimizer and random state as well as the completed history; it does not retain an engine or loss callable. Treat snapshots as read-only. Mutable containers are independent of the result, but their immutable JAX arrays are shared. Continuing a snapshot does not mutate it or its original result.Methods
load(path)Loads a trusted checkpoint file onto the current JAX device.
save(path)Atomically saves this snapshot, replacing an existing file.
Attributes