class_docstr: Class for running TensorBoard.
  
  Fields:
    plugin_loaders: Set from plugins passed to constructor.
    assets_zip_provider: Set by constructor.
    server_class: Set by constructor.
    flags: An argparse.Namespace set by the configure() method.
    cache_key: As `manager.cache_key`; set by the configure() method.
class_docstr_tok: ["Class","for","running","TensorBoard",".","Fields",":","plugin_loaders",":","Set","from","plugins","passed","to","constructor",".","assets_zip_provider",":","Set","by","constructor",".","server_class",":","Set","by","constructor",".","flags",":","An","argparse.Namespace","set","by","the","configure","(",")","method",".","cache_key",":","As","`","manager.cache_key","`",";","set","by","the","configure","(",")","method","."]
docstr: Configures TensorBoard behavior via flags.
  
  This method will populate the "flags" property with an argparse.Namespace
  representing flag values parsed from the provided argv list, overridden by
  explicit flags from remaining keyword arguments.
  
  Args:
    argv: Can be set to CLI args equivalent to sys.argv; the first arg is
      taken to be the name of the path being executed.
    kwargs: Additional arguments will override what was parsed from
      argv. They must be passed as Python data structures, e.g.
      `foo=1` rather than `foo="1"`.
  
  Returns:
    Either argv[:1] if argv was non-empty, or [''] otherwise, as a mechanism
    for absl.app.run() compatibility.
  
  Raises:
    ValueError: If flag values are invalid.
docstr_tok: ["Configures","TensorBoard","behavior","via","flags",".","This","method","will","populate","the","``","flags","''","property","with","an","argparse.Namespace","representing","flag","values","parsed","from","the","provided","argv","list",",","overridden","by","explicit","flags","from","remaining","keyword","arguments",".","Args",":","argv",":","Can","be","set","to","CLI","args","equivalent","to","sys.argv",";","the","first","arg","is","taken","to","be","the","name","of","the","path","being","executed",".","kwargs",":","Additional","arguments","will","override","what","was","parsed","from","argv",".","They","must","be","passed","as","Python","data","structures",",","e.g",".","`","foo=1","`","rather","than","`","foo=","''","1","''","`",".","Returns",":","Either","argv","[",":1","]","if","argv","was","non-empty",",","or","[","``","]","otherwise",",","as","a","mechanism","for","absl.app.run","(",")","compatibility",".","Raises",":","ValueError",":","If","flag","values","are","invalid","."]
code: def configure(self, argv=("",), **kwargs):
      """Configures TensorBoard behavior via flags.
  
      This method will populate the "flags" property with an argparse.Namespace
      representing flag values parsed from the provided argv list, overridden by
      explicit flags from remaining keyword arguments.
  
      Args:
        argv: Can be set to CLI args equivalent to sys.argv; the first arg is
          taken to be the name of the path being executed.
        kwargs: Additional arguments will override what was parsed from
          argv. They must be passed as Python data structures, e.g.
          `foo=1` rather than `foo="1"`.
  
      Returns:
        Either argv[:1] if argv was non-empty, or [''] otherwise, as a mechanism
        for absl.app.run() compatibility.
  
      Raises:
        ValueError: If flag values are invalid.
      """
  
      base_parser = argparse_flags.ArgumentParser(
          prog="tensorboard",
          description=(
              "TensorBoard is a suite of web applications for "
              "inspecting and understanding your TensorFlow runs "
              "and graphs. https://github.com/tensorflow/tensorboard "
          ),
      )
      subparsers = base_parser.add_subparsers(
          help="TensorBoard subcommand (defaults to %r)"
          % _SERVE_SUBCOMMAND_NAME
      )
  
      serve_subparser = subparsers.add_parser(
          _SERVE_SUBCOMMAND_NAME,
          help="start local TensorBoard server (default subcommand)",
      )
      serve_subparser.set_defaults(
          **{_SUBCOMMAND_FLAG: _SERVE_SUBCOMMAND_NAME}
      )
  
      if len(argv) < 2 or argv[1].startswith("-"):
          # This invocation, if valid, must not use any subcommands: we
          # don't permit flags before the subcommand name.
          serve_parser = base_parser
      else:
          # This invocation, if valid, must use a subcommand: we don't take
          # any positional arguments to `serve`.
          serve_parser = serve_subparser
  
      for name, subcommand in self.subcommands.items():
          subparser = subparsers.add_parser(
              name,
              help=subcommand.help(),
              description=subcommand.description(),
          )
          subparser.set_defaults(**{_SUBCOMMAND_FLAG: name})
          subcommand.define_flags(subparser)
  
      for loader in self.plugin_loaders:
          loader.define_flags(serve_parser)
  
      arg0 = argv[0] if argv else ""
  
      flags = base_parser.parse_args(
          argv[1:]
      )  # Strip binary name from argv.
      if getattr(flags, _SUBCOMMAND_FLAG, None) is None:
          # Manually assign default value rather than using `set_defaults`
          # on the base parser to work around Python bug #9351 on old
          # versions of `argparse`: <https://bugs.python.org/issue9351>
          setattr(flags, _SUBCOMMAND_FLAG, _SERVE_SUBCOMMAND_NAME)
  
      self.cache_key = manager.cache_key(
          working_directory=os.getcwd(),
          arguments=argv[1:],
          configure_kwargs=kwargs,
      )
      if arg0:
          # Only expose main module Abseil flags as TensorBoard native flags.
          # This is the same logic Abseil's ArgumentParser uses for determining
          # which Abseil flags to include in the short helpstring.
          for flag in set(
              absl_flags.FLAGS.get_key_flags_for_module(arg0)
          ):
              if hasattr(flags, flag.name):
                  raise ValueError(
                      "Conflicting Abseil flag: %s" % flag.name
                  )
              setattr(flags, flag.name, flag.value)
      for k, v in kwargs.items():
          if not hasattr(flags, k):
              raise ValueError("Unknown TensorBoard flag: %s" % k)
          setattr(flags, k, v)
      if getattr(flags, _SUBCOMMAND_FLAG) == _SERVE_SUBCOMMAND_NAME:
          for loader in self.plugin_loaders:
              loader.fix_flags(flags)
      self.flags = flags
      return [arg0]
  
imports: from abc import ABCMeta
  from abc import abstractmethod
  import argparse
  import atexit
  from collections import defaultdict
  import errno
  import logging
  import mimetypes
  import os
  import shlex
  import signal
  import socket
  import sys
  import threading
  import time
  import urllib.parse
  from absl import flags
  from absl.flags import argparse_flags
  from werkzeug import serving
  from tensorboard import manager
  from tensorboard import version
  from tensorboard.backend import application
  from tensorboard.backend.event_processing import data_ingester
  from tensorboard.backend.event_processing import event_file_inspector
  from tensorboard.data import server_ingester
  from tensorboard.plugins.core import core_plugin
  from tensorboard.util import tb_logging
label_desc: Use image node_id 2 for calling the TensorBoard obj's underlying member method code with example usage: obj.configure(argv) and returns: list