Notebook User Guide
In traditional software development, reducing costs and enhancing the developer experience are paramount. However, the AI development lifecycle introduces unique challenges, such as complex toolchains and intricate resource management, creating a stark contrast to traditional workflows. To address these hurdles and boost efficiency, ModelArts offers a flexible, open development environment. By leveraging cloud-native resources and unifying the development toolchain, ModelArts delivers a superior on-cloud experience for AI exploration, model training, and education.
Notebook instances are designed for coding and debugging. They do not support long-term stable operation and must not be used for production-grade workloads.
Using a Notebook Instance
Create a Notebook Instance
ModelArts provides on-cloud notebook, which is out of the box, relieving you from concerning environment installation or configuration. For details, see Creating a Notebook Instance (New Page).
Open a Notebook Instance
- JupyterLab: You can access and use notebook instances online via the integrated JupyterLab. For details, see Using a Notebook Instance for AI Development Through JupyterLab. Figure 1 Using JupyterLab to develop and debug code online
- Local IDE: ModelArts allows you to develop models using your preferred local IDE. By enabling SSH connection, you can remotely connect your local environment to a ModelArts notebook development environment to debug and run code. This approach maintains your existing coding habits while leveraging the on-cloud notebook development environment.
A local IDE supports VS Code and SSH. Additionally, VS Code Toolkit is provided for convenient remote access. For details, see Using Notebook Instances Remotely Through VS Code and Using a Notebook Instance Remotely with SSH.
Figure 2 Remotely accessing a notebook instance from a local IDE
Manage Notebooks
When using notebooks, you can quickly locate instances and switch images within the same instance to flexibly adjust AI engines. You can also modify node specifications to scale resources as needed. For storage, you can start with a smaller capacity and expand the EVS volume later based on your requirements. By using dynamic OBS mounting, you can simulate OBS storage as a local file system. Additionally, if a notebook instance becomes abnormal, you can view instance events for fault locating.
| Operation | Description | Helpful Links |
|---|---|---|
| Searching for a notebook instance | All created instances are displayed on the notebook page. To find a specific instance, use quick search with filter criteria. | |
| Accessing an environment | Access a notebook instance in the Running state for coding. | |
| Saving an image | Create a notebook instance using a preset image, install custom software and dependencies on the base image, and save the running environment instance as a container image. | |
| Stopping, starting, or deleting a notebook instance | Stop the notebook instances that are not needed. You can also restart a stopped instance. Delete the notebook instances that are not needed. Deleted notebook instances cannot be recovered. After a notebook instance is deleted, the data stored in the mounted directory will be deleted. | |
| Configuring auto stop | Once enabled, you can set the auto-stop mode and duration. The instance will automatically stop if its usage surpasses the configured limit, though there might be a 2–5 minute delay before stopping. Billing continues until the instance is stopped. | |
| Changing an image | ModelArts allows you to change the image of a notebook instance to adjust its AI engine flexibly. The image of a notebook instance can be changed only when the instance is in the Stopped state. | |
| Changing instance specifications | ModelArts allows you to change the node specifications of a notebook instance, enabling you to flexibly adjust resource specifications. Specifications can be changed only for notebook instances in the Stopped, Running, or Start Failed state. | |
| Node affinity scheduling | Node affinity ensures that pods are scheduled to nodes that meet specific conditions, enabling more fine-grained resource management and optimization. You can enable, modify, or disable node affinity scheduling only for notebook instances that are stopped or failed to be started and whose resource pool type is dedicated resource pool. | |
| Remote SSH | ModelArts allows you to modify the SSH configuration for notebook instances. The configuration can be modified only when the notebook instance is in the Stopped state. Remote SSH cannot be disabled once it is enabled. | |
| Editing tags | Tags can be used to identify, classify, search for, and manage notebook instances. | |
| Dynamically expanding EVS disk capacity | During notebook development, select a small EVS disk capacity, for example, 5 GB, when creating a notebook instance because the storage requirements are low at the initial stage. After the development, a large volume of data must be trained. Then, expand the disk capacity to cost-effectively meet your service needs. | |
| Dynamically mounting an OBS parallel file system | In ModelArts running notebook containers, the dynamic mounting feature is used to simulate OBS as a local file system. | |
| Viewing notebook instance events | Instance statuses and key operations such as creating, starting, and stopping an instance, and changing the instance flavor are recorded in the backend. You can view the events on the notebook instance details page to monitor the instance statuses. | |
| Reporting notebook cache disk alarms | When creating a notebook instance, you can select CPU, GPU, or Ascend resources based on the service data volume. If you select GPU or Ascend resources, ModelArts mounts hard disks to the cache directory. You can use this directory to store temporary files. Capacity alarms are not generated for the cache directory of the notebook instance by default. Exceeding the capacity limit will restart the notebook instance. After the restart, multiple configurations are reset, discarding your data and losing the environment. This will affect your experience. You are advised to enable the monitoring and alarms for the cache directory usage and report the data to AOM. | |
| Upgrading JupyterLab | To enhance the usability of notebook, JupyterLab has been upgraded to version 4.4.10 (stable version in 2025). This major leap from the 2021 legacy version (3.2.3) significantly optimizes performance and startup speed. Key improvements include a rebuilt editor, enhanced debugging and collaboration tools, a more stable ecosystem, and comprehensive refinements to the interactive experience and memory efficiency. |
Upload a File to a Notebook Instance
ModelArts CLI
The ModelArts CLI is integrated into ModelArts Notebook to connect with ModelArts services and execute management commands on ModelArts resources. ma-cli allows you to interact with cloud services from both ModelArts notebook instances and offline VMs. By using ma-cli commands, you can enable command auto-completion and authentication, build images, submit ModelArts training jobs, submit DLI Spark jobs, and perform OBS data replication. For details, see ModelArts CLI Command Reference.
MoXing
ModelArts Notebook has a built-in MoXing Framework module. ModelArts mox.file provides a set of APIs for accessing OBS more conveniently, allowing you to operate OBS files by simulating a series of APIs for operating the local file system. For details, see Using MoXing Commands in a Notebook Instance.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot