1- # Terminal-plot for Tensorboard
1+ # Terminal-plot for Tensorboard and CSV
22
3- [ ![ pypi] ( https://img.shields.io/pypi/v/tensorboard-termplot )] ( https://pypi.org/project/tensorboard-termplot / )
4- [ ![ python-version] ( https://img.shields.io/pypi/pyversions/tensorboard-termplot )] ( https://pypi.org/project/tensorboard-termplot / )
5- [ ![ Master Update] ( https://img.shields.io/github/last-commit/soraxas/tensorboard- termplot/master.svg )] ( https://github.com/soraxas/tensorboard- termplot/commits/master )
3+ [ ![ pypi] ( https://img.shields.io/pypi/v/terminal-plot )] ( https://pypi.org/project/terminal-plot / )
4+ [ ![ python-version] ( https://img.shields.io/pypi/pyversions/terminal-plot )] ( https://pypi.org/project/terminal-plot / )
5+ [ ![ Master Update] ( https://img.shields.io/github/last-commit/soraxas/termplot/master.svg )] ( https://github.com/soraxas/termplot/commits/master )
66[ ![ Code style: black] ( https://img.shields.io/badge/code%20style-black-000000.svg )] ( https://github.com/psf/black )
7- [ ![ License] ( https://img.shields.io/github/license/soraxas/tensorboard- termplot.svg )] ( https://github.com/soraxas/tensorboard- termplot/blob/master/LICENSE )
7+ [ ![ License] ( https://img.shields.io/github/license/soraxas/termplot.svg )] ( https://github.com/soraxas/termplot/blob/master/LICENSE )
88
9- A plotter for tensorboard, directly within your terminal. This is useful when you are training your neural network on a remote server, and you just want to quickly peek at the training curve without launching a tensorboard instance and mess with forwarding ports.
9+ A plotter for multiple different tensorboard, directly within your terminal. This is useful when you are training your neural network on a remote server, and you just want to quickly peek at the training curve without launching a tensorboard instance and mess with forwarding ports.
1010
1111## Install
1212
1313You can install the package published in PyPI with
1414``` sh
15- $ pip install tensorboard-termplot
15+ $ pip install terminal-plot
16+ # or install with matplotlib backend dependency
17+ $ pip install terminal-plot[matplotlib-backend]
18+
1619# or install with an isolated environment
17- # $ pipx install tensorboard-termplot
20+ # $ pipx install terminal-plot
1821```
1922
2023## Usage
2124
2225``` sh
23- $ tensorboard- termplot FOLDER
26+ $ termplot FOLDER/FILE
2427```
2528For example,
2629``` sh
27- $ tensorboard- termplot ~ /my_amazing_nn/runs
30+ $ termplot ~ /my_amazing_nn/runs
2831```
2932where ` runs ` is the folder that tensorboard had created.
3033
34+ Or, using csv as a data source:
35+ ``` sh
36+ $ termplot ~ /my_stats/output.csv --csv
37+ # use the -x flag to select which stat will be used as x-axis
38+ # $ termplot ~/my_stats/output.csv --csv -x time
39+ ```
40+
41+ Or, using matplotlib as a plotting backend:
42+ ``` sh
43+ $ termplot ~ /my_stats/output.csv --csv -m
44+ ```
3145
3246# Example
3347
3448Running the executable on a tensorboard output folder:
3549
36- ![ ] ( https://raw.githubusercontent.com/soraxas/tensorboard- termplot/master/docs/images/example-output.png )
50+ ![ ] ( https://raw.githubusercontent.com/soraxas/termplot/master/docs/images/example-output.png )
3751
38- Or with the consolidate flag ` -c/--consolidate ` to combine multiple stats with a common prefix (most stats in the bottom figure had empty values):
52+ Or with the consolidated flag ` -c/--consolidate ` to combine multiple stats with a common prefix (most stats in the bottom figure had empty values):
3953
40- ![ ] ( https://raw.githubusercontent.com/soraxas/tensorboard- termplot/master/docs/images/example-output-consolidated.png )
54+ ![ ] ( https://raw.githubusercontent.com/soraxas/termplot/master/docs/images/example-output-consolidated.png )
4155
4256
4357# Help
4458
4559```
46- $ tensorboard-termplot --help
47- usage: tensorboard-termplot [-h] [--canvas-color CANVAS_COLOR]
48- [--axes-color AXES_COLOR]
49- [--ticks-color TICKS_COLOR] [--colorless] [-d]
50- [--grid] [--plotsize WIDTH,HEIGHT] [--force-label]
51- [--no-iter-color] [-c] [-f] [-n secs]
52- [--log_interval LOG_INTERVAL]
53- FOLDER
60+ $ termplot --help
61+ usage: termplot [-h] [--version]
62+ [--backend {plotext,matplotlib,matplotlib-terminal}]
63+ [--data-source {tensorboard,csv}] [-m] [--csv]
64+ [--plotsize WIDTH,HEIGHT] [-c] [--as-scatter]
65+ [--canvas-color CANVAS_COLOR] [--axes-color AXES_COLOR]
66+ [--ticks-color TICKS_COLOR] [--grid] [--colorless] [-d]
67+ [--no-iter-color] [--force-label] [-f] [-n secs]
68+ [-w keyword [keyword ...]] [-b keyword [keyword ...]]
69+ [-x XAXIS_TYPE] [--xlog [row,col ...]] [--ylog [row,col ...]]
70+ [--xsymlog [row,col ...]] [--ysymlog [row,col ...]]
71+ [--xlim row,col=min,max [row,col=min,max ...]]
72+ [--ylim row,col=min,max [row,col=min,max ...]] [--as-raw-bytes]
73+ [-s [0-1]] [--smooth-poly-order poly-order]
74+ [--terminal-width TERMINAL_WIDTH]
75+ [--terminal-height TERMINAL_HEIGHT]
76+ FOLDER
5477
5578positional arguments:
56- FOLDER Folder of a tensorboard runs
79+ FOLDER Source folder or file
5780
5881optional arguments:
5982 -h, --help show this help message and exit
83+ --version show program's version number and exit
84+ --backend {plotext,matplotlib,matplotlib-terminal}
85+ Set the plotting backend
86+ --data-source {tensorboard,csv}
87+ Set the plotting data source
88+ -m, --matplotlib Alias of --backend matplotlib
89+ --csv Alias of --data-source csv
90+ --plotsize WIDTH,HEIGHT
91+ Manually set the size of each subplot, e.g., 50,20.
92+ -c, --consolidate Consolidate based on prefix. If -cc is given,
93+ everything will consolidated regardless of prefix
94+ --as-scatter Plot as scatter (instead of line plot)
6095 --canvas-color CANVAS_COLOR
6196 set the color of the plot canvas (the area where the
6297 data is plotted)
@@ -67,18 +102,44 @@ optional arguments:
67102 --ticks-color TICKS_COLOR
68103 sets the (full-ground) color of the axes ticks and of
69104 the grid lines.
105+ --grid Show grid.
70106 --colorless Remove color.
71107 -d, --dark-theme A collection of flags. If set, it is equivalent to
72108 setting canvas-color and axes-color to black, and
73109 setting ticks-color to red. Can be overwritten
74110 individually.
75- --grid Show grid.
76- --plotsize WIDTH,HEIGHT
77- Manually set the size of each subplot, e.g., 50,20.
78- --force-label Force showing label even for plot with one series.
79111 --no-iter-color Stop iterating through different colors per plot.
80- -c, --consolidate Consolidate based on prefix .
112+ --force-label Force showing label even for plot with one series .
81113 -f, --follow Run in a loop to update display periodic.
82114 -n secs, --interval secs
83115 seconds to wait between updates
116+ -w keyword [keyword ...], --whitelist keyword [keyword ...]
117+ Keyword that the stat must contain for it to be
118+ plotted, case sensitive.
119+ -b keyword [keyword ...], --blacklist keyword [keyword ...]
120+ Keyword that the stat must not contain for it to be
121+ plotted, case sensitive.
122+ -x XAXIS_TYPE, --xaxis-type XAXIS_TYPE
123+ Set value type to be used for x-axis. Tensorboard only
124+ supports 'step' or 'time' as x-axis.
125+ --xlog [row,col ...] Set the list of subplots to use log scale in x-axis
126+ --ylog [row,col ...] Set the list of subplots to use log scale in y-axis
127+ --xsymlog [row,col ...]
128+ Set the list of subplots to use symlog scale in x-axis
129+ --ysymlog [row,col ...]
130+ Set the list of subplots to use symlog scale in y-axis
131+ --xlim row,col=min,max [row,col=min,max ...]
132+ Set the list of xlim for the specified subplot.
133+ --ylim row,col=min,max [row,col=min,max ...]
134+ Set the list of ylim for the specified subplot.
135+ --as-raw-bytes Writes the raw image bytes to stdout.
136+ -s [0-1], --smooth [0-1]
137+ A value from 0 to 1 as a smoothing factor.
138+ --smooth-poly-order poly-order
139+ Polynomial order for the savgol smoothing algorithm.
140+ --terminal-width TERMINAL_WIDTH
141+ Manually set the terminal width.
142+ --terminal-height TERMINAL_HEIGHT
143+ Manually set the terminal height.
144+
84145```
0 commit comments