---
description: How to create a Tensorboard instance in Gradient
---

# Using Tensorboards

{% hint style="info" %}
Gradient TensorBoards require a [Gradient Private Cluster](../gradient-private-cloud/setup/managed-installation)
{% endhint %}

{% hint style="info" %}
View the full CLI/SDK Docs for **Tensorboards** here: [https://paperspace.github.io/gradient-cli/gradient.cli.html#gradient-tensorboards](https://paperspace.github.io/gradient-cli/gradient.cli.html#gradient-tensorboards)
{% endhint %}

Gradient Private Cluster customers are able to create TensorBoards, as well as attach and remove Experiments to them. You can perform these operations via the web UI or the CLI.

From any Experiment details view, you can add any experiment, across all team projects, to any TensorBoard.

You'll see all of your team's TensorBoards listed under any Experiment Details view, though you can filter TensorBoards down only to show the ones that contain Experiments from within the current Project.

## Create a TensorBoard

{% tabs %}
{% tab title="Web UI" %}
To create a TensorBoard, whether your team already has multiple or has none, 1) navigate to **Projects** and click into any Experiment to see its Details page; 2) click **TensorBoards**; and 3) click **Create TensorBoard**.

![Steps to Create a TensorBoard via the Web UI](https://1320806315-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-Lwp8VxIMqg7SmOvTjkQ%2F-LwpG3YKbv4gGfgv1KVd%2Ftensorboards%20create.png?alt=media\&token=8a71b213-77f7-4aa0-8061-059f37ccda11)

Clicking **Create TensorBoard** will launch the following modal, where you can add a Name for your TensorBoard, as well as optional Username and Password for basic authentication. Then click **Create TensorBoard**.

![Create TensorBoard modal](https://1320806315-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-Lwp8VxIMqg7SmOvTjkQ%2F-LwpG3YLQtrN45JlbMHJ%2FScreen%20Shot%202019-12-23%20at%206.53.03%20PM.png?alt=media\&token=974a7216-9c7b-44f0-8b25-7d6a14f02f70)

By default, if you have zero TensorBoards, the current experiment will be automatically added to your first TensorBoard.

You can then see a mapping between the current Experiment (the one whose Details page you're working from) and all TensorBoards, with the **Experiment Status** in relation to each TensorBoard, as well as the **name** and **ID** of each of your team's TensorBoards, and that TensorBoard's status.

![Experiment being added to a new TensorBoard](https://1320806315-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-Lwp8VxIMqg7SmOvTjkQ%2F-LwpG3YJXmyBLJ0NdM-3%2FScreen%20Shot%202019-12-23%20at%206.53.20%20PM.png?alt=media\&token=26f1d199-d039-45d4-8ef6-f0ec549beb26)

Note that although you can technically add an Experiment that has not completed, or that has failed, to a TensorBoard, it will not be complete **Adding** to a given TensorBoard until that Experiment has completed.

![](https://1320806315-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-Lwp8VxIMqg7SmOvTjkQ%2F-LwpG3YGYGFdkRR2qS_v%2FScreen%20Shot%202019-12-23%20at%207.17.07%20PM.png?alt=media\&token=a98dffad-8d5f-4f1c-bc10-4a838fb3cee5)
{% endtab %}

{% tab title="CLI" %}
You can create a TensorBoard with the following command:

```
gradient tensorboards create
```

**Options:**

```
Usage: gradient tensorboards create [OPTIONS]

    Create new tensorboard

Options:
  --experiment TEXT         IDs of experiments  [required]
  --image TEXT              Image
  --username TEXT           Username
  --password TEXT           Password
  --apiKey TEXT             API key to use this time only
  --optionsFile PATH        Path to YAML file with predefined options
  --createOptionsFile PATH  Generate template options file
  --help                    Show this message and exit.
```
{% endtab %}
{% endtabs %}

## Viewing a TensorBoard

If a TensorBoard has had Experiments added to it, simply click Launch to open the TensorBoard in order to view the resultant TensorBoard and experiment visualizations:

![Launch a TensorBoard that's had Experiments added to it](https://1320806315-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-LwpdILBiXS4BnthiKCe%2F-LwpiTyCK3SQlsfuRAtv%2Flaunch%20tensorboard.png?alt=media\&token=4c46c1b4-fc84-4c5a-a54f-833f0121d960)

Here's a TensorBoard showing the Experiment that I added above, which is displaying a model from a simple MNIST sample experiment:

![Experiment visualized on a TensorBoard in Gradient](https://1320806315-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-LwpdILBiXS4BnthiKCe%2F-LwpkFvhfxXedoIsp4_Q%2FScreen%20Shot%202019-12-23%20at%209.27.42%20PM.png?alt=media\&token=35ac04aa-1431-4ca0-ae1d-0e127ce36f2b)

## Adding and Removing Experiments

{% tabs %}
{% tab title="Web UI" %}
You can manually **Add** or **Remove** an experiment from a TensorBoard by clicking the green toggle under Experiment Status. In other words, if you wish to _add_ an Experiment to a TensorBoard (thus including it on that TensorBoard), click the Experiment Status toggle to be active / green / to the right.To _remove_ an Experiment from a TensorBoard, click the toggle to be inactive / gray / to the left.

![Removing an Experiment from a TensorBoard](https://1320806315-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-LwpdILBiXS4BnthiKCe%2F-LwplFA7HSg2L9bSVbgX%2Fremove%20experiment.gif?alt=media\&token=bb1acc26-0d13-4895-9fc1-89c70c3271f7)

As noted above, you can re-add an Experiment to a TensorBoard simply by toggling the Experiment Status back to active / green / to the right.

{% hint style="info" %}
Note that because TensorBoards spin up on dedicated CPU-only machine instances, and Experiments must have completed checkpoints in order to be added to TensorBoards, the Create, Add, and Remove operations can take time.
{% endhint %}

And that's it! Stay tuned for further iteration as we continue to make TensorBoards an even more powerful feature.
{% endtab %}

{% tab title="CLI" %}
### Adding Experiments to a existing tensorboard

```
gradient tensorboards add-experiments
```

**Options:**

```
Usage: gradient tensorboards add-experiments [OPTIONS]

  Update tensorboard experiments

Options:
  --id TEXT                 Tensorboard ID  [required]
  --experiment TEXT         IDs of experiments  [required]
  --apiKey TEXT             API key to use this time only
  --optionsFile PATH        Path to YAML file with predefined options
  --createOptionsFile PATH  Generate template options file
  --help                    Show this message and exit.
```

### Removing Experiments from a tensorboard

```
gradient tensorboards remove-experiments
```

**Options:**

```
Usage: gradient tensorboards remove-experiments [OPTIONS]

  Update tensorboard experiments

Options:
  --id TEXT                 Tensorboard ID  [required]
  --experiment TEXT         IDs of experiments  [required]
  --apiKey TEXT             API key to use this time only
  --optionsFile PATH        Path to YAML file with predefined options
  --createOptionsFile PATH  Generate template options file
  --help                    Show this message and exit.
```
{% endtab %}
{% endtabs %}

## Delete Tensorboard

You can delete a TensorBoard instance via the CLI, as follows.

{% tabs %}
{% tab title="CLI" %}
To delete a TensorBoard, run the following command:

```
gradient tensorboards delete --id <tensorboard-id>
```

**Options:**

```
Usage: gradient tensorboards delete [OPTIONS]

  Delete tensorboard

Options:
  --id <tensorboard ID>     Tensorboard ID  [required]
  --apiKey TEXT             API key to use this time only
  --optionsFile PATH        Path to YAML file with predefined options
  --createOptionsFile PATH  Generate template options file
  --help                    Show this message and exit.
```
{% endtab %}
{% endtabs %}

## Learn More

You can also use TensorBoards via the CLI, as well as by [scripting them within a TensorFlow script](using-tensorboards/getting-started-with-tensorboards).
