# tbparse

[![tests](https://github.com/j3soon/tbparse/actions/workflows/test-with-tox.yaml/badge.svg?branch=master&event=push)](https://github.com/j3soon/tbparse/actions/workflows/test-with-tox.yaml)
[![build](https://github.com/j3soon/tbparse/actions/workflows/publish-to-pypi.yaml/badge.svg?branch=master&event=push)](https://github.com/j3soon/tbparse/actions/workflows/publish-to-pypi.yaml)

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

tbparse is a simple parser for reading tensorboard logs. It supports logs generated by [TensorFlow / Keras](https://www.tensorflow.org/tensorboard), [PyTorch](https://pytorch.org/docs/stable/tensorboard.html), and [TensorboardX](https://github.com/lanpa/tensorboardX).

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

![preview](docs/images/preview.png)

## Installation

```sh
pip install tbparse
```

(Requires python >= 3.7)

## Usages

```py
from tbparse import SummaryReader
log_dir = "<PATH_TO_EVENT_FILE>"
df = SummaryReader(log_dir).scalars
print(df)
```
