nvalchemi.hooks.CheckpointableHook#
- class nvalchemi.hooks.CheckpointableHook(*args, **kwargs)[source]#
Protocol for hooks that own restart-critical runtime state.
Most hooks should remain stateless and omit this protocol. Hooks that affect resumed training semantics can opt in by exposing
state_dictandload_state_dict. Pydantic-backed hooks should usemodel_dump()inside theirstate_dictimplementation for declarative fields and add only the extra runtime state they own.