Prerequisites

Before using the X2MindSpore tool, make the following preparations:

Environment Setup

  1. Prepare a training server powered by Atlas training productss and install the corresponding driver and firmware.
  2. Install the Ascend-CANN-Toolkit. For details, see "Installing the Development Environment" in the CANN Software Installation Guide.
  3. Install MindStudio. For details, see "Installing MindStudio (Linux)" in the MindStudio Installation Guide.
  4. Install MindSpore. For details, see the MindSpore Installation Guide.
  5. Before using X2MindSpore for script migration, install the following dependencies:
    pip3 install pandas         # The pandas version must be 1.2.4 or later.
    pip3 install libcst
    pip3 install sklearn

Environment Variable Configuration

  1. Run the vi ~/.bashrc command in any directory as the running user to open the .bashrc file, and append the following content to the file (the default installation path of a non-root user is used as an example):
    # Ascend-CANN-Toolkit environment variable. Change it to the actual path.
    source ~/Ascend/ascend-toolkit/set_env.sh
  2. Refer to Configuring Environment Variables to configure MindSpore environment variables.
  3. Run the :wq! command to save the file and exit.
  4. Run the source ~/.bashrc command for the modification to take effect immediately.

Data Preparation

Upload them to the personal directory on the training server and decompress them.