Reduce multiple TensorBoard runs to new event (or CSV) files
Project description
Compute reduced statistics (mean
, std
, min
, max
, median
or any other numpy
operation) of multiple TensorBoard runs matching a directory glob pattern. This can be used after training multiple identical models to reduce the noise in their loss/accuracy/error curves e.g. when trying to establish a statistically significant improvement in training performance.
Requires PyTorch and TensorBoard. No TensorFlow installation required.
Installation
pip install tensorboard-reducer
Usage
Example:
tb-reducer -i 'glob_pattern/of_dirs_to_reduce*' -o basename_of_output_dir -r mean,std,min,max
tb-reducer
has the following flags:
-i/--indirs-glob
(required): Glob pattern of the run directories to reduce.-o/--outdir
(required): Name of the directory to save the new reduced run data. If--format
istb-events
, a separate directory will be created for each reduce op (mean
,std
, ...) post-fixed by the op's name (outdir-mean
,outdir-std
, ...). If--format
iscsv
, a single file will created andoutdir
must end with a.csv
extension.-r/--reduce-ops
(required): Comma-separated names of numpy reduction ops (mean
,std
,min
,max
, ...). Default ismean
. Each reduction is written to a separateoutdir
suffixed by its op name, e.g. ifoutdir='my-new-run
, the mean reduction will be written tomy-new-run-mean
.-f/--format
: Output format of reduced TensorBoard runs. One oftb-events
for regular TensorBoard event files orcsv
. Ifcsv
,-o/--outdir
must have.csv
extension and all reduction ops will be written to a single CSV file rather than separate directories for each reduce op. Usepandas.read_csv("path/to/file.csv", header=[0, 1], index_col=0)
to read data back into memory as a multi-index dataframe.-w/--overwrite
(optional): Whether to overwrite existingoutdir
s/CSV files.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tensorboard-reducer-0.1.3.tar.gz
.
File metadata
- Download URL: tensorboard-reducer-0.1.3.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c9481d3bec240719ebab15d666e46e54854b74f65590d5e0066f0251cf0d711 |
|
MD5 | b2296ee503058dcd7897739873266fad |
|
BLAKE2b-256 | 758c35784e21054800f869fab5298580c419dbda93c957dd11f536c21f7bad23 |
File details
Details for the file tensorboard_reducer-0.1.3-py2.py3-none-any.whl
.
File metadata
- Download URL: tensorboard_reducer-0.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7a2fcd0db9b4fbc44284608ef75056e69eeed1b8e9c359bd184036a34689037 |
|
MD5 | 072cb929a082e5af91ae6b6f823646d2 |
|
BLAKE2b-256 | 740b25a68c1085a0397fa4cfb498c864abe058741bf52317f4cac3739ed6142c |