Parsing TensorBoard data locally

Dawid Laszuk published on
2 min, 279 words

TensorBoard seems to be a de facto standard tool for displaying your ML experimental data. There are some alternatives, but likely due to "being first" and "by google" stamps the TensorBoard (TB) is still the most common one. Many of these alternatives are far superior, especially if you're using something else than Tensorflow, but TB is still the first go to.

A good thing with TB is that it stores data locally. A bad thing about TB is that it doesn't provide a nice way to extract that data. (No, clicking one graph at a time and then doing "save as csv" is a terrible way when there are hundreds of graphs to be compared.) To be fair, there is "a way" to convert experimental data into, for example, pandas DataFrames but since it requires uploading and downloading data from someone's server I'm going to politely ignore the audacity. Ok, it might be the best solution if you have super fast internet connect, a SSD disk, and no RAM memory left on your computer, but otherwise it's a bazooka shooting a fly.

Do it locally. Tensorboard stores your data in Tensorflow TFEvents records. Tensorflow already has API, summary_iterator, to deal with them. It isn't magic. Actually, here is a link to my Python gist that does just that - converts TensorBoard data to pandas DataFrame. Note that you need Tensorflow and Pandas installed to use it, which I assume you have since you're storing as TFevents and want to convert to pandas DataFrame.

Here it is embedded: