[ aws . sagemaker ]

create-auto-ml-job

Description

Creates an Autopilot job.

Find the best-performing model after you run an Autopilot job by calling .

For information about how to use Autopilot, see Automate Model Development with Amazon SageMaker Autopilot .

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  create-auto-ml-job
--auto-ml-job-name <value>
--input-data-config <value>
--output-data-config <value>
[--problem-type <value>]
[--auto-ml-job-objective <value>]
[--auto-ml-job-config <value>]
--role-arn <value>
[--generate-candidate-definitions-only | --no-generate-candidate-definitions-only]
[--tags <value>]
[--model-deploy-config <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--auto-ml-job-name (string)

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

--input-data-config (list)

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 . Format(s) supported: CSV. Minimum of 500 rows.

(structure)

A channel is a named input source that training algorithms can consume. For more information, see .

DataSource -> (structure)

The data source for an AutoML channel.

S3DataSource -> (structure)

The Amazon S3 location of the input data.

Note

The input data must be in CSV format and contain at least 500 rows.

S3DataType -> (string)

The data type.

S3Uri -> (string)

The URL to the Amazon S3 data source.

CompressionType -> (string)

You can use Gzip or None . The default value is None .

TargetAttributeName -> (string)

The name of the target variable in supervised learning, usually represented by ‘y’.

Shorthand Syntax:

DataSource={S3DataSource={S3DataType=string,S3Uri=string}},CompressionType=string,TargetAttributeName=string ...

JSON Syntax:

[
  {
    "DataSource": {
      "S3DataSource": {
        "S3DataType": "ManifestFile"|"S3Prefix",
        "S3Uri": "string"
      }
    },
    "CompressionType": "None"|"Gzip",
    "TargetAttributeName": "string"
  }
  ...
]

--output-data-config (structure)

Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML job. Format(s) supported: CSV.

KmsKeyId -> (string)

The Amazon Web Services KMS encryption key ID.

S3OutputPath -> (string)

The Amazon S3 output path. Must be 128 characters or less.

Shorthand Syntax:

KmsKeyId=string,S3OutputPath=string

JSON Syntax:

{
  "KmsKeyId": "string",
  "S3OutputPath": "string"
}

--problem-type (string)

Defines the type of supervised learning available for the candidates. Options include: BinaryClassification , MulticlassClassification , and Regression . For more information, see Amazon SageMaker Autopilot problem types and algorithm support .

Possible values:

  • BinaryClassification

  • MulticlassClassification

  • Regression

--auto-ml-job-objective (structure)

Defines the objective metric used to measure the predictive quality of an AutoML job. You provide an AutoMLJobObjective$MetricName and Autopilot infers whether to minimize or maximize it.

MetricName -> (string)

The name of the objective metric used to measure the predictive quality of a machine learning system. This metric is optimized during training to provide the best estimate for model parameter values from data.

Here are the options:

  • MSE : The mean squared error (MSE) is the average of the squared differences between the predicted and actual values. It is used for regression. MSE values are always positive: the better a model is at predicting the actual values, the smaller the MSE value is. When the data contains outliers, they tend to dominate the MSE, which might cause subpar prediction performance.

  • Accuracy : The ratio of the number of correctly classified items to the total number of (correctly and incorrectly) classified items. It is used for binary and multiclass classification. It measures how close the predicted class values are to the actual values. Accuracy values vary between zero and one: one indicates perfect accuracy and zero indicates perfect inaccuracy.

  • F1 : The F1 score is the harmonic mean of the precision and recall. It is used for binary classification into classes traditionally referred to as positive and negative. Predictions are said to be true when they match their actual (correct) class and false when they do not. Precision is the ratio of the true positive predictions to all positive predictions (including the false positives) in a data set and measures the quality of the prediction when it predicts the positive class. Recall (or sensitivity) is the ratio of the true positive predictions to all actual positive instances and measures how completely a model predicts the actual class members in a data set. The standard F1 score weighs precision and recall equally. But which metric is paramount typically depends on specific aspects of a problem. F1 scores vary between zero and one: one indicates the best possible performance and zero the worst.

  • AUC : The area under the curve (AUC) metric is used to compare and evaluate binary classification by algorithms such as logistic regression that return probabilities. A threshold is needed to map the probabilities into classifications. The relevant curve is the receiver operating characteristic curve that plots the true positive rate (TPR) of predictions (or recall) against the false positive rate (FPR) as a function of the threshold value, above which a prediction is considered positive. Increasing the threshold results in fewer false positives but more false negatives. AUC is the area under this receiver operating characteristic curve and so provides an aggregated measure of the model performance across all possible classification thresholds. The AUC score can also be interpreted as the probability that a randomly selected positive data point is more likely to be predicted positive than a randomly selected negative example. AUC scores vary between zero and one: a score of one indicates perfect accuracy and a score of one half indicates that the prediction is not better than a random classifier. Values under one half predict less accurately than a random predictor. But such consistently bad predictors can simply be inverted to obtain better than random predictors.

  • F1macro : The F1macro score applies F1 scoring to multiclass classification. In this context, you have multiple classes to predict. You just calculate the precision and recall for each class as you did for the positive class in binary classification. Then, use these values to calculate the F1 score for each class and average them to obtain the F1macro score. F1macro scores vary between zero and one: one indicates the best possible performance and zero the worst.

If you do not specify a metric explicitly, the default behavior is to automatically use:

  • MSE : for regression.

  • F1 : for binary classification

  • Accuracy : for multiclass classification.

Shorthand Syntax:

MetricName=string

JSON Syntax:

{
  "MetricName": "Accuracy"|"MSE"|"F1"|"F1macro"|"AUC"
}

--auto-ml-job-config (structure)

Contains CompletionCriteria and SecurityConfig settings for the AutoML job.

CompletionCriteria -> (structure)

How long an AutoML job is allowed to run, or how many candidates a job is allowed to generate.

MaxCandidates -> (integer)

The maximum number of times a training job is allowed to run.

MaxRuntimePerTrainingJobInSeconds -> (integer)

The maximum time, in seconds, that each training job is allowed to run as part of a hyperparameter tuning job. For more information, see the used by the action.

MaxAutoMLJobRuntimeInSeconds -> (integer)

The maximum runtime, in seconds, an AutoML job has to complete.

If an AutoML job exceeds the maximum runtime, the job is stopped automatically and its processing is ended gracefully. The AutoML job identifies the best model whose training was completed and marks it as the best-performing model. Any unfinished steps of the job, such as automatic one-click Autopilot model deployment, will not be completed.

SecurityConfig -> (structure)

The security configuration for traffic encryption or Amazon VPC settings.

VolumeKmsKeyId -> (string)

The key used to encrypt stored data.

EnableInterContainerTrafficEncryption -> (boolean)

Whether to use traffic encryption between the container layers.

VpcConfig -> (structure)

The VPC configuration.

SecurityGroupIds -> (list)

The VPC security group IDs, in the form sg-xxxxxxxx. Specify the security groups for the VPC that is specified in the Subnets field.

(string)

Subnets -> (list)

The ID of the subnets in the VPC to which you want to connect your training job or model. For information about the availability of specific instance types, see Supported Instance Types and Availability Zones .

(string)

JSON Syntax:

{
  "CompletionCriteria": {
    "MaxCandidates": integer,
    "MaxRuntimePerTrainingJobInSeconds": integer,
    "MaxAutoMLJobRuntimeInSeconds": integer
  },
  "SecurityConfig": {
    "VolumeKmsKeyId": "string",
    "EnableInterContainerTrafficEncryption": true|false,
    "VpcConfig": {
      "SecurityGroupIds": ["string", ...],
      "Subnets": ["string", ...]
    }
  }
}

--role-arn (string)

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

--generate-candidate-definitions-only | --no-generate-candidate-definitions-only (boolean)

Generates possible candidates without training the models. A candidate is a combination of data preprocessors, algorithms, and algorithm parameter settings.

--tags (list)

Each tag consists of a key and an optional value. Tag keys must be unique per resource.

(structure)

A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources.

You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see AddTags .

For more information on adding metadata to your Amazon Web Services resources with tagging, see Tagging Amazon Web Services resources . For advice on best practices for managing Amazon Web Services resources with tagging, see Tagging Best Practices: Implement an Effective Amazon Web Services Resource Tagging Strategy .

Key -> (string)

The tag key. Tag keys must be unique per resource.

Value -> (string)

The tag value.

Shorthand Syntax:

Key=string,Value=string ...

JSON Syntax:

[
  {
    "Key": "string",
    "Value": "string"
  }
  ...
]

--model-deploy-config (structure)

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

AutoGenerateEndpointName -> (boolean)

Set to True to automatically generate an endpoint name for a one-click Autopilot model deployment; set to False otherwise. The default value is False .

Note

If you set AutoGenerateEndpointName to True , do not specify the EndpointName ; otherwise a 400 error is thrown.

EndpointName -> (string)

Specifies the endpoint name to use for a one-click Autopilot model deployment if the endpoint name is not generated automatically.

Note

Specify the EndpointName if and only if you set AutoGenerateEndpointName to False ; otherwise a 400 error is thrown.

Shorthand Syntax:

AutoGenerateEndpointName=boolean,EndpointName=string

JSON Syntax:

{
  "AutoGenerateEndpointName": true|false,
  "EndpointName": "string"
}

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See ‘aws help’ for descriptions of global parameters.

Output

AutoMLJobArn -> (string)

The unique ARN assigned to the AutoML job when it is created.