---
type: concept
x-llmwiki:
  schemaVersion: "0.1"
  contentHash: 960c96a870664a859d2bca5d83ed0ed95d9f5189bebd14ebaab2b2cc45f988af
  pageDirectory: concepts
  sources:
    - tensorboard-databricks-on-aws.md
  confidence: 0.95
  provenanceState: extracted
  freshnessStatus: unverified
  aliases:
    - tensorboard-on-databricks
    - TOD
    - TensorBoard
  citations:
    - file: tensorboard-databricks-on-aws.md
title: TensorBoard on Databricks
description: How to start and use TensorBoard visualization tools within Databricks notebooks using magic commands or the notebook module.
tags:
  - databricks
  - visualization
  - machine-learning
timestamp: "2026-06-19T23:06:00.856Z"
---

# TensorBoard on Databricks

**TensorBoard** is a suite of visualization tools for debugging, optimizing, and understanding TensorFlow, PyTorch, Hugging Face Transformers, and other machine learning programs. On Databricks, TensorBoard can be launched directly from notebooks to visualize experiment logs and training metrics. ^[tensorboard-databricks-on-aws.md]

## Using TensorBoard[​](#using-tensorboard)

Starting TensorBoard on Databricks is no different than starting it on a local Jupyter notebook. Load the `%tensorboard` magic command and define your log directory, then invoke the magic command with the `--logdir` argument. The TensorBoard server starts and displays the user interface inline in the notebook, and also provides a link to open TensorBoard in a new tab. ^[tensorboard-databricks-on-aws.md]

```python
%load_ext tensorboard
experiment_log_dir = <log-directory>
%tensorboard --logdir $experiment_log_dir
```

Alternatively, you can start TensorBoard using its notebook module directly: ^[tensorboard-databricks-on-aws.md]

```python
from tensorboard import notebook
notebook.start("--logdir {}".format(experiment_log_dir))
```

## TensorBoard Logs and Directories[​](#tensorboard-logs-and-directories)

TensorBoard reads logs generated by TensorBoard callbacks in TensorFlow or PyTorch. For other libraries, you can write logs directly using TensorFlow file writers (`tf.summary` in TensorFlow 2.x or `tf.compat.v1.summary` in TensorFlow 1.x). ^[tensorboard-databricks-on-aws.md]

To ensure logs are reliably stored, Databricks recommends writing logs to cloud storage rather than the ephemeral cluster file system. For each experiment, start TensorBoard in a unique directory. For each run of your machine learning code, set the TensorBoard callback or file writer to write to a subdirectory of the experiment directory. This separates the data in the TensorBoard UI into runs. ^[tensorboard-databricks-on-aws.md]

## Managing TensorBoard Processes[​](#managing-tensorboard-processes)

TensorBoard processes started within a Databricks notebook are not terminated when the notebook is detached or the REPL is restarted (for example, when you clear the notebook state). To manually kill a TensorBoard process, send a termination signal using `%sh kill -15 pid`. Improperly killed TensorBoard processes might corrupt `notebook.list()`. ^[tensorboard-databricks-on-aws.md]

To list the TensorBoard servers currently running on your cluster, with their corresponding log directories and process IDs, run `notebook.list()` from the TensorBoard notebook module. ^[tensorboard-databricks-on-aws.md]

## Known Issues[​](#known-issues)

- The inline TensorBoard UI is inside an iframe. Browser security features prevent external links within the UI from working unless you open the link in a new tab. ^[tensorboard-databricks-on-aws.md]
- The `--window_title` option of TensorBoard is overridden on Databricks. ^[tensorboard-databricks-on-aws.md]
- By default, TensorBoard scans a port range for selecting a port to listen to. If too many TensorBoard processes are running, all ports in the range might be unavailable. You can work around this by specifying a port number with the `--port` argument. The specified port should be between 6006 and 6106. ^[tensorboard-databricks-on-aws.md]
- For download links to work, you must open TensorBoard in a tab. ^[tensorboard-databricks-on-aws.md]
- When using TensorBoard 1.15.0, the Projector tab is blank. As a workaround, you can replace `#projector` in the URL with `data/plugin/projector/projector_binary.html`. ^[tensorboard-databricks-on-aws.md]
- TensorBoard 2.4.0 has a [known issue](https://github.com/tensorflow/tensorboard/issues/4421) that might affect rendering if upgraded. ^[tensorboard-databricks-on-aws.md]
- If you log TensorBoard-related data to DBFS or Unity Catalog Volumes, you may get an error like `No dashboards are active for the current data set`. To overcome this, call `writer.flush()` and `writer.close()` after using the writer to log data. This ensures all logged data is properly written and available for TensorBoard to render. ^[tensorboard-databricks-on-aws.md]

## Related Concepts

- [MLflow Tracking](/concepts/mlflow-tracking.md) – Alternative experiment tracking on Databricks.
- Databricks Notebooks – Environment where TensorBoard is launched.
- Cluster Configuration – Ephemeral vs. persistent storage for logs.

## Sources

- tensorboard-databricks-on-aws.md

# Citations

1. [tensorboard-databricks-on-aws.md](/references/tensorboard-databricks-on-aws-052f8833.md)
