Create an experiment
AutoML is a machine learning enhancement service provided by PAI, integrating multiple algorithms and distributed computing resources. Without writing code, create an experiment to implement model hyperparameter tuning and improve machine learning efficiency and performance.
Background information
The working mechanism of AutoML:
An experiment automatically generates hyperparameter combinations based on the algorithm configuration. Each hyperparameter combination corresponds to a Trial. Each Trial may correspond to a DLC job or one or more MaxCompute jobs, depending on the execution configuration of the experiment. The experiment schedules and runs multiple Trials, compares results, and finds an optimal hyperparameter combination. For more information about the working mechanism, see How AutoML works.
Prerequisites
-
Before you use AutoML for the first time, grant the required AutoML permissions.
-
To create a DLC job, complete the following preparations:
-
To create a MaxCompute job, prepare MaxCompute resources and associate them with the workspace.
Procedure
-
Go to the AutoML page.
-
On the experiment list page, click .
-
On the page for creating an experiment, configure the following parameters.
-
Click .
The experiment appears in the experiment list.
Basic information
|
Parameter |
Description |
|
Name |
Configure the experiment name based on the inline prompt. |
|
Description |
A brief description of the experiment to distinguish it from other experiments. |
|
Visibility |
The visibility of the experiment. Valid values: : visible only to you and administrators in the workspace. : visible to all users in the workspace. |
Execution configurations
Job Type is the execution environment for Trials. You can select or .
-
: runs DLC jobs for hyperparameter tuning. For more information about DLC jobs, see Create a training job.
-
: runs SQL commands or PAI commands from Designer algorithm components on MaxCompute compute resources for hyperparameter tuning. For more information about Designer algorithm components and the PAI commands supported by each component, see Overview of Designer components.
DLC
|
Parameter |
Description |
|
Select a public resource group or a purchased dedicated resource group. For more information about how to prepare a resource group, see Create a resource group and purchase general computing resources and Create a resource quota. |
|
|
The framework type. Valid values: Tensorflow, PyTorch. |
|
|
Configure this parameter to the prepared dataset. |
|
|
The storage location of the job code file (code repository information). Configure this parameter to the prepared Code configuration. DLC downloads the code to the specified working directory, so you must have access to the code repository. |
|
|
The runtime image for worker nodes. The following runtime image types are supported:
|
|
|
Select the instance type required to run the job. instance prices vary by specification. For billing details, see Billing for DLC. |
|
|
The number of compute nodes used in the DLC job. If you configure multiple nodes, each node is billed separately rather than sharing the same instance type. When you select nodes, consider the cost of each node and balance cost and performance. |
|
|
When is set to a purchased dedicated resource group, you can configure these parameters based on the purchased resource specifications. |
|
|
You can use advanced settings to improve training flexibility or meet specific training scenarios. When PyTorch is selected as the framework, you can configure advanced settings. |
|
|
The start command for each node. You need to configure hyperparameter variables
In this example, |
|
|
Hyperparameter |
Based on the hyperparameter variables configured in the start command, the hyperparameter list is automatically loaded. You need to configure the constraint type and search space for each hyperparameter:
|
MaxCompute
Trial configuration
|
Parameter |
Description |
|
Metric Type |
The type of metric used to evaluate a Trial. Valid values:
|
|
Method |
During job execution, multiple intermediate metrics are generated. The method determines the final metric. Valid values:
|
|
Metric Weight |
When multiple metrics are considered, configure the metric name and weight. The system uses the weighted sum as the final evaluation metric for comparison.
|
|
Metric Source |
The source of the metric:
|
|
optimization direction |
The optimization direction for evaluating Trial results. Valid values:
|
|
Model storage path |
The path for storing the model. The path must contain |
Search configurations
|
Parameter |
Description |
|
Search Algorithm |
An automated machine learning algorithm that finds better hyperparameter combinations for the next Trial based on the hyperparameter search space and the results and performance metrics of previous Trials. Supported algorithm types:
For more information about the algorithms, see Supported search algorithms. |
|
Maximum Trials |
The maximum number of Trials that the experiment can run. |
|
Maximum Concurrent Trials |
The maximum number of Trials that the experiment can run in parallel. |
|
Enable EarlyStop |
After you enable EarlyStop, if a Trial finds that the result is significantly poor when evaluating a specific hyperparameter combination, the evaluation process of the Trial can be terminated early without completing the full evaluation. |
|
Start step |
This parameter is available only when EarlyStop is enabled. It specifies the minimum number of evaluations that a Trial must complete before early stopping can be triggered. |
What to do next
-
You can Experiment details at any time to monitor the experiment progress. By viewing the execution results of each Trial, you can obtain the optimal hyperparameter combination.
-
You can Manage experiments.
Appendix: Reference description
The following are configuration examples for MaxCompute job hyperparameter tuning:
-
Designer components used: K-means clustering and Clustering model evaluation.
-
The commands are configured as follows. cmd1 and cmd2 correspond to the commands of the two components, arranged in order. For the specific workflow, see MaxCompute k-means clustering.
-
cmd1
pai -name kmeans
-project algo_public
-DinputTableName=pai_kmeans_test_input
-DselectedColNames=f0,f1
-DappendColNames=f0,f1
-DcenterCount=${centerCount}
-Dloop=10
-Daccuracy=0.01
-DdistanceType=${distanceType}
-DinitCenterMethod=random
-Dseed=1
-DmodelName=pai_kmeans_test_output_model_${exp_id}_${trial_id}
-DidxTableName=pai_kmeans_test_output_idx_${exp_id}_${trial_id}
-DclusterCountTableName=pai_kmeans_test_output_couter_${exp_id}_${trial_id}
-DcenterTableName=pai_kmeans_test_output_center_${exp_id}_${trial_id};
-
cmd2
PAI -name cluster_evaluation
-project algo_public
-DinputTableName=pai_cluster_evaluation_test_input
-DselectedColNames=f0,f1
-DmodelName=pai_kmeans_test_output_model_${exp_id}_${trial_id}
-DoutputTableName=pai_ft_cluster_evaluation_out_${exp_id}_${trial_id};