https://github.com/jolibrain/dd_board
Tensorboard logger for DeepDetect server JSON output
https://github.com/jolibrain/dd_board
deepdetect deeplearning tensorboard tensorboard-logger
Last synced: about 1 year ago
JSON representation
Tensorboard logger for DeepDetect server JSON output
- Host: GitHub
- URL: https://github.com/jolibrain/dd_board
- Owner: jolibrain
- License: apache-2.0
- Created: 2017-08-30T10:09:24.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-06T16:44:38.000Z (about 8 years ago)
- Last Synced: 2025-04-13T23:13:20.661Z (about 1 year ago)
- Topics: deepdetect, deeplearning, tensorboard, tensorboard-logger
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 4
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dd_board
Version 0.4
Works with: Python 2.7
Converts logs to "TensorBoard compatible" data.
Parameters (except for del_dir, they must be written between quotes, even if left empty):
- log_src = string, log source to analyze (flow, log file or any Python dict / JSON object).
- base_dir = string, general cache directory used by tensorboard. If not existing, will be created.
- sub_dir = string, subdirectory of the current run used by tensorboard. If not existing, will be created.
- del_dir = bolean, *False* if ommited. If set to *False*, the new graph is displayed after the preceding one, if any. If set to *True*, the tensorboard cache directory (*base_dir/sub_dir*) will be deleted and the new graph will be the only one to appear.
Requirements:
-------------
- [tensorboard_logger](https://github.com/TeamHG-Memex/tensorboard_logger)
Usage:
------
```
from dd_board_logger import DDBoard
do_what_have_to_be_done_before()
read_dd = DDBoard(base_dir, sub_dir, del_dir)
```
Then, with a log flow:
```
read_dd.ddb_logger(log_src)
```
Or, with a log file:
```
read_dd.ddb_logger_file(log_src)
```
Or with external data (need "import json, time", for this example):
```
log_src = open(json_src, 'r')
for line in log_src:
json_src = open(log_src, 'r')
for line in json_src:
json_obj = json.loads(line)
read_dd.ddb_logger(json_obj)
time.sleep(1)
```
You can then start TensorBoard in console:
```
$tensorboard --logdir base_dir
```
(base_dir without quotes, here. Ex: *tensorboard --logdir runs*)