class_docstr: Concrete subclass of BaseDebugWrapperSession implementing a local CLI.
  
  This class has all the methods that a `session.Session` object has, in order
  to support debugging with minimal code changes. Invoking its `run()` method
  will launch the command-line interface (CLI) of tfdbg.
class_docstr_tok: ["Concrete","subclass","of","BaseDebugWrapperSession","implementing","a","local","CLI",".","This","class","has","all","the","methods","that","a","`","session.Session","`","object","has",",","in","order","to","support","debugging","with","minimal","code","changes",".","Invoking","its","`","run","(",")","`","method","will","launch","the","command-line","interface","(","CLI",")","of","tfdbg","."]
docstr: Overrides on-run-end callback.
  
  Actions taken:
    1) Load the debug dump.
    2) Bring up the Analyzer CLI.
  
  Args:
    request: An instance of OnSessionInitRequest.
  
  Returns:
    An instance of OnSessionInitResponse.
docstr_tok: ["Overrides","on-run-end","callback",".","Actions","taken",":","1",")","Load","the","debug","dump",".","2",")","Bring","up","the","Analyzer","CLI",".","Args",":","request",":","An","instance","of","OnSessionInitRequest",".","Returns",":","An","instance","of","OnSessionInitResponse","."]
code: def on_run_end(self, request):
      """Overrides on-run-end callback.
  
      Actions taken:
        1) Load the debug dump.
        2) Bring up the Analyzer CLI.
  
      Args:
        request: An instance of OnSessionInitRequest.
  
      Returns:
        An instance of OnSessionInitResponse.
      """
  
      self._is_run_start = False
      if (
          request.performed_action
          == framework.OnRunStartAction.DEBUG_RUN
      ):
          partition_graphs = None
          if (
              request.run_metadata
              and request.run_metadata.partition_graphs
          ):
              partition_graphs = request.run_metadata.partition_graphs
          elif request.client_graph_def:
              partition_graphs = [request.client_graph_def]
  
          if request.tf_error and not os.path.isdir(self._dump_root):
              # It is possible that the dump root may not exist due to errors that
              # have occurred prior to graph execution (e.g., invalid device
              # assignments), in which case we will just raise the exception as the
              # unwrapped Session does.
              raise request.tf_error
  
          debug_dump = debug_data.DebugDumpDir(
              self._dump_root, partition_graphs=partition_graphs
          )
          debug_dump.set_python_graph(self._sess.graph)
  
          passed_filter = None
          passed_filter_exclude_node_names = None
          if self._active_tensor_filter:
              if not debug_dump.find(
                  self._tensor_filters[self._active_tensor_filter],
                  first_n=1,
                  exclude_node_names=self._active_filter_exclude_node_names,
              ):
                  # No dumped tensor passes the filter in this run. Clean up the dump
                  # directory and move on.
                  self._remove_dump_root()
                  return framework.OnRunEndResponse()
              else:
                  # Some dumped tensor(s) from this run passed the filter.
                  passed_filter = self._active_tensor_filter
                  passed_filter_exclude_node_names = (
                      self._active_filter_exclude_node_names
                  )
                  self._active_tensor_filter = None
                  self._active_filter_exclude_node_names = None
  
          self._prep_debug_cli_for_run_end(
              debug_dump,
              request.tf_error,
              passed_filter,
              passed_filter_exclude_node_names,
          )
  
          self._run_start_response = self._launch_cli()
  
          # Clean up the dump generated by this run.
          self._remove_dump_root()
      elif (
          request.performed_action
          == framework.OnRunStartAction.PROFILE_RUN
      ):
          self._prep_profile_cli_for_run_end(
              self._sess.graph, request.run_metadata
          )
          self._run_start_response = self._launch_cli()
      else:
          # No debug information to show following a non-debug run() call.
          self._run_start_response = None
  
      # Return placeholder response that currently holds no additional
      # information.
      return framework.OnRunEndResponse()
  
imports: import argparse
  import os
  import sys
  import tempfile
  from tensorflow.python.debug.cli import analyzer_cli
  from tensorflow.python.debug.cli import cli_config
  from tensorflow.python.debug.cli import cli_shared
  from tensorflow.python.debug.cli import command_parser
  from tensorflow.python.debug.cli import debugger_cli_common
  from tensorflow.python.debug.cli import profile_analyzer_cli
  from tensorflow.python.debug.cli import ui_factory
  from tensorflow.python.debug.lib import common
  from tensorflow.python.debug.lib import debug_data
  from tensorflow.python.debug.wrappers import framework
  from tensorflow.python.lib.io import file_io
label_desc: Use image node_id 9 for calling the LocalCLIDebugWrapperSession obj's underlying member method code with example usage: obj.on_run_end(request) and returns: framework, framework