Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tbparse

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tbparse

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

  • 0.0.9
  • PyPI
  • Socket score

Maintainers
1

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 TypeTensorboard Dashboardtbparse
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:

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc