An open API service indexing awesome lists of open source software.

https://github.com/sontallive/tensorboardthread

run tensorboard in your code, and you can stop it freely.
https://github.com/sontallive/tensorboardthread

Last synced: 6 months ago
JSON representation

run tensorboard in your code, and you can stop it freely.

Awesome Lists containing this project

README

          

# Run tensorboard in codes

## how to use

```python
from code_tensorboard import TensorBoardThread
import threading

tb_port = 6006
tb_host = 'localhost'
while True:
signal = threading.Event()
tb_thread = TensorBoardThread(signal, tb_path, tb_port)
tb_thread.start()
signal.wait()
if tb_thread.wrong:
tb_thread.terminate()
tb_port += 1

print("http://{}:{}".format(tb_host, tb_port))
```

using this signal to wait, so you can use the url as soon as the start of tensorboard.