dragon.data.ddict.CheckpointPersister
- class CheckpointPersister[source]
Bases:
ABC
This class declares methods that all checkpoint persistence classes should implement.
- __init__()
Methods
__init__
()advance
()cleanup_metadata
(persist_path, name)dump
(chkpt[, force])Dump the given checkpoint to a persistent store.
dump_metadata
(orc_logger, persist_path, ...)load
(pool[, cleanup])load_metadata
(orc_logger, name)position
()prepare
(orc_logger, metadata, restore_from, ...)- abstractmethod dump(chkpt, force: bool = False)[source]
Dump the given checkpoint to a persistent store. If force is True then overwrite a persisted checkpoint of the same id if necessary. See the Checkpoint class in the manager.py for internal details of checkpoints if implementing your own CheckpointPersister. Otherwise, use one of the subclasses provided by Dragon.
- Parameters:
force – Overwrite an existing persisted checkpoint if necessary.
- abstractmethod load(pool: MemoryPool, cleanup: bool = False)[source]