Persists checkpoints in a SQLite database. Requires the DBI and RSQLite
packages.
Value
list(step, state) or NULL.
State snapshot or NULL.
Character vector.
Methods
Method new()
Create a SQLite checkpointer.
Arguments
path
Character. Path to the SQLite database file.
Save a snapshot.
Usage
SQLiteCheckpointer$save(thread_id, step, state_snapshot)
Arguments
thread_id
Character.
step
Integer.
state_snapshot
Named list.
Method load_latest()
Load the latest snapshot.
Usage
SQLiteCheckpointer$load_latest(thread_id)
Method load_step()
Load snapshot at exact step.
Usage
SQLiteCheckpointer$load_step(thread_id, step)
Arguments
thread_id
Character.
step
Integer.
Method list_threads()
Return all thread IDs.
Usage
SQLiteCheckpointer$list_threads()
Method clone()
The objects of this class are cloneable with this method.
Usage
SQLiteCheckpointer$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.