A lightweight, file-based checkpointer that uses R's native saveRDS
and readRDS functions. Each thread is saved as an individual .rds
file in a specified directory.
Super class
HydraR::Checkpointer -> RDSSaver
Methods
Method get()
Load state from an .rds file.
Examples
if (FALSE) { # \dontrun{
# 1. Persistent checkpointing to a local directory
saver <- RDSSaver$new(dir = "vault/checkpoints")
# 2. Create a DAG and run it with a specific thread ID
dag <- dag_create(checkpointer = saver)
dag$run(thread_id = "agent_session_alpha")
# 3. Later, resume the same session - HydraR will load the RDS file
dag$run(thread_id = "agent_session_alpha")
} # }