RestartPoolCheckpointFile
python
RestartPoolCheckpointFile(key_labels: tuple[str, ...], points: list[RestartPoint]) -> NoneCheckpoint file holding some or all of a restart pool's points.
A resumed run restores them into its pool, so every bucket the run had reached is available from the first episode instead of waiting for the policy to re-ladder there from the start of the game. Points only: the advance windows and timeout counts are seconds to rebuild and are not saved.
Initialize the file.
Parameters:
key_labels(tuple[str, ...]) – The pool's bucket key labels, so a restore can refuse points keyed differently.points(list[RestartPoint]) – The points to save, bucket by bucket and oldest first within a bucket.
Properties
key_labels
python
key_labels: tuple[str, ...]The bucket key labels the points were keyed by.
points
python
points: list[RestartPoint]The saved points.
Methods
extension
python
extension() -> strfrom_pool
python
from_pool(pool: RestartPool) -> SelfCapture a pool's points per its checkpoint_points_per_key setting.
Parameters:
pool(RestartPool) – The pool.
Returns:
Self– The file ready to save.
restore_into
python
restore_into(pool: RestartPool) -> intStore the file's points in a pool.
Parameters:
pool(RestartPool) – The pool to restore into.
Returns:
int– How many points were stored.
Raises:
ValueError– If the pool's key labels differ from the ones the points were saved under.