bind_checkpoint_state#

earth2studio.utils.checkpoint.bind_checkpoint_state(state)[source]#

Bind a dataclass instance to checkpoint state metadata.

The returned proxy forwards normal dataclass field access and exposes checkpoint metadata through checkpoint_* properties. When no checkpoint session is active, state is buffered for the most recently instantiated Checkpoint in this context.

Parameters:

state (T | CheckpointState[T])

Return type:

CheckpointState[T]