CheckpointState#

class earth2studio.utils.checkpoint.CheckpointState(
state,
checkpoint=None,
session=None,
state_loaded=False,
)[source]#

Bound checkpoint state proxy returned by bind_checkpoint_state().

The proxy forwards normal attribute access to the wrapped dataclass while exposing checkpoint metadata through checkpoint_* properties.

Parameters:
property checkpoint_dataclass: T#

Wrapped dataclass instance serialized by the checkpoint.

property checkpoint_device: device#

Device used for live checkpoint state tensors.

property checkpoint_enabled: bool#

Whether this state is associated with a checkpoint.

property checkpoint_flush_interval: int | None#

Flush interval configured on the associated checkpoint.

property checkpoint_is_flush_due: bool#

Whether the next checkpoint write is expected to flush to disk.

property checkpoint_labels: Mapping[str, Any]#

Labels for the active checkpoint session or pending checkpoint.

property checkpoint_lead_time: Any | None#

Selected checkpoint lead time metadata, if one exists.

property checkpoint_level: Literal[0, 1, 2]#

Checkpoint component logging level requested by the user.

property checkpoint_metadata: Mapping[str, Any]#

Metadata recorded for the selected checkpoint row.

property checkpoint_selected: bool#

Whether this state is bound to an existing checkpoint row.

property checkpoint_state_loaded: bool#

Whether this dataclass was restored from the selected checkpoint row.

property checkpoint_write_count: int#

Number of write boundaries recorded in the active session.

property device: device#

Alias for the checkpoint tensor state device.