bbernhard / tensorboard_screenshot

Automatically take a screenshot of TensorBoard graphs using Headless Chrome

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tensorboard_screenshot

It can be real tedious manually taking screenshots of TensorBoard graphs for work logs. So let's automate it!

Usage

  • Install Node.js (e.g. brew install node)
  • Install Puppeteer (npm i puppeteer)
  • Run with:
$ node tensorboard_screenshot.js <TensorBoard instance URL> <Output Path>

Example

$ python3 -c "from easy_tf_log import tflog; tflog('foo', 0); tflog('foo', 1)"
$ tensorboard --logdir logs &
TensorBoard 1.12.1 at http://localhost:6006 (Press CTRL+C to quit)
$ node tensorboard_screenshot.js localhost:6006 /tmp/screenshot.png
Starting browser...
Waiting for page to finish loading...
Found 2 graphs
Screenshot saved to /tmp/screenshot.png

Open screenshot.png to find:

Bugs

We try to be smart about window sizing, but it's not an exact science. We aim for 5 graphs per row, but it might be a little off.

About

Automatically take a screenshot of TensorBoard graphs using Headless Chrome


Languages

Language:JavaScript 100.0%