oa::ml::load_checkpoint

Load a native OA .oam checkpoint into existing matching owners. The complete file, section hashes, tensor metadata, module paths, shapes, dtypes, and optimizer payload are validated before any live handle changes. engine remains the sole owner of newly uploaded storage. Errors Returns crate::ErrorKind::CheckpointCorrupt for malformed, truncated, or integrity-invalid .oam data. Returns another error for a valid file that does not match the destination model/optimizer, or for allocation/runtime and filesystem failures.

FnRust public API

Function Documentation

pub fn load_checkpoint( engine: &Engine, path: impl AsRef<Path>, model: &dyn Module, optimizer: &mut dyn CheckpointOptimizer, ) -> Result<()>
Load a native OA .oam checkpoint into existing matching owners. The complete file, section hashes, tensor metadata, module paths, shapes, dtypes, and optimizer payload are validated before any live handle changes. engine remains the sole owner of newly uploaded storage. Errors Returns crate::ErrorKind::CheckpointCorrupt for malformed, truncated, or integrity-invalid .oam data. Returns another error for a valid file that does not match the destination model/optimizer, or for allocation/runtime and filesystem failures.