CreateAutoMLJobV2 - Amazon SageMaker
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

CreateAutoMLJobV2

Creates an Autopilot job also referred to as Autopilot experiment or AutoML job V2.

Note

CreateAutoMLJobV2 and DescribeAutoMLJobV2 are new versions of CreateAutoMLJob and DescribeAutoMLJob which offer backward compatibility.

CreateAutoMLJobV2 can manage tabular problem types identical to those of its previous version CreateAutoMLJob, as well as time-series forecasting, non-tabular problem types such as image or text classification, and text generation (LLMs fine-tuning).

Find guidelines about how to migrate a CreateAutoMLJob to CreateAutoMLJobV2 in Migrate a CreateAutoMLJob to CreateAutoMLJobV2.

For the list of available problem types supported by CreateAutoMLJobV2, see AutoMLProblemTypeConfig.

You can find the best-performing model after you run an AutoML job V2 by calling DescribeAutoMLJobV2.

Request Syntax

{ "AutoMLJobInputDataConfig": [ { "ChannelType": "string", "CompressionType": "string", "ContentType": "string", "DataSource": { "S3DataSource": { "S3DataType": "string", "S3Uri": "string" } } } ], "AutoMLJobName": "string", "AutoMLJobObjective": { "MetricName": "string" }, "AutoMLProblemTypeConfig": { ... }, "DataSplitConfig": { "ValidationFraction": number }, "ModelDeployConfig": { "AutoGenerateEndpointName": boolean, "EndpointName": "string" }, "OutputDataConfig": { "KmsKeyId": "string", "S3OutputPath": "string" }, "RoleArn": "string", "SecurityConfig": { "EnableInterContainerTrafficEncryption": boolean, "VolumeKmsKeyId": "string", "VpcConfig": { "SecurityGroupIds": [ "string" ], "Subnets": [ "string" ] } }, "Tags": [ { "Key": "string", "Value": "string" } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

AutoMLJobInputDataConfig

An array of channel objects describing the input data and their location. Each channel is a named input source. Similar to the InputDataConfig attribute in the CreateAutoMLJob input parameters. The supported formats depend on the problem type:

  • For tabular problem types: S3Prefix, ManifestFile.

  • For image classification: S3Prefix, ManifestFile, AugmentedManifestFile.

  • For text classification: S3Prefix.

  • For time-series forecasting: S3Prefix.

  • For text generation (LLMs fine-tuning): S3Prefix.

Type: Array of AutoMLJobChannel objects

Array Members: Minimum number of 1 item. Maximum number of 2 items.

Required: Yes

AutoMLJobName

Identifies an Autopilot job. The name must be unique to your account and is case insensitive.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 32.

Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,31}

Required: Yes

AutoMLJobObjective

Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default objective metric depends on the problem type. For the list of default values per problem type, see AutoMLJobObjective.

Note
  • For tabular problem types: You must either provide both the AutoMLJobObjective and indicate the type of supervised learning problem in AutoMLProblemTypeConfig (TabularJobConfig.ProblemType), or none at all.

  • For text generation problem types (LLMs fine-tuning): Fine-tuning language models in Autopilot does not require setting the AutoMLJobObjective field. Autopilot fine-tunes LLMs without requiring multiple candidates to be trained and evaluated. Instead, using your dataset, Autopilot directly fine-tunes your target model to enhance a default objective metric, the cross-entropy loss. After fine-tuning a language model, you can evaluate the quality of its generated text using different metrics. For a list of the available metrics, see Metrics for fine-tuning LLMs in Autopilot.

Type: AutoMLJobObjective object

Required: No

AutoMLProblemTypeConfig

Defines the configuration settings of one of the supported problem types.

Type: AutoMLProblemTypeConfig object

Note: This object is a Union. Only one member of this object can be specified or returned.

Required: Yes

DataSplitConfig

This structure specifies how to split the data into train and validation datasets.

The validation and training datasets must contain the same headers. For jobs created by calling CreateAutoMLJob, the validation dataset must be less than 2 GB in size.

Note

This attribute must not be set for the time-series forecasting problem type, as Autopilot automatically splits the input dataset into training and validation sets.

Type: AutoMLDataSplitConfig object

Required: No

ModelDeployConfig

Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment.

Type: ModelDeployConfig object

Required: No

OutputDataConfig

Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML job.

Type: AutoMLOutputDataConfig object

Required: Yes

RoleArn

The ARN of the role that is used to access the data.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: ^arn:aws[a-z\-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$

Required: Yes

SecurityConfig

The security configuration for traffic encryption or Amazon VPC settings.

Type: AutoMLSecurityConfig object

Required: No

Tags

An array of key-value pairs. You can use tags to categorize your Amazon resources in different ways, such as by purpose, owner, or environment. For more information, see Tagging AmazonResources. Tag keys must be unique per resource.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 50 items.

Required: No

Response Syntax

{ "AutoMLJobArn": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

AutoMLJobArn

The unique ARN assigned to the AutoMLJob when it is created.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]*:[0-9]{12}:automl-job/.*

Errors

For information about the errors that are common to all actions, see Common Errors.

ResourceInUse

Resource being accessed is in use.

HTTP Status Code: 400

ResourceLimitExceeded

You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: