MindInsight Documents
MindInsight is a visualized debugging and optimization tool, which helps users achieve better model precision and performance.
MindInsight visualizes the training process, model performance optimization, and accuracy debugging. You can also use the command line provided by MindInsight to easily search for hyperparameters and migrate models.
MindInsight provides the following functions:
Visualized training process (Collect Summary Record, View Dashboard)
Using MindInsight to Visualize the Training Process
Collecting Data for Visualization
Use SummaryCollector to record the training information in the training script and then perform the training.
Starting MindInsight for Visualization
Start the MindInsight service and set the
--summary-base-dir
parameter to specify the directory for storing the summary log file.-
Open a browser, enter the MindInsight address in the address box, and click Training Dashboard to view details.
Using MindInsight to Analyze the Model Performance
-
Call MindSpore Profiler APIs in the training script and then perform training.
Starting MindInsight for Analysis
Start the MindInsight service and set the
--summary-base-dir
parameter to specify the directory for storing the performance data.-
Open a browser, enter the MindInsight address in the address box, and click Profiling to view and analyze the training performance data.
Using MindInsight to Debug the Model Accuracy
Starting MindInsight in Debugger Mode
Configure the
--enable-debugger True
--debugger-port 50051
parameter to start MindInsight in debugger mode.Running the Training Script in Debugger Mode
Set the environment variable
export ENABLE_MS_DEBUGGER
to True to specify the debugger mode for training. Set the debugging service and port to be connected for training:export MS_DEBUGGER_HOST=127.0.0.1
.export MS_DEBUGGER_PORT=50051
.Run the training script.Setting and Analyzing Watchpoints in MindInsight
Open a browser, enter the MindInsight address in the address box, click the Debugger tab page, set the watchpoints after the training is connected, and analyze the data such as the computational graphs, tensors, and watchpoint hits to identify the root cause of the accuracy problem.