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.
- Host: GitHub
- URL: https://github.com/sontallive/tensorboardthread
- Owner: sontallive
- Created: 2019-12-20T03:33:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-20T03:37:40.000Z (almost 6 years ago)
- Last Synced: 2025-03-03T16:43:33.696Z (7 months ago)
- Language: Python
- Size: 2.33 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Run tensorboard in codes
## how to use
```python
from code_tensorboard import TensorBoardThread
import threadingtb_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 += 1print("http://{}:{}".format(tb_host, tb_port))
```using this signal to wait, so you can use the url as soon as the start of tensorboard.