Open-source project
tensorflow/tensorboard avatar
tensorflow/tensorboard

TensorBoard: reading tfevents logs without leaving your own network

TensorFlow's Visualization Toolkit

7,228 stars1,715 forksTypeScriptApache-2.0

At a glance

What is it?
TensorBoard is a set of web applications that read TensorFlow event files from a log directory and render scalars, images, audio, text and histograms in a browser. It is a viewer for data you already wrote to disk, not a training framework.
Who is it for?
Adopt TensorBoard if you already write summary ops to a log directory and want to inspect them on a machine with no outbound network access, since the README states it is designed to run entirely offline. Do not adopt it as a training framework or as a hosted experiment service: it visualizes data that some other process produced, and the README describes it as a suite of web applications for inspecting TensorFlow runs and graphs.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 36 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What TensorBoard is for, and who ends up running it

TensorBoard reads a directory of event files and serves a set of dashboards over HTTP. The README describes it as "a suite of web applications for inspecting and understanding your TensorFlow runs and graphs." That phrasing matters: the tool is a reader. It does not train anything, does not collect metrics on its own, and has nothing to show until some other process has written summary data into a log directory.

The audience is therefore narrower than the download numbers suggest. You are the right user if your training loop already calls summary ops and you want a local view of them. You are the wrong user if you are looking for a managed experiment tracker with a hosted URL, or if your metrics live in a database rather than in protobuf event files on disk.

One design decision is worth flagging early. The README states that TensorBoard "is designed to run entirely offline, without requiring any access to the Internet." That is a deliberate constraint, not an accident of packaging. It means the whole tool is meant to work on a laptop, behind a corporate firewall, or inside a datacenter with no egress. If your workflow assumes a cloud dashboard that several people open from different networks, you are working against the grain of the project.

Summary ops, tags and tfevents: the data path

The mechanism has four stages and the README is explicit about each.

First, summary ops. These are ordinary TensorFlow ops, evaluated inside a graph like tf.matmul or tf.nn.relu, but the tensors they produce hold serialized protobufs. The supported set listed in the README is tf.summary.scalar, tf.summary.image, tf.summary.audio, tf.summary.text and tf.summary.histogram. You evaluate the op, take the result, and hand it to a FileWriter.

Second, the tag. Every summary op gets a name, and that name organizes the frontend. The scalar and histogram dashboards group data by tag, and the README recommends grouping tags into folders with a slash hierarchy when you have many of them. This is the one piece of log hygiene the project asks of you, and skipping it produces a flat, unreadable tag list in the sidebar.

Third, the log directory. FileWriters append to a record dump whose filename contains "tfevents". TensorBoard reads the whole directory rather than a single file, and the README gives the reason: if TensorFlow crashes and a supervisor restarts it from a checkpoint, the new process starts a new events file, and TensorBoard stitches the files together into one consistent history. That is a real advantage over tools that key on a single file path.

Fourth, runs. When you pass a logdir, TensorBoard walks the tree recursively looking for subdirectories containing tfevents data. Each such subdirectory becomes a run, and the frontend lets you compare runs side by side. The README's example layout puts run1 and run2 under a shared parent directory, with each run holding its own events files.

The legacy alternative is --logdir_spec, which accepts a comma-separated list of directories, optionally named with a colon, as in name1:/path/to/logs/1. The README discourages it: "This flag (--logdir_spec) is discouraged and can usually be avoided," and warns that some features may not work with it. For finer control the README points at a symlink tree instead. If you have inherited a script that uses --logdir_spec, that warning is your migration note.

Installing TensorBoard and viewing your first run

There are two install paths in the README. If you installed TensorFlow from a precompiled package such as pip, the tensorboard command is already available. If you are building from source, you build the Bazel target first.

Before either works, you need event files. The README's minimal example creates a FileWriter against a log directory, passing the graph so the Graph Visualizer has something to draw:

python
# sess.graph contains the graph definition; that enables the Graph Visualizer.
file_writer = tf.summary.FileWriter('/path/to/logs', sess.graph)

With event files on disk, start the server and point it at the directory:

bash
tensorboard --logdir path/to/logs

The README says this should print that TensorBoard has started, and that you then connect to http://localhost:6006. Port 6006 is the documented default; the README does not describe a flag for changing it, only that you can run tensorboard --help for configuration details.

If you are building from source rather than installing a package, the README gives three equivalent invocations:

bash
bazel build tensorboard:tensorboard
./bazel-bin/tensorboard/tensorboard --logdir path/to/logs

# or even more succinctly
bazel run tensorboard -- --logdir path/to/logs

Note the double dash before --logdir in the bazel run form. That is the boundary between Bazel's own arguments and the arguments handed to TensorBoard, and omitting it is a common first mistake.

Finally, browser support is bounded. The README states TensorBoard can be used in Google Chrome or Firefox, and that other browsers might work but there may be bugs or performance issues. That is a narrower support statement than most web tools publish, and it is worth taking literally if your team standardizes on something else.

Where TensorBoard stops being the right tool

The hardest limitation is upstream of the tool. TensorBoard cannot visualize what was never written. If your training code does not evaluate summary ops and flush them through a FileWriter, the logdir will be empty or missing and there is nothing to debug in the frontend. The README does not document any ingestion path other than tfevents files, so there is no fallback for, say, a CSV of metrics.

The second limitation is the tag namespace. Because the scalar and histogram dashboards organize by tag and group into slash-separated folders, a project that emits hundreds of flat tag names gets a sidebar that is technically correct and practically unusable. The README's recommendation to group with slashes is the only remedy it offers. There is no documented tag-filtering or renaming layer.

The third is the logdir_spec caveat already mentioned. A flag the project itself discourages, with an explicit note that some features may not work, is not a foundation to build on. Teams that adopted it for multi-directory comparisons should treat the symlink-tree approach as the supported route.

Fourth, this is a viewer tied to TensorFlow's summary format. The README frames the entire data path in terms of TensorFlow summary ops and FileWriters. Nothing in the documentation describes a supported path for ingesting another framework's native log format without going through a compatible writer. If your stack is not TensorFlow-shaped at the logging layer, the tool's usefulness depends on whether something else in your pipeline writes tfevents, and that is a question the README does not answer.

Finally, the README does not document rollback, version pinning between the pip package and the TensorFlow version that produced the event files, or any migration procedure between TensorBoard releases. Those are real operational questions with no answer in the documentation, and you should not assume they are handled.

TensorBoard compared with Weights & Biases and MLflow

The honest comparison is about where the data lives and who can see it.

TensorBoard reads files from a directory on a filesystem and serves them from a local process. The README's offline design statement is the whole architecture in one sentence: no internet access required. Sharing a view means sharing a machine or a port, not sending a link to a hosted workspace.

Weights & Biases and MLflow, the two alternatives people most often search alongside TensorBoard, invert that. They are built around a central store and a client that ships metrics to it, which is what makes cross-team comparison and long-term retention straightforward, and what makes them require network access and an account or server to be useful. If your constraint is that runs must never leave the datacenter, that inversion is disqualifying.

The trade runs the other way too. With TensorBoard, retention is your problem: event files accumulate in a logdir and nothing in the README describes lifecycle management. With a hosted tracker, retention is the vendor's or your server's problem but the data is out of your hands. Neither is strictly better; they fail in opposite directions.

There is also a scope difference. TensorBoard ships graph, image, audio, text and histogram dashboards as part of the same suite, and the repository root carries an ADDING_A_PLUGIN.md for extending it. A metric logger that only charts scalars is a smaller tool doing a smaller job. If all you need is a loss curve, the extra surface area of TensorBoard is cost without benefit.

Maintenance, releases and what Apache-2.0 means here

The repository is not archived, and the last push was on 2026-08-24. The release cadence visible in the release list is roughly annual for major versions: 2.19.0 in February 2025, 2.20.0 in July 2025, and 2.21.0 on 2026-06-29. That is a slow, deliberate rhythm rather than a stream of patches, and it means a bug you hit may sit for a while.

Building from source is the expensive path, and the repository makes that visible. The Dockerfile installs a JDK, Node.js, npm, Python 3 and pip, downloads a pinned Bazel 4.2.2 and buildtools 3.0.0, installs ibazel globally, then runs bazel fetch //tensorboard/... against tf-nightly. That is a heavy toolchain for a visualization server, and it is the reason most users should take the pip package that ships with TensorFlow rather than build the frontend themselves. The package.json confirms the frontend is an Angular application with Bazel build targets, so source builds pull in the whole TypeScript and Bazel stack.

Upgrade cost is the part the documentation is least clear about. RELEASE.md exists at the repository root, but the README itself says nothing about how event-file compatibility is maintained across versions, or whether a newer TensorBoard can read logs written by an older TensorFlow. Treat that as unverified and test it against your own logs before upgrading in a shared environment.

Licensing is Apache-2.0, stated in both the LICENSE file at the repository root and the license field of package.json. Apache-2.0 is a permissive licence with an explicit patent grant and requires that notices be preserved. It is not a copyleft licence, so it does not oblige you to publish modifications. That is a factual description of the licence identifier, not legal advice; if you redistribute TensorBoard inside a product, have counsel review the NOTICE and attribution requirements.

Editorial conclusion

Adopt TensorBoard if you already write summary ops to a log directory and want to inspect them on a machine with no outbound network access, since the README states it is designed to run entirely offline. Do not adopt it as a training framework or as a hosted experiment service: it visualizes data that some other process produced, and the README describes it as a suite of web applications for inspecting TensorFlow runs and graphs. Before committing, verify three things: that your training code actually emits tfevents files, that your tags use slash-separated hierarchies if you have many of them, and that your browser is Chrome or Firefox, since the README notes other browsers may work but may have bugs or performance issues. If you only need to compare hyperparameter runs and never inspect graphs or histograms, a smaller metric logger may cost you less to operate.

Frequently asked questions

What is TensorBoard used for?

It is a suite of web applications for inspecting and understanding TensorFlow runs and graphs. It reads tfevents files from a log directory and renders dashboards for scalars, images, audio, text and histograms.

How can I access TensorBoard?

Start it with tensorboard --logdir path/to/logs and then connect to http://localhost:6006, which is the address the README gives. The README states TensorBoard can be used in Google Chrome or Firefox.

How do I install TensorBoard?

If you installed TensorFlow from a precompiled package such as pip, the tensorboard command is already available. Building from source instead requires Bazel, as shown by the bazel build tensorboard:tensorboard and bazel run tensorboard -- --logdir path/to/logs commands in the README.

How can I use TensorBoard with PyTorch?

The README does not document a PyTorch integration. Its entire data path is described in terms of TensorFlow summary ops and FileWriters, so TensorBoard has nothing to display unless something in your pipeline writes tfevents files to the logdir.

How do I use TensorBoard in a terminal?

Run tensorboard --logdir path/to/logs from a shell; the README says this should print that TensorBoard has started. For configuration details beyond that, the README points at tensorboard --help.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. README
  4. Releases
  5. tensorflow/tensorboard on GitHub
For maintainers

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/tensorflow-tensorboard.svg)](https://hysenlabs.com/projects/tensorflow-tensorboard)
Community notes

Community notes