Python API for launching TensorBoard. This method is the same as main() except it launches TensorBoard in a separate permanent thread. The configure() method must be called first. Returns: The URL of the TensorBoard web server. :rtype: str
(self)
| 303 | return -1 |
| 304 | |
| 305 | def launch(self): |
| 306 | """Python API for launching TensorBoard. |
| 307 | |
| 308 | This method is the same as main() except it launches TensorBoard in |
| 309 | a separate permanent thread. The configure() method must be called |
| 310 | first. |
| 311 | |
| 312 | Returns: |
| 313 | The URL of the TensorBoard web server. |
| 314 | |
| 315 | :rtype: str |
| 316 | """ |
| 317 | # Make it easy to run TensorBoard inside other programs, e.g. Colab. |
| 318 | server = self._make_server() |
| 319 | thread = threading.Thread( |
| 320 | target=server.serve_forever, name="TensorBoard" |
| 321 | ) |
| 322 | thread.daemon = True |
| 323 | thread.start() |
| 324 | return server.get_url() |
| 325 | |
| 326 | def _register_info(self, server): |
| 327 | """Write a TensorBoardInfo file and arrange for its cleanup. |
nothing calls this directly
no test coverage detected