tbparse documentation

https://img.shields.io/pypi/v/tbparse https://img.shields.io/pypi/pyversions/tbparse https://pepy.tech/badge/tbparse https://img.shields.io/pypi/l/tbparse https://img.shields.io/github/actions/workflow/status/j3soon/tbparse/test-with-tox.yaml?label=tests https://img.shields.io/github/actions/workflow/status/j3soon/tbparse/publish-to-pypi.yaml https://readthedocs.org/projects/tbparse/badge/?version=latest https://codecov.io/gh/j3soon/tbparse/branch/master/graph/badge.svg?token=ASxeqFrMom https://img.shields.io/github/stars/j3soon/tbparse?style=social https://colab.research.google.com/assets/colab-badge.svg

A simple yet powerful tensorboard event log parser/reader:

  • Supports parsing tensorboard event scalars, tensors, histograms, images, audio, hparams, and text.

  • Supports event generated by PyTorch, Tensorboard / Keras, and TensorboardX, with their respective usage examples documented in detail.

  • Allows parsing multiple tensorboard event files in a hierarchical directory structure.

  • Provides plotting examples for each type of events.

  • Stores the data in pandas.DataFrame to allow advanced filtering.

  • Both the documentation and code have high test coverage rate.

  • Follows PEP 484 with full type hints.

Installation:

pip install tensorflow # or tensorflow-cpu
pip install -U tbparse # requires Python >= 3.7

Note: If you don’t want to install TensorFlow, see Installing without TensorFlow.

We suggest using an additional virtual environment for parsing and plotting the tensorboard events. So no worries if your training code uses Python 3.6 or older versions.

Reading one or more event files with tbparse only requires 5 lines of code:

from tbparse import SummaryReader
log_dir = "<PATH_TO_EVENT_FILE_OR_DIRECTORY>"
reader = SummaryReader(log_dir)
df = reader.scalars
print(df)

For beginners, start from the page: Parsing Scalars. If you find this package useful, you can star or fork the repository on GitHub.

Event Type

Tensorboard Dashboard

tbparse

Scalars

_images/scalars.png _images/scalars1.png

Tensors

_images/tensors.png _images/tensors1.png

Histograms

_images/histograms.png _images/histograms1.png

Images

_images/images.png _images/images1.png

Audio

_images/audio.png _images/audio1.png

HParams

_images/hparams.png _images/hparams1.png

Text

_images/text.png _images/text1.png

All events above are generated and plotted in the Gallery notebook in the Extras section.

Getting Started

Examples

Indices and tables