2.1.5

BaseCheckpoint

Package: flyte

Base type for task checkpoint helpers. Subclasses load prior checkpoint data from prev_checkpoint into a local workspace and upload new state to checkpoint_path.

Properties

Property Type Description
path None Local directory for reading and writing checkpoint files (your format).

Methods

Method Description
load() Load checkpoint data from the remote source (async).
load_sync() Load checkpoint data from the remote source (sync task code).
prev_exists() Whether the runtime provided a previous-checkpoint prefix (retry / resume).
save() Save checkpoint data to the remote destination (async).
save_sync() Save checkpoint data to the remote destination (sync task code).

load()

def load()

Load checkpoint data from the remote source (async).

load_sync()

def load_sync()

Load checkpoint data from the remote source (sync task code).

prev_exists()

def prev_exists()

Whether the runtime provided a previous-checkpoint prefix (retry / resume).

save()

def save(
    data: pathlib.Path | str | bytes,
)

Save checkpoint data to the remote destination (async).

Parameter Type Description
data pathlib.Path | str | bytes

save_sync()

def save_sync(
    data: pathlib.Path | str | bytes,
)

Save checkpoint data to the remote destination (sync task code).

Parameter Type Description
data pathlib.Path | str | bytes