class_docstr: Implement the runtime logic for jobs with checkpointing at the level of
  epoch. Can be used to run either single-host or distributed jobs. Job
  runner is a callable to be called once from the master, passing a session
  as an argument. This call will block until the Job execution is complete.
  
  If a checkpoint_manager is passed, checkpoints will be taken after
  initialization and after each epoch execution. If, in addition,
  `resume_from_epoch` is an epoch number, the corresponding checkpoint will
  be loaded and job execution will continue from the given epoch. In
  this case, the job's init_group will not be run.
  
  Refer to checkpoint_test.py for an example.
class_docstr_tok: ["Implement","the","runtime","logic","for","jobs","with","checkpointing","at","the","level","of","epoch",".","Can","be","used","to","run","either","single-host","or","distributed","jobs",".","Job","runner","is","a","callable","to","be","called","once","from","the","master",",","passing","a","session","as","an","argument",".","This","call","will","block","until","the","Job","execution","is","complete",".","If","a","checkpoint_manager","is","passed",",","checkpoints","will","be","taken","after","initialization","and","after","each","epoch","execution",".","If",",","in","addition",",","`","resume_from_epoch","`","is","an","epoch","number",",","the","corresponding","checkpoint","will","be","loaded","and","job","execution","will","continue","from","the","given","epoch",".","In","this","case",",","the","job","'s","init_group","will","not","be","run",".","Refer","to","checkpoint_test.py","for","an","example","."]
docstr: Loads the necessary blobs from the checkpoints.
  
  Checkpoints store the snapshots of the workspace in each node.
  Sometimes we only need to load a subset of the blobs from the
  checkpoints. One common scenario is to load only the model blobs from
  the checkpoints for evaluation purpose. Given the names of the
  necessary blobs, this function goes over all the checkpoints of all the
  nodes, but only loads the blobs specified in the blob_names to the
  current workspace.
  
  Args:
      blob_names: A list of strings. Each string is the name of a
          blob.
      epoch: An integer. The checkpoint epoch to load from.
      session: A Session object to execute the load ops.
  
  Raises:
      ValueError: When the checkpoint manager is invalid.
docstr_tok: ["Loads","the","necessary","blobs","from","the","checkpoints",".","Checkpoints","store","the","snapshots","of","the","workspace","in","each","node",".","Sometimes","we","only","need","to","load","a","subset","of","the","blobs","from","the","checkpoints",".","One","common","scenario","is","to","load","only","the","model","blobs","from","the","checkpoints","for","evaluation","purpose",".","Given","the","names","of","the","necessary","blobs",",","this","function","goes","over","all","the","checkpoints","of","all","the","nodes",",","but","only","loads","the","blobs","specified","in","the","blob_names","to","the","current","workspace",".","Args",":","blob_names",":","A","list","of","strings",".","Each","string","is","the","name","of","a","blob",".","epoch",":","An","integer",".","The","checkpoint","epoch","to","load","from",".","session",":","A","Session","object","to","execute","the","load","ops",".","Raises",":","ValueError",":","When","the","checkpoint","manager","is","invalid","."]
code: def load_blobs_from_checkpoints(self, blob_names, epoch, session):
      """Loads the necessary blobs from the checkpoints.
  
      Checkpoints store the snapshots of the workspace in each node.
      Sometimes we only need to load a subset of the blobs from the
      checkpoints. One common scenario is to load only the model blobs from
      the checkpoints for evaluation purpose. Given the names of the
      necessary blobs, this function goes over all the checkpoints of all the
      nodes, but only loads the blobs specified in the blob_names to the
      current workspace.
  
      Args:
          blob_names: A list of strings. Each string is the name of a
              blob.
          epoch: An integer. The checkpoint epoch to load from.
          session: A Session object to execute the load ops.
  
      Raises:
          ValueError: When the checkpoint manager is invalid.
      """
      if not self.checkpoint_manager:
          raise ValueError("Checkpoint manager is None")
      logger.info("Loading checkpoint for epoch {} ...".format(epoch))
      result = self.checkpoint_manager.load_blobs_locally(
          self.job.nodes_to_checkpoint(), blob_names, epoch, session
      )
      self.checkpoint_manager.report_checkpoint_stats(
          "checkpoint_partial_load"
      )
      return result
  
imports: import os
  import logging
  from caffe2.python import core, context
  from caffe2.python.net_builder import ops
  from caffe2.python.task import final_output, Node, Task, TaskGroup, TaskOutput, WorkspaceType
label_desc: Use image node_id 3 for calling the JobRunner obj's underlying member method code with example usage: obj.load_blobs_from_checkpoints(blob_names, epoch, session) and returns: result