Skip to main content

Read, parse, and plot tensorboard event logs with ease!

Project description

tbparse

tests build doc codecov pypi python Downloads

A simple yet powerful tensorboard event log parser/reader.

  • Supports parsing tensorboard event scalars, tensors, and histograms.
  • 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: (Requires python >= 3.7)

pip install -U tbparse

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.

Currently, tbparse enables parsing native types (scalars, tensors, histograms, etc.) easily. More event types will be supported in future versions.

Installation

pip install -U tbparse

(Requires python >= 3.7)

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 MIT License.

The tbparse PyPI package depends upon (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.4.tar.gz (15.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.4-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tbparse-0.0.4.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for tbparse-0.0.4.tar.gz
Algorithm Hash digest
SHA256 d80ddfd52e8d1923b50a6c012f34c59e54ba33f87cacd3c31c58eff7f566b246
MD5 c93d8c2a48a5cf56842122bd2fbe1175
BLAKE2b-256 a7235045609764d1c5fa2e5619cd8509d566671d3c8d89b10044144be59b0c82

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tbparse-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for tbparse-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0c46f190cdd3801599f9d40533b50bf26a83345095e341cbe239a779d115b3ba
MD5 ccbaf3733bd6a1f5be08916b22186f5f
BLAKE2b-256 f58824497235187cf07a462c97fdd9af6f83beb82a67e78ed7af8867d559988c

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