Ejemplo n.º 1
0
 def testMakeServerBlankHost(self):
     # Test that we can bind to all interfaces without throwing an error
     server, url = tensorboard.make_simple_server(
         self._StubApplication(), host='',
         port=0)  # Grab any available port
     self.assertTrue(server)
     self.assertTrue(url)
Ejemplo n.º 2
0
def main(unused_argv=None):
  util.setup_logging()
  tb_app = tb_main.create_tb_app(
      assets_zip_provider=get_assets_zip_provider(),
      # We use the standard TensorBoard plugins, plus our Greeter Plugin
      plugins=[
          core_plugin.CorePlugin,
          greeter_plugin.GreeterPlugin,
          scalars_plugin.ScalarsPlugin,
          images_plugin.ImagesPlugin,
          audio_plugin.AudioPlugin,
          graphs_plugin.GraphsPlugin,
          distributions_plugin.DistributionsPlugin,
          histograms_plugin.HistogramsPlugin,
          projector_plugin.ProjectorPlugin,
          text_plugin.TextPlugin,
          profile_plugin.ProfilePlugin,
      ])
  server, url = tb_main.make_simple_server(tb_app)
  logger = logging.getLogger('tensorflow' + util.LogHandler.EPHEMERAL)
  logger.setLevel(logging.INFO)

  tensorboard_name = 'Greeter TensorBoard 0.1.0'

  logger.info('%s at %s (CTRL+C to quit) ', tensorboard_name, url)
  try:
    server.serve_forever()
  finally:
    logger.info('')
Ejemplo n.º 3
0
 def testMakeServerBlankHost(self):
   # Test that we can bind to all interfaces without throwing an error
   server, url = tensorboard.make_simple_server(
       self._StubApplication(),
       host='',
       port=0)  # Grab any available port
   self.assertTrue(server)
   self.assertTrue(url)
Ejemplo n.º 4
0
 def testSpecifiedHost(self):
     one_passed = False
     try:
         _, url = tensorboard.make_simple_server(self._StubApplication(),
                                                 host='127.0.0.1',
                                                 port=0)
         self.assertStartsWith(actual=url,
                               expected_start='http://127.0.0.1:')
         one_passed = True
     except socket.error:
         # IPv4 is not supported
         pass
     try:
         _, url = tensorboard.make_simple_server(self._StubApplication(),
                                                 host='::1',
                                                 port=0)
         self.assertStartsWith(actual=url, expected_start='http://[::1]:')
         one_passed = True
     except socket.error:
         # IPv6 is not supported
         pass
     self.assertTrue(
         one_passed)  # We expect either IPv4 or IPv6 to be supported
Ejemplo n.º 5
0
 def testSpecifiedHost(self):
   one_passed = False
   try:
     _, url = tensorboard.make_simple_server(
         self._StubApplication(),
         host='127.0.0.1',
         port=0)
     self.assertStartsWith(actual=url, expected_start='http://127.0.0.1:')
     one_passed = True
   except socket.error:
     # IPv4 is not supported
     pass
   try:
     _, url = tensorboard.make_simple_server(
         self._StubApplication(),
         host='::1',
         port=0)
     self.assertStartsWith(actual=url, expected_start='http://[::1]:')
     one_passed = True
   except socket.error:
     # IPv6 is not supported
     pass
   self.assertTrue(one_passed)  # We expect either IPv4 or IPv6 to be supported
Ejemplo n.º 6
0
def main(unused_argv=None):
    util.setup_logging()
    tb_app = tb_main.create_tb_app(
        assets_zip_provider=get_assets_zip_provider(), plugins=get_plugins())

    server, url = tb_main.make_simple_server(tb_app)

    logger = logging.getLogger('tensorflow' + util.LogHandler.EPHEMERAL)
    logger.setLevel(logging.INFO)
    logger.info('TensorBoard-X (Beholder) 0.1 at %s (CTRL+C to quit)', url)

    try:
        server.serve_forever()
    finally:
        logger.info('')