createAutoMLJob method
- required String autoMLJobName,
- required List<
AutoMLChannel> inputDataConfig, - required AutoMLOutputDataConfig outputDataConfig,
- required String roleArn,
- AutoMLJobConfig? autoMLJobConfig,
- AutoMLJobObjective? autoMLJobObjective,
- bool? generateCandidateDefinitionsOnly,
- ModelDeployConfig? modelDeployConfig,
- ProblemType? problemType,
- List<
Tag> ? tags,
Creates an Autopilot job also referred to as Autopilot experiment or AutoML job.
An AutoML job in SageMaker AI is a fully automated process that allows you to build machine learning models with minimal effort and machine learning expertise. When initiating an AutoML job, you provide your data and optionally specify parameters tailored to your use case. SageMaker AI then automates the entire model development lifecycle, including data preprocessing, model training, tuning, and evaluation. AutoML jobs are designed to simplify and accelerate the model building process by automating various tasks and exploring different combinations of machine learning algorithms, data preprocessing techniques, and hyperparameter values. The output of an AutoML job comprises one or more trained models ready for deployment and inference. Additionally, SageMaker AI AutoML jobs generate a candidate model leaderboard, allowing you to select the best-performing model for deployment.
For more information about AutoML jobs, see https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development.html in the SageMaker AI developer guide.
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.
You can find the best-performing model after you run an AutoML job by
calling DescribeAutoMLJobV2
(recommended) or DescribeAutoMLJob.
May throw ResourceInUse.
May throw ResourceLimitExceeded.
Parameter autoMLJobName :
Identifies an Autopilot job. The name must be unique to your account and
is case insensitive.
Parameter inputDataConfig :
An array of channel objects that describes the input data and its
location. Each channel is a named input source. Similar to
InputDataConfig supported by HyperParameterTrainingJobDefinition.
Format(s) supported: CSV, Parquet. A minimum of 500 rows is required for
the training dataset. There is not a minimum number of rows required for
the validation dataset.
Parameter outputDataConfig :
Provides information about encryption and the Amazon S3 output path needed
to store artifacts from an AutoML job. Format(s) supported: CSV.
Parameter roleArn :
The ARN of the role that is used to access the data.
Parameter autoMLJobConfig :
A collection of settings used to configure an AutoML job.
Parameter 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.
See AutoMLJobObjective
for the default values.
Parameter generateCandidateDefinitionsOnly :
Generates possible candidates without training the models. A candidate is
a combination of data preprocessors, algorithms, and algorithm parameter
settings.
Parameter modelDeployConfig :
Specifies how to generate the endpoint name for an automatic one-click
Autopilot model deployment.
Parameter problemType :
Defines the type of supervised learning problem available for the
candidates. For more information, see
SageMaker Autopilot problem types.
Parameter tags :
An array of key-value pairs. You can use tags to categorize your Amazon
Web Services resources in different ways, for example, by purpose, owner,
or environment. For more information, see Tagging
Amazon Web ServicesResources. Tag keys must be unique per resource.
Implementation
Future<CreateAutoMLJobResponse> createAutoMLJob({
required String autoMLJobName,
required List<AutoMLChannel> inputDataConfig,
required AutoMLOutputDataConfig outputDataConfig,
required String roleArn,
AutoMLJobConfig? autoMLJobConfig,
AutoMLJobObjective? autoMLJobObjective,
bool? generateCandidateDefinitionsOnly,
ModelDeployConfig? modelDeployConfig,
ProblemType? problemType,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.CreateAutoMLJob'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AutoMLJobName': autoMLJobName,
'InputDataConfig': inputDataConfig,
'OutputDataConfig': outputDataConfig,
'RoleArn': roleArn,
if (autoMLJobConfig != null) 'AutoMLJobConfig': autoMLJobConfig,
if (autoMLJobObjective != null)
'AutoMLJobObjective': autoMLJobObjective,
if (generateCandidateDefinitionsOnly != null)
'GenerateCandidateDefinitionsOnly': generateCandidateDefinitionsOnly,
if (modelDeployConfig != null) 'ModelDeployConfig': modelDeployConfig,
if (problemType != null) 'ProblemType': problemType.value,
if (tags != null) 'Tags': tags,
},
);
return CreateAutoMLJobResponse.fromJson(jsonResponse.body);
}