Skip to content

RestartPoolCheckpointFile ​

python
RestartPoolCheckpointFile(key_labels: tuple[str, ...], points: list[RestartPoint]) -> None

Checkpoint 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.

Source

Properties ​

key_labels ​

python
key_labels: tuple[str, ...]

The bucket key labels the points were keyed by.

Source

points ​

python
points: list[RestartPoint]

The saved points.

Source

Methods ​

extension ​

python
extension() -> str

Source

from_pool ​

python
from_pool(pool: RestartPool) -> Self

Capture a pool's points per its checkpoint_points_per_key setting.

Parameters:

  • pool (RestartPool) – The pool.

Returns:

  • Self – The file ready to save.

Source

restore_into ​

python
restore_into(pool: RestartPool) -> int

Store 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.

Source