Preparations
Prerequisites
- Account not in arrears (paid resources required for training jobs). For details, see Model Training Billing Items.
- Access authorization configured. If you have not yet configured access, follow the instructions in Configuring Agency Authorization for ModelArts with One Click.
Preparing Training Resources
Before starting a model training task, you need to prepare compute resources. ModelArts provides the following types of training resources:
- Public compute resources: Referred to as public resource pools when creating training jobs. Public resource pools are the default compute resources when you create a training task and require no additional configuration or request. They are ready to use as long as your account is authorized and has no overdue balance.
- Dedicated compute resources: Referred to as dedicated resource pools when creating training jobs. You need to purchase and configure them in the current user space in advance. Dedicated resource pools are a collection of resources specifically allocated and reserved for particular users, workloads, or projects. These resources are physically or logically isolated from other resources to ensure specific requirements are met. For details, see About ModelArts Dedicated Resource Pools.
During the model training process, training jobs generate a large amount of intermediate data, such as checkpoint data. To ensure data reliability and data exchange speed, you are advised to purchase Object Storage Service (OBS) or Scalable File Service Turbo (SFS Turbo) resources. For details, see What Is SFS Turbo? and What Is OBS?.
Preparing Training Data
ModelArts provides preset data and custom data, allowing you to select different datasets based on your actual scenario. The functions of both dataset types are as below:
- Preset data: ModelArts provides commonly used open-source datasets. If you want to complete a training task but do not have a suitable dataset, or if you want to use open-source datasets for feature verification, you can use preset datasets. For details, see Preset Data.
- Custom data: When preset data cannot meet your requirements, you can upload your own data to ModelArts for hosting. For upload methods, see Creating a Data Connection. If your data quality is not high, you can also use the data refinement features provided by ModelArts to clean and label your data, generating a dataset that meets your requirements.
All generated datasets will be hosted as data assets on ModelArts. For details, see Data Assets.
Preparing a Training Image
ModelArts provides both preset and custom images. These images contain the software required for creating training tasks. You can select images based on your needs.
- Preset images: ModelArts provides images that contain mainstream training frameworks such as PyTorch, TensorFlow, MindSpeed, and MindSpore. You can directly select a preset image to quickly complete a training task. For more information about the preset images provided by ModelArts, see ModelArts Preset Images.
- Custom images: If the preset images provided by ModelArts cannot meet your training requirements, you can create an incremental image based on a preset image or create a new image from scratch. For details about how to create an image for model training, see Creating a Custom Training Image.
Preparing Training Code
Training code serves as the main execution entity of the entire training job, acting as a bridge between data and the model. While ModelArts handles compute resource scheduling, data and code pulling, and distributed network management, the core logic that actually determines "what the model learns" is driven entirely by the training code written by the developer.
The training code must complete an end-to-end pipeline, including data loading, model definition, forward and backward propagation, parameter updating, and metric logging. It must also correctly respond to startup parameters and environment variables passed in by the platform to be recognized, scheduled, and integrated into automated pipelines by the ModelArts training job mechanism. In other words, the platform provides the "track and power," while the training code is the "athlete that runs." The quality of your code directly determines training speed, resource utilization, and ultimate model performance.
ModelArts provides sample code for various scenarios, including preset and custom frameworks.
What is your overall rating for this page?
Thank 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