class_docstr: Storage and load checkpoints from a predefined path available to the task runtime.
class_docstr_tok: ["Storage","and","load","checkpoints","from","a","predefined","path","available","to","the","task","runtime","."]
docstr: Prepare a local directory exposing the checkpoint. Do some simple checks to make sure the
  configuration seems reasonable.
docstr_tok: ["Prepare","a","local","directory","exposing","the","checkpoint",".","Do","some","simple","checks","to","make","sure","the","configuration","seems","reasonable","."]
code: def restore_path(
      self, src: str, selector: Optional[storage.Selector] = None
  ) -> Iterator[pathlib.Path]:
      """
      Prepare a local directory exposing the checkpoint. Do some simple checks to make sure the
      configuration seems reasonable.
      """
      if selector is not None:
          logger.warning(
              "Ignoring partial checkpoint download from 'directory' checkpoint storage; "
              "all files will be directly accessible."
          )
      check.true(
          os.path.exists(self._base_path),
          f"Storage directory does not exist: {self._base_path}. Please verify that you are "
          "using the correct configuration value for checkpoint_storage.container_path",
      )
      storage_dir = os.path.join(self._base_path, src)
      if not os.path.exists(storage_dir):
          raise errors.CheckpointNotFound(
              f"Did not find checkpoint {src} in 'directory' storage"
          )
      yield pathlib.Path(storage_dir)
  
file_path: determined/harness/determined/common/storage/directory.py
imports: import contextlib
  import logging
  import os
  import pathlib
  from typing import Any, Dict, Iterator, Optional
  from determined import errors
  from determined.common import check, storage
label_desc: Use image node_id 2 for calling the DirectoryStorageManager obj's underlying member method code with example usage: obj.restore_path(src, selector) without return types