Updated on 2026-05-29 GMT+08:00

Using JupyterLab to Develop and Debug Code Online

JupyterLab is an interactive development environment, enabling you to compile notebooks, operate terminals, edit Markdown text, enable interaction, and view CSV files and images. JupyterLab is the future mainstream development environment for developers.

ModelArts allows you to access notebook instances online using JupyterLab and develop AI models based on the PyTorch, TensorFlow, or MindSpore engines. Figure 1 shows the operation process.

Figure 1 Using JupyterLab to develop and debug code online

Constraints

  • There is no strict limit on the size of files loaded in JupyterLab. However, the actual processing capability is affected by system resources and configurations. If a large text file, for example, larger than 100 MB, is opened in the browser on the left of JupyterLab, the memory may be insufficient, the GUI may respond slowly, or the kernel may be interrupted. To ensure smooth and stable usage, you are advised to open a single file no larger than 100 MB.
  • The system can process at most 40 JupyterLab requests (average) per second for a long time or at most 10 JupyterLab requests in a short time. Generally, if more than 10 operations are performed on JupyterLab in the same resource pool within a short period of time, flow control will be triggered.

Procedure

  1. Create a notebook instance.

    On the ModelArts management console, create a notebook instance with a proper AI engine. For details, see Creating a Notebook Instance (New Page).

  2. Locate the created notebook instance, which is in the Running state, click Access Environment in the Operation column. In the displayed dialog box, click Access next to JupyterLab Access.
  3. The Launcher page is automatically displayed. Perform required operations. For details, see JupyterLab Documentation.
    Figure 2 JupyterLab homepage

    The notebook and console kernels and versions displayed on the Launcher page vary depending on the AI engine based on which a notebook instance is created. Figure 2 shows an example only. Obtain the notebook and console kernels and versions on the management console.

  4. Upload training data and code files to JupyterLab. For details, see Uploading Files from a Local Path to JupyterLab.
    Figure 3 Button for uploading a file
  5. In the navigation pane on the left, double-click the uploaded code file, compile the file in JupyterLab, and debug it. For details about how to use JupyterLab, see Common Functions of JupyterLab.

    If your code file is in .py format, open a new .ipynb file and run the %load main.py command to load the content of the .py file to the .ipynb file for encoding and debugging.

  6. In JupyterLab, call the ModelArts SDK to create a training job for in-cloud training.

    For details, see Creating a Training Job.