Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 1.61 KB

DEVELOPMENT.md

File metadata and controls

27 lines (20 loc) · 1.61 KB

How to Develop TensorBoard

TensorBoard at HEAD relies on the nightly installation of TensorFlow: this allows plugin authors to use the latest features of TensorFlow, but it means release versions of TensorFlow may not suffice for development. We recommend installing TensorFlow nightly in a Python virtualenv, and then running your modified development copy of TensorBoard within that virtualenv. To install TensorFlow nightly within the virtualenv, you can simply run

$ virtualenv tf
$ source tf/bin/activate
(tf)$ pip install --upgrade pip
(tf)$ pip install tf-nightly

TensorBoard builds are done with Bazel, so you may need to install Bazel. The Bazel build will automatically "vulcanize" all the HTML files and generate a "binary" launcher script. When HTML is vulcanized, it means all the script tags and HTML imports are inlined into one big HTML file. Then the Bazel build puts that index.html file inside a static assets zip. The python HTTP server then reads static assets from that zip while serving.

You can build and run TensorBoard via Bazel (from within the TensorFlow nightly virtualenv) as follows:

(tf)$ bazel build tensorboard
(tf)$ ./bazel-bin/tensorboard/tensorboard --logdir path/to/logs
# Or combine the above steps as:
(tf)$ bazel run //tensorboard -- --logdir /path/to/logs

To generate fake log data for a plugin, run its demo script. For instance, this command generates fake scalar data in /tmp/scalars_demo:

(tf)$ bazel run //tensorboard/plugins/scalar:scalars_demo