parameters: (self, partition_graphs, validate)
docstring: Load and process partition graphs.
  
      Load the graphs; parse the input and control input structure; obtain the
      device and op type of each node; remove the Copy and debug ops inserted
      by the debugger. The gathered information can be used to validate the
      tensor dumps.
  
      Args:
        partition_graphs: A repeated field of GraphDefs representing the
            partition graphs executed by the TensorFlow runtime.
        validate: (`bool`) Whether the dump files are to be validated against the
          partition graphs.
  
      Raises:
        ValueError: If the partition GraphDef of one or more devices fail to be
          loaded.
docstring_summary: Load and process partition graphs.
docstring_tokens: Load and process partition graphs .
function: def _load_partition_graphs(self, partition_graphs, validate):
      """Load and process partition graphs.
  
      Load the graphs; parse the input and control input structure; obtain the
      device and op type of each node; remove the Copy and debug ops inserted
      by the debugger. The gathered information can be used to validate the
      tensor dumps.
  
      Args:
        partition_graphs: A repeated field of GraphDefs representing the
            partition graphs executed by the TensorFlow runtime.
        validate: (`bool`) Whether the dump files are to be validated against the
          partition graphs.
  
      Raises:
        ValueError: If the partition GraphDef of one or more devices fail to be
          loaded.
      """
      self._debug_graphs = {}
      self._node_devices = {}
  
      if partition_graphs:
        partition_graphs_and_device_names = [
            (partition_graph, None) for partition_graph in partition_graphs]
      else:
        partition_graphs_and_device_names = []
        for device_name in self._device_names:
          partition_graph = None
          if device_name in self._dump_graph_file_paths:
            partition_graph = _load_graph_def_from_event_file(
                self._dump_graph_file_paths[device_name])
          else:
            partition_graph = self._find_partition_graph(partition_graphs,
                                                         device_name)
          if partition_graph:
            partition_graphs_and_device_names.append((partition_graph,
                                                      device_name))
          else:
            logging.warn("Failed to load partition graphs from disk.")
  
      for partition_graph, maybe_device_name in partition_graphs_and_device_names:
        debug_graph = debug_graphs.DebugGraph(partition_graph,
                                              device_name=maybe_device_name)
        self._debug_graphs[debug_graph.device_name] = debug_graph
        self._collect_node_devices(debug_graph)
  
        if validate and debug_graph.device_name in self._dump_tensor_data:
          self._validate_dump_with_graphs(debug_graph.device_name)
function_tokens: def _load_partition_graphs ( self , partition_graphs , validate ) : self . _debug_graphs = { } self . _node_devices = { } if partition_graphs : partition_graphs_and_device_names = [ ( partition_graph , None ) for partition_graph in partition_graphs ] else : partition_graphs_and_device_names = [ ] for device_name in self . _device_names : partition_graph = None if device_name in self . _dump_graph_file_paths : partition_graph = _load_graph_def_from_event_file ( self . _dump_graph_file_paths [ device_name ] ) else : partition_graph = self . _find_partition_graph ( partition_graphs , device_name ) if partition_graph : partition_graphs_and_device_names . append ( ( partition_graph , device_name ) ) else : logging . warn ( "Failed to load partition graphs from disk." ) for partition_graph , maybe_device_name in partition_graphs_and_device_names : debug_graph = debug_graphs . DebugGraph ( partition_graph , device_name = maybe_device_name ) self . _debug_graphs [ debug_graph . device_name ] = debug_graph self . _collect_node_devices ( debug_graph ) if validate and debug_graph . device_name in self . _dump_tensor_data : self . _validate_dump_with_graphs ( debug_graph . device_name )