ray.rllib.utils.checkpoints.get_checkpoint_info#

ray.rllib.utils.checkpoints.get_checkpoint_info(checkpoint: str | Checkpoint, filesystem: pyarrow.fs.FileSystem | None = None) Dict[str, Any][source]#

Returns a dict with information about an Algorithm/Policy checkpoint.

If the given checkpoint is a >=v1.0 checkpoint directory, try reading all information from the contained rllib_checkpoint.json file.

Parameters:
  • checkpoint – The checkpoint directory (str) or an AIR Checkpoint object.

  • filesystem – PyArrow FileSystem to use to access data at the checkpoint. If not specified, this is inferred from the URI scheme provided by checkpoint.

Returns:

“type”: One of “Policy” or “Algorithm”. “checkpoint_version”: A version tuple, e.g. v1.0, indicating the checkpoint version. This will help RLlib to remain backward compatible wrt. future Ray and checkpoint versions. “checkpoint_dir”: The directory with all the checkpoint files in it. This might be the same as the incoming checkpoint arg. “state_file”: The main file with the Algorithm/Policy’s state information in it. This is usually a pickle-encoded file. “policy_ids”: An optional set of PolicyIDs in case we are dealing with an Algorithm checkpoint. None if checkpoint is a Policy checkpoint.

Return type:

A dict containing the keys

PublicAPI (alpha): This API is in alpha and may change before becoming stable.