Updated on 2024-10-29 GMT+08:00

Using MindInsight Visualization Jobs in JupyterLab

ModelArts notebook supports MindInsight visualization jobs. In a development environment, use a small dataset to train and debug an algorithm. This is used to check algorithm convergence and detect training issues, facilitating debugging.

MindInsight visualizes information such as scalars, images, computational graphs, and model hyperparameters during training. It also provides functions such as training dashboard, model lineage, data lineage, and performance debugging, helping you train and debug models efficiently. MindInsight supports MindSpore training jobs. For more information about MindInsight, see MindSpore official website.

MindSpore allows you to save data into the summary log file and obtain the data on the MindInsight GUI.

Prerequisites

When using MindSpore to edit a training script, add the code for collecting the summary record to the script to ensure that the summary file is generated in the training result.

For details, see Collecting Summary Record.

Note

  • To run a MindInsight training job in a development environment, start MindInsight and then the training process.
  • Only one-card single-node training is supported.
  • A running visualization job is not billed separately. When the target notebook instance is stopped, the billing stops.
  • If the summary file is stored in OBS, OBS storage will be billed separately. After a job is complete, stop the notebook instance and clear OBS data to stop billing.

Step 1 Create a Development Environment and Access It Online

Log in to ModelArts management console. In the navigation pane on the left, choose Development Workspace > Notebook, and create a development environment instance using the MindSpore engine. After the instance is created, click Open in the Operation column of the instance to access it online.

Step 2 Upload the Summary Data

Summary data is required for MindInsight visualization in a development environment.

Upload the summary data to the /home/ma-user/work/ directory in a development environment or store it in an OBS parallel file system.

  • For details about how to upload the summary data to the notebook path /home/ma-user/work/, see Uploading Files from a Local Path to JupyterLab.
  • To store the summary data in an OBS parallel file system that is mounted to a notebook instance, upload the summary file generated during model training to the OBS parallel file system and ensure that the OBS parallel file system and ModelArts are in the same region. When MindInsight is started in a notebook instance, the notebook instance automatically reads the summary data from the mounted OBS parallel file system.

Step 3 Start MindInsight

Open MindInsight in JupyterLab.

Click to go to the MindInsight page.

Data is read from /home/ma-user/work/ by default.

If there are two projects or more, select the target project to view its logs.

Figure 1 MindInsight page (2)

Step 4 View Visualized Data on the Training Dashboard

The training dashboard is important for MindInsight visualization. It allows visualization for scalars, parameter distribution, computational graphs, dataset graphs, images, and tensors.

For more information, see Viewing Training Dashboard on the MindSpore official website.

Disabling MindInsight

Click . The MindInsight instance management page is displayed, which shows all started MindInsight instances. Click SHUT DOWN next to the target instance to stop it.
Figure 2 Stopping an instance