Installation

Install from PyPI:

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.

Install from Source:

git clone https://github.com/j3soon/tbparse
cd tbparse
pip install tensorflow # or tensorflow-cpu
pip install -e . # requires Python >= 3.7

Installing without TensorFlow

You can install tbparse with reduced feature set if you don’t want to install TensorFlow:

# Don't install TensorFlow
pip install -U tbparse # requires Python >= 3.7

Without TensorFlow, tbparse supports parsing scalars, histograms, and hparams, but doesn’t support parsing tensors, images, audio, and text.

tbparse will instruct you to install TensorFlow by raising an error if you try to parse the unsupported event types, such as:

ModuleNotFoundError: No module named ‘tensorflow’. Please install ‘tensorflow’ or ‘tensorflow-cpu’.

In addition, an error may occur if you have installed TensorFlow and TensorBoard and uninstalled TensorFlow afterwards:

AttributeError: module ‘tensorflow’ has no attribute ‘io’

This error occurs since TensorBoard will depend on TensorFlow if TensorFlow exists in the environment. See TensorBoard README for more information.

To resolve this issue, create a new virtual environment and install tbparse without installing TensorFlow. Or you may uninstall all packages related to TensorFlow and TensorBoard, which require much more effort.