fabricatio_checkpoint.capabilities.checkpoint

This module contains the capabilities for the checkpoint.

Classes

Checkpoint

This class contains the capabilities for the checkpoint.

Module Contents

class fabricatio_checkpoint.capabilities.checkpoint.Checkpoint(/, **data: Any)

Bases: fabricatio_core.capabilities.usages.UseLLM, abc.ABC

This class contains the capabilities for the checkpoint.

worktree_dir: pathlib.Path = None

The worktree directory. Use the current working directory by default.

mount_checkpoint_store(checkpoint_store: fabricatio_checkpoint.rust.CheckPointStore | None = None) Self

Mount a checkpoint store to the capability.

unmount_checkpoint_store() Self

Unmount the checkpoint store.

access_checkpoint_store(fallback_default: fabricatio_checkpoint.rust.CheckPointStore | None = None) fabricatio_checkpoint.rust.CheckPointStore

Access the checkpoint store.

save_checkpoint(msg: str = 'Changes') str

Save a checkpoint.

rollback(commit_id: str, file_path: pathlib.Path | str) None

Rollback to a checkpoint.

reset_to_checkpoint(commit_id: str) None

Reset the checkpoint.

get_file_diff(commit_id: str, file_path: pathlib.Path | str) str

Get the diff for a specific file at a given commit.