Exemplo n.º 1
0
 def setUp(self):
     self.temp_dir = self._GenerateTestData()
     multiplexer = event_multiplexer.EventMultiplexer(
         size_guidance=application.DEFAULT_SIZE_GUIDANCE,
         purge_orphaned_data=True)
     plugins = [
         FakePlugin(plugin_name='foo', is_active_value=True),
         FakePlugin(plugin_name='bar', is_active_value=False)
     ]
     app = application.TensorBoardWSGIApp(self.temp_dir,
                                          plugins,
                                          multiplexer,
                                          reload_interval=0)
     try:
         self._server = serving.BaseWSGIServer('localhost', 0, app)
         # 0 to pick an unused port.
     except IOError:
         # BaseWSGIServer has a preference for IPv4. If that didn't work, try again
         # with an explicit IPv6 address.
         self._server = serving.BaseWSGIServer('::1', 0, app)
     self._server_thread = threading.Thread(
         target=self._server.serve_forever)
     self._server_thread.daemon = True
     self._server_thread.start()
     self._connection = http_client.HTTPConnection(
         'localhost', self._server.server_address[1])
Exemplo n.º 2
0
 def setUp(self):
     self.temp_dir = self._GenerateTestData()
     plugins = {'projector': projector_plugin.ProjectorPlugin()}
     app = application.TensorBoardWSGIApp(self.temp_dir,
                                          plugins,
                                          reload_interval=0)
     self._server = serving.BaseWSGIServer('localhost', 0, app)
     # 0 to pick an unused port.
     self._server_thread = threading.Thread(
         target=self._server.serve_forever)
     self._server_thread.daemon = True
     self._server_thread.start()
     self._connection = http_client.HTTPConnection(
         'localhost', self._server.server_address[1])
Exemplo n.º 3
0
 def setUp(self):
   self.temp_dir = self._GenerateTestData()
   multiplexer = event_multiplexer.EventMultiplexer(
       size_guidance=application.DEFAULT_SIZE_GUIDANCE,
       purge_orphaned_data=True)
   plugins = {'projector': projector_plugin.ProjectorPlugin()}
   app = application.TensorBoardWSGIApp(
       self.temp_dir, plugins, multiplexer, reload_interval=0)
   self._server = serving.BaseWSGIServer('localhost', 0, app)
   # 0 to pick an unused port.
   self._server_thread = threading.Thread(target=self._server.serve_forever)
   self._server_thread.daemon = True
   self._server_thread.start()
   self._connection = http_client.HTTPConnection(
       'localhost', self._server.server_address[1])