Persists each checkpoint as an .rds file under {dir}/{thread_id}/step_{n}.rds.
Value
list(step, state) or NULL.
State snapshot or NULL.
Character vector.
Methods
Method new()
Create an RDS checkpointer.
Arguments
path
Character. Directory path where checkpoints are written.
Save a snapshot as an RDS file.
Usage
RDSCheckpointer$save(thread_id, step, state_snapshot)
Arguments
thread_id
Character.
step
Integer.
state_snapshot
Named list.
Method load_latest()
Load the latest snapshot.
Usage
RDSCheckpointer$load_latest(thread_id)
Method load_step()
Load snapshot at exact step.
Usage
RDSCheckpointer$load_step(thread_id, step)
Arguments
thread_id
Character.
step
Integer.
Method list_threads()
Return all thread IDs.
Usage
RDSCheckpointer$list_threads()
Method clone()
The objects of this class are cloneable with this method.
Usage
RDSCheckpointer$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.