Skip to main content

Load tensorboard event logs as pandas DataFrames; Read, parse, and plot tensorboard event logs with ease!

Project description

tbparse

pypi python Downloads license

tests build doc codecov

Open In Colab

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)

If you want an additional column with directory names (i.e., run names), change line 3 above to the following:

reader = SummaryReader(log_dir, extra_columns={'dir_name'})

For further information, start from the page: Parsing Scalars.

Gallery

Event Type Tensorboard Dashboard tbparse
Scalars
Tensors
Histograms
Images
Audio
HParams
Text

All events above are generated and plotted in gallery-pytorch.ipynb.

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.

Testing the Source Code

Test source code:

python3 -m pip install tox
python3 -m tox

Test and build documentation:

cd docs
make clean
# sphinx-tabs seems to require html be built before doctest
make html
make doctest

Generate test coverage:

python3 -m pip install pandas tensorflow torch tensorboardX pytest pytest-cov
python3 -m pytest --cov=./ --cov-report html

License

tbparse is distributed under the Apache License 2.0.

The tbparse PyPI package depends on (imports) the following third-party package. Each third-party software package is provided under its own license:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tbparse-0.0.8.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tbparse-0.0.8-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file tbparse-0.0.8.tar.gz.

File metadata

  • Download URL: tbparse-0.0.8.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for tbparse-0.0.8.tar.gz
Algorithm Hash digest
SHA256 3d81d903d09f9d94ac0b52f9814889c3bf5fc994f34f3d1d2b12d02bfd882ed9
MD5 06c4231bb1a081ada246436ebedd66cd
BLAKE2b-256 49001bef961493d7720983201da4b4098522fbbc6b0711e8f8fd2cc629e2c4af

See more details on using hashes here.

File details

Details for the file tbparse-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: tbparse-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for tbparse-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 be87b4de0720bc9be7fe80f0625ab9bf963b051ce241a58f0e0a23a2436ac26d
MD5 ce02a026826872d2eafff9a46a739902
BLAKE2b-256 42c408dd8ce00d6764c7df33088cb0e1a6947b4107241d47c64999beb079bfb5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page