Skip to content

utils.checkpoint.CheckpointState

Import path: earth2studio.utils.checkpoint.CheckpointState

View source on GitHub

Documentation

Bases: Generic[T]

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.

checkpoint_dataclass property

checkpoint_dataclass: T

Wrapped dataclass instance serialized by the checkpoint.

checkpoint_enabled property

checkpoint_enabled: bool

Whether this state is associated with a checkpoint.

checkpoint_level property

checkpoint_level: CheckpointLevel

Checkpoint component logging level requested by the user.

checkpoint_device property

checkpoint_device: device

Device used for live checkpoint state tensors.

device property

device: device

Alias for the checkpoint tensor state device.

checkpoint_flush_interval property

checkpoint_flush_interval: int | None

Flush interval configured on the associated checkpoint.

checkpoint_write_count property

checkpoint_write_count: int

Number of write boundaries recorded in the active session.

checkpoint_is_flush_due property

checkpoint_is_flush_due: bool

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

checkpoint_selected property

checkpoint_selected: bool

Whether this state is bound to an existing checkpoint row.

checkpoint_state_loaded property

checkpoint_state_loaded: bool

Whether this dataclass was restored from the selected checkpoint row.

checkpoint_lead_time property

checkpoint_lead_time: Any | None

Selected checkpoint lead time metadata, if one exists.

checkpoint_metadata property

checkpoint_metadata: Mapping[str, Any]

Metadata recorded for the selected checkpoint row.

checkpoint_labels property

checkpoint_labels: Mapping[str, Any]

Labels for the active checkpoint session or pending checkpoint.