Kitaru

checkpoint

Checkpoint decorator for durable work boundaries.

A checkpoint is a unit of work inside a flow whose outcome is persisted. Successful outputs become artifacts; failures are recorded for retry.

func_register_checkpoint_source_alias(*, func, alias, step_obj) -> None

Register the ZenML step object under a module-level alias.

paramfuncCallable[..., Any]
paramaliasstr
paramstep_objAny

Returns

None
func_normalize_retries(retries) -> int

Validate and normalize checkpoint retries.

paramretriesint

Returns

int
func_to_retry_config(retries) -> StepRetryConfig | None

Convert retry count to ZenML retry config.

paramretriesint

Returns

zenml.config.retry_config.StepRetryConfig | None
func_build_checkpoint_extra(checkpoint_type) -> dict[str, Any]

Build namespaced step metadata for dashboard rendering.

paramcheckpoint_typestr | None

Returns

dict[str, typing.Any]
func_to_step_type(checkpoint_type) -> StepType | None

Map well-known checkpoint types to ZenML's StepType enum.

paramcheckpoint_typestr | None

Returns

zenml.enums.StepType | None
func_wrap_entrypoint(func, *, checkpoint_type) -> Callable[..., Any]

Wrap the user function with Kitaru checkpoint runtime scope.

paramfuncCallable[..., Any]
paramcheckpoint_typestr | None

Returns

collections.abc.Callable[..., typing.Any]
funccheckpoint(func=None, *, retries=0, type=None) -> _CheckpointDefinition | Callable[[Callable[..., Any]], _CheckpointDefinition]

Mark a function as a durable checkpoint.

Can be used as a bare decorator or with arguments::

from kitaru import checkpoint

@checkpoint def my_step(): ...

@checkpoint(retries=3, type="llm_call") def my_step(): ...

paramfuncCallable[..., Any] | None
= None

Optional function for bare decorator use.

paramretriesint
= 0

Number of checkpoint-level retries on failure.

paramtypestr | None
= None

Checkpoint type for dashboard visualization.

Returns

_CheckpointDefinition | Callable[[Callable[..., Any]], _CheckpointDefinition]

The wrapped checkpoint object or a decorator that returns it.