
ModelArts GA UMN 06052022 from R&D R&D provided a new version of the ModelArts User Manual in May 2022. Depends-On: #11 Reviewed-by: Artem Goncharov <Artem.goncharov@gmail.com>
22 KiB
Using Built-in Algorithms to Train Models
If you do not have the algorithm development capability, you can use the built-in algorithms of ModelArts. After simple parameter adjustment, you can create a training job and build a model.
Prerequisites
- Data has been prepared. Specifically, you have created an available dataset in ModelArts, or you have uploaded the dataset used for training to the OBS directory.
- At least one empty folder has been created on OBS for storing the training output.
- The OBS directory you use and ModelArts are in the same region.
Precautions
In the dataset directory specified for a training job, the names of the files (such as the image file, audio file, and label file) containing data used for training contain 0 to 255 characters. If the names of certain files in the dataset directory contain over 255 characters, the training job will ignore these files and use data in the valid files for training. If the names of all files in the dataset directory contain over 255 characters, no data is available for the training job and the training job fails.
Creating a Training Job
- Log in to the ModelArts management console. In the left navigation pane, choose Training Management > Training Jobs. By default, the system switches to the Training Jobs page.
- In the upper left corner of the training job list, click Create to switch to the Create Training Job page.
- Set related parameters.
- Set the basic information, including Name, Version, and Description. The Version information is automatically generated by the system and named in an ascending order of V001, V002, and so on. You cannot manually modify it.
Specify Name and Description according to actual requirements.
- Set job parameters, including the data source, algorithm source, and more. For details, see Table 1.
Table 1 Job parameters Parameter
Sub-Parameter
Description
One-Click Configuration
-
If you have saved job parameter configurations in ModelArts, click One-Click Configuration and select an existing job parameter configuration as prompted to quickly complete parameter setting for the job.
Algorithm Source
Built-in
Select a built-in algorithm in ModelArts. For details, see Introduction to Built-in Algorithms.
Data Source
Dataset
Select an available dataset and its version from the ModelArts Data Management module.
- Dataset: Select an existing dataset from the drop-down list. If no dataset is available in ModelArts, no result will be displayed in the drop-down list.
- Version: Select a version according to the Dataset setting.
Data Source
Data path
Select the training data from your OBS bucket. On the right of the Data path text box, click Select. In the dialog box that is displayed, select an OBS folder for storing data.
The dataset must meet the requirements of different types of built-in algorithms. For details, see Requirements on Datasets.
Running Parameter
-
After you select a built-in algorithm, the running parameters that are set by default are displayed based on the selected algorithm.
You can modify the parameters based on the actual requirements. For details about the running parameters of different algorithms, see Algorithms and Their Running Parameters. You can also use the default values to create a training job. If the training result is unsatisfactory, you can optimize the parameters.
Training Output Path
-
Storage path of the training result
NOTE:To minimize errors, select an empty directory for Training Output Path. Do not select the directory used for storing the dataset for Training Output Path.
Job Log Path
-
Select a path for storing log files generated during job running.
- Select resources for the training job.
Table 2 Resource parameters Parameter
Description
Resource Pool
Select resource pools for the job. For training jobs, Public resource pools and Dedicated resource pools are available.
Type
If Resource Pool is set to Public resource pools, select a resource type. Available resource types are CPU and GPU.
The GPU resource delivers better performance, and the CPU resource is more cost effective. If the selected algorithm has been defined to use the CPU or GPU, the resource type is automatically displayed on the page. Select the resource type as required.
The data disk capacity varies depending on the resource type. For details, see
Specifications
Select a resource flavor based on the resource type.
Compute Nodes
Set the number of compute nodes. If you set Compute Nodes to 1, the standalone computing mode is used. If you set Compute Nodes to a value greater than 1, the distributed computing mode is used. Only the modelarts.bm.gpu.8v100 flavor supports distributed training.
- Select whether to save the parameters of the training job.
Table 3 Job parameters Parameter
Description
Saving Training Parameters
If you select this option, the parameter settings of the current training will be saved to facilitate subsequent job creation.
Select Save Training Parameters and specify Configuration Name and Description. After a training job is created, you can switch to the Job Parameters tab page to view your saved job parameter settings. For details, see Managing Job Parameters.
- Set the basic information, including Name, Version, and Description. The Version information is automatically generated by the system and named in an ascending order of V001, V002, and so on. You cannot manually modify it.
- Confirm that the information is correct and click Submit. Generally, training jobs run for a period of time, which may be several minutes or tens of minutes depending on the amount of your selected data and resources.
You can switch to the training job list to view the basic information about training jobs. In the training job list, Status of the newly created training job is Initializing. If the status changes to Successful, the training job ends and the model generated is stored in the location specified by Training Output Path. If the status of a training job changes to Running failed. Click the name of the training job and view the job logs. Troubleshoot the fault based on the logs.