Skip to main content

tbparse

pypi python PyPI - 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 -U tbparse # requires Python >= 3.8

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.

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 # optional, only required if you want to parse images and audio
pip install -U tbparse # requires Python >= 3.8

Note: For details on when TensorFlow is required, 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:

Metadata

Release files for tbparse 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tbparse 0.0.9
File Size Uploaded Provenance Actions
tbparse-0.0.9.tar.gz 21.4 kB Without provenance Details for tbparse-0.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tbparse 0.0.9
File Interpreter ABI Platform Actions
tbparse-0.0.9-py3-none-any.whl Python 3 none any Details for tbparse-0.0.9-py3-none-any.whl

Total release size: 41.0 kB

Release files / tbparse-0.0.9.tar.gz

Download URL tbparse-0.0.9.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
528e7da6929148b612a517adb5fbdee709224cb7e2420489a9b6b174f2f808bc
BLAKE2b-256 checksum
How to use checksums
970b553a13cb39f8ccad888c2d9b07e04cb1a60011e1073771fd6b5d904b61c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release files / tbparse-0.0.9-py3-none-any.whl

Download URL tbparse-0.0.9-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
51a001728bc539a1efed9f03450b1e0151ad14011c8c52f156cf55dc1fbaa884
BLAKE2b-256 checksum
How to use checksums
177a56818acfbf03ef6eae4c3e0a7091ab6ffd8c3b44af93f2982297c07b50f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Security for tbparse 0.0.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page