Skip to main content

Using Kubeflow Tensorboard

This guide explains how to manage and visualize log data generated during machine learning experiments using the TensorBoard component.

Before getting started

TensorBoard is an essential tool for intuitively monitoring and analyzing the training process of machine learning models. By using TensorBoard, you can monitor the progress of machine learning experiments in real time and compare and analyze results from multiple experiments. In addition, you can understand key metrics for optimizing model performance and learn how to manage experiments using TensorBoard.

Scenario overview

In this tutorial, the entire process from installing TensorBoard to visualizing and analyzing actual training log data is introduced step by step.

The main contents of this scenario are as follows.

Supported tools

ToolVersionDescription
Tensorboard2.1.0A visualization tool for machine learning experiments that provides metric tracking and visualization, as well as histogram tracking for weights and tensors.
info

For more detailed information about Tensorboard, see the official Tensorboard documentation.

Prerequisites

This section explains the required resource preparation steps for using TensorBoard.

Create volume for log storage

Create a persistent volume (Persistent Volume) for TensorBoard to store training logs.

  1. Access the Kubeflow dashboard and move to the Volumes tab.

  2. Click the [New Volume] button at the top to create a new volume.

  3. Enter the required information on the New Volume screen and click the [Create] button to create the volume.

    Image. Create volume

Getting started

The concrete practice steps for efficiently managing and visualizing machine learning experiment log data using TensorBoard are as follows.

Step 1. Create Tensorboard instance

  1. Select the Tensorboards tab and click the [New TensorBoard] button.

  2. On the New Tensorboard screen, enter the required information and click the [Create] button to create a Tensorboard instance. Image. Create Tensorboard

    ItemValue
    Storage typePVC
    PVC NameName of the volume created in advance
    Mount PathPath in the selected volume where TensorBoard logs are stored
  3. Click the [CONNECT] button to verify the created Tensorboard instance.

    Image. Check Tensorboard

Step 2. Create notebook instance for practice

This step explains how to create a notebook instance for practice in Kubeflow.

  1. Select the Notebooks tab in the Kubeflow dashboard.

  2. Click the [New Notebook] button at the top to create a notebook instance.

  3. On the New notebook configuration screen, enter the following information.

    • Docker Image: Select kc-kubeflow/jupyter-tensorflow-cuda-full:v1.0.1.py36.
    • Workspace Volume: Click the trash icon to delete the default configured volume. Then select the [Attach existing volume] option and choose the previously created tensorboard volume.
  4. After completing the configuration, click the [LAUNCH] button to create the instance.

Step 3. Train model and check integrated results with Tensorboard

This step explains how to perform model training and check training results through Tensorboard.

  1. Download the example project from the link below and upload it to the created notebook instance.

  2. In the notebook, change the TENSORBOARD_URL variable to the Tensorboard address created in Step 1.

    • Tensorboard address: The URL of the Tensorboard page displayed after clicking [CONNECT]
      Image: Create Tensorboard
  3. Run the notebook code to train the model and check the updated training process in Tensorboard through the IFrame. Image: Create Tensorboard