class_docstr: A DataStore which relies on the GraphManager check pointing methods to communicate policies.
class_docstr_tok: ["A","DataStore","which","relies","on","the","GraphManager","check","pointing","methods","to","communicate","policies","."]
docstr: Load a checkpoint into the specified graph_manager. The expectation here is that
  save_to_store() and load_from_store() will synchronize a checkpoint directory with a
  central repository such as NFS or S3.
  
  :param graph_manager: the graph_manager to load the policy into
  :param require_new_policy: if True, only load a policy if it hasn't been loaded in this
  process yet before.
  :param timeout: Will only try to load the policy once if timeout is None, otherwise will
  retry for timeout seconds
docstr_tok: ["Load","a","checkpoint","into","the","specified","graph_manager",".","The","expectation","here","is","that","save_to_store","(",")","and","load_from_store","(",")","will","synchronize","a","checkpoint","directory","with","a","central","repository","such","as","NFS","or","S3",".",":","param","graph_manager",":","the","graph_manager","to","load","the","policy","into",":","param","require_new_policy",":","if","True",",","only","load","a","policy","if","it","has","n't","been","loaded","in","this","process","yet","before",".",":","param","timeout",":","Will","only","try","to","load","the","policy","once","if","timeout","is","None",",","otherwise","will","retry","for","timeout","seconds"]
code: def load_policy(
      self, graph_manager, require_new_policy=True, timeout=None
  ):
      """
      Load a checkpoint into the specified graph_manager. The expectation here is that
      save_to_store() and load_from_store() will synchronize a checkpoint directory with a
      central repository such as NFS or S3.
  
      :param graph_manager: the graph_manager to load the policy into
      :param require_new_policy: if True, only load a policy if it hasn't been loaded in this
      process yet before.
      :param timeout: Will only try to load the policy once if timeout is None, otherwise will
      retry for timeout seconds
      """
      if self._new_policy_exists(require_new_policy, timeout):
          # TODO: it would be nice if restore_checkpoint accepted a checkpoint path as a
          # parameter. as it is, one cannot distinguish between checkpoints used for coordination
          # and checkpoints requested to a persistent disk for later use
          graph_manager.task_parameters.checkpoint_restore_path = (
              self.checkpoint_dir
          )
          graph_manager.restore_checkpoint()
  
file_path: coach/rl_coach/data_stores/checkpoint_data_store.py
imports: import time
  import os
  from rl_coach.checkpoint import CheckpointStateReader
  from rl_coach.data_stores.data_store import SyncFiles
label_desc: Use image node_id 4 for calling the CheckpointDataStore obj's underlying member method code with example usage: obj.load_policy(graph_manager, require_new_policy, timeout) without return types