Ejemplo n.º 1
0
 def setUp(self):
   self.logdir = self.get_temp_dir()
   self.generate_testdata()
   multiplexer = event_multiplexer.EventMultiplexer()
   multiplexer.AddRunsFromDirectory(self.logdir)
   multiplexer.Reload()
   self.plugin = text_plugin.TextPlugin()
   self.apps = self.plugin.get_plugin_apps(multiplexer, None)
Ejemplo n.º 2
0
  def testPluginIsActive(self):
    plugin = text_plugin.TextPlugin()
    multiplexer = event_multiplexer.EventMultiplexer()
    plugin.get_plugin_apps(event_multiplexer.EventMultiplexer(), None)

    # The plugin is inactive because text summaries are not available.
    self.assertFalse(plugin.is_active())

    multiplexer.AddRunsFromDirectory(self.logdir)
    multiplexer.Reload()

    # The plugin is active because text summaries are available.
    self.assertTrue(self.plugin.is_active())
Ejemplo n.º 3
0
def standard_tensorboard_wsgi(logdir, purge_orphaned_data, reload_interval):
    """Construct a TensorBoardWSGIApp with standard plugins and multiplexer."""
    multiplexer = event_multiplexer.EventMultiplexer(
        size_guidance=DEFAULT_SIZE_GUIDANCE,
        purge_orphaned_data=purge_orphaned_data)

    plugins = [
        debugger_plugin.DebuggerPlugin(),
        projector_plugin.ProjectorPlugin(),
        text_plugin.TextPlugin(),
    ]

    return TensorBoardWSGIApp(logdir, plugins, multiplexer, reload_interval)
Ejemplo n.º 4
0
def main(unused_argv=None):
    if FLAGS.inspect:
        logging.info(
            'Not bringing up TensorBoard, but inspecting event files.')
        event_file = os.path.expanduser(FLAGS.event_file)
        efi.inspect(FLAGS.logdir, event_file, FLAGS.tag)
        return 0
    else:
        plugins = [
            projector_plugin.ProjectorPlugin(),
            text_plugin.TextPlugin(),
        ]
        tb = create_tb_app(plugins)
        run_simple_server(tb)
Ejemplo n.º 5
0
def main(unused_argv=None):
  if FLAGS.inspect:
    tf.logging.info('Not bringing up TensorBoard, but inspecting event files.')
    event_file = os.path.expanduser(FLAGS.event_file)
    efi.inspect(FLAGS.logdir, event_file, FLAGS.tag)
    return 0
  else:
    plugins = [
        scalars_plugin.ScalarsPlugin(),
        images_plugin.ImagesPlugin(),
        audio_plugin.AudioPlugin(),
        graphs_plugin.GraphsPlugin(),
        distributions_plugin.DistributionsPlugin(),
        histograms_plugin.HistogramsPlugin(),
        projector_plugin.ProjectorPlugin(),
        text_plugin.TextPlugin(),
    ]
    tb = create_tb_app(plugins)
    run_simple_server(tb)