SageMaker

Table of Contents

Client

class SageMaker.Client

A low-level client representing Amazon SageMaker Service

Provides APIs for creating and managing Amazon SageMaker resources.

Other Resources:

import boto3

client = boto3.client('sagemaker')

These are the available methods:

add_association(**kwargs)

Creates an association between the source and the destination. A source can be associated with multiple destinations, and a destination can be associated with multiple sources. An association is a lineage tracking entity. For more information, see Amazon SageMaker ML Lineage Tracking .

See also: AWS API Documentation

Request Syntax

response = client.add_association(
    SourceArn='string',
    DestinationArn='string',
    AssociationType='ContributedTo'|'AssociatedWith'|'DerivedFrom'|'Produced'
)
Parameters
  • SourceArn (string) --

    [REQUIRED]

    The ARN of the source.

  • DestinationArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the destination.

  • AssociationType (string) --

    The type of association. The following are suggested uses for each type. Amazon SageMaker places no restrictions on their use.

    • ContributedTo - The source contributed to the destination or had a part in enabling the destination. For example, the training data contributed to the training job.
    • AssociatedWith - The source is connected to the destination. For example, an approval workflow is associated with a model deployment.
    • DerivedFrom - The destination is a modification of the source. For example, a digest output of a channel input for a processing job is derived from the original inputs.
    • Produced - The source generated the destination. For example, a training job produced a model artifact.
Return type

dict

Returns

Response Syntax

{
    'SourceArn': 'string',
    'DestinationArn': 'string'
}

Response Structure

  • (dict) --

    • SourceArn (string) --

      The ARN of the source.

    • DestinationArn (string) --

      The Amazon Resource Name (ARN) of the destination.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
  • SageMaker.Client.exceptions.ResourceLimitExceeded
add_tags(**kwargs)

Adds or overwrites one or more tags for the specified Amazon SageMaker resource. You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints.

Each tag consists of a key and an optional value. Tag keys must be unique per resource. For more information about tags, see For more information, see AWS Tagging Strategies .

Note

Tags that you add to a hyperparameter tuning job by calling this API are also added to any training jobs that the hyperparameter tuning job launches after you call this API, but not to training jobs that the hyperparameter tuning job launched before you called this API. To make sure that the tags associated with a hyperparameter tuning job are also added to all training jobs that the hyperparameter tuning job launches, add the tags when you first create the tuning job by specifying them in the Tags parameter of CreateHyperParameterTuningJob

See also: AWS API Documentation

Request Syntax

response = client.add_tags(
    ResourceArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource that you want to tag.

  • Tags (list) --

    [REQUIRED]

    An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging AWS Resources .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Tags (list) --

      A list of tags associated with the Amazon SageMaker resource.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The tag key.

        • Value (string) --

          The tag value.

associate_trial_component(**kwargs)

Associates a trial component with a trial. A trial component can be associated with multiple trials. To disassociate a trial component from a trial, call the DisassociateTrialComponent API.

See also: AWS API Documentation

Request Syntax

response = client.associate_trial_component(
    TrialComponentName='string',
    TrialName='string'
)
Parameters
  • TrialComponentName (string) --

    [REQUIRED]

    The name of the component to associated with the trial.

  • TrialName (string) --

    [REQUIRED]

    The name of the trial to associate with.

Return type

dict

Returns

Response Syntax

{
    'TrialComponentArn': 'string',
    'TrialArn': 'string'
}

Response Structure

  • (dict) --

    • TrialComponentArn (string) --

      The ARN of the trial component.

    • TrialArn (string) --

      The Amazon Resource Name (ARN) of the trial.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
  • SageMaker.Client.exceptions.ResourceLimitExceeded
can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
create_action(**kwargs)

Creates an action . An action is a lineage tracking entity that represents an action or activity. For example, a model deployment or an HPO job. Generally, an action involves at least one input or output artifact. For more information, see Amazon SageMaker ML Lineage Tracking .

See also: AWS API Documentation

Request Syntax

response = client.create_action(
    ActionName='string',
    Source={
        'SourceUri': 'string',
        'SourceType': 'string',
        'SourceId': 'string'
    },
    ActionType='string',
    Description='string',
    Status='Unknown'|'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped',
    Properties={
        'string': 'string'
    },
    MetadataProperties={
        'CommitId': 'string',
        'Repository': 'string',
        'GeneratedBy': 'string',
        'ProjectId': 'string'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ActionName (string) --

    [REQUIRED]

    The name of the action. Must be unique to your account in an AWS Region.

  • Source (dict) --

    [REQUIRED]

    The source type, ID, and URI.

    • SourceUri (string) -- [REQUIRED]

      The URI of the source.

    • SourceType (string) --

      The type of the source.

    • SourceId (string) --

      The ID of the source.

  • ActionType (string) --

    [REQUIRED]

    The action type.

  • Description (string) -- The description of the action.
  • Status (string) -- The status of the action.
  • Properties (dict) --

    A list of properties to add to the action.

    • (string) --
      • (string) --
  • MetadataProperties (dict) --

    Metadata properties of the tracking entity, trial, or trial component.

    • CommitId (string) --

      The commit ID.

    • Repository (string) --

      The repository.

    • GeneratedBy (string) --

      The entity this entity was generated by.

    • ProjectId (string) --

      The project ID.

  • Tags (list) --

    A list of tags to apply to the action.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'ActionArn': 'string'
}

Response Structure

  • (dict) --

    • ActionArn (string) --

      The Amazon Resource Name (ARN) of the action.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_algorithm(**kwargs)

Create a machine learning algorithm that you can use in Amazon SageMaker and list in the AWS Marketplace.

See also: AWS API Documentation

Request Syntax

response = client.create_algorithm(
    AlgorithmName='string',
    AlgorithmDescription='string',
    TrainingSpecification={
        'TrainingImage': 'string',
        'TrainingImageDigest': 'string',
        'SupportedHyperParameters': [
            {
                'Name': 'string',
                'Description': 'string',
                'Type': 'Integer'|'Continuous'|'Categorical'|'FreeText',
                'Range': {
                    'IntegerParameterRangeSpecification': {
                        'MinValue': 'string',
                        'MaxValue': 'string'
                    },
                    'ContinuousParameterRangeSpecification': {
                        'MinValue': 'string',
                        'MaxValue': 'string'
                    },
                    'CategoricalParameterRangeSpecification': {
                        'Values': [
                            'string',
                        ]
                    }
                },
                'IsTunable': True|False,
                'IsRequired': True|False,
                'DefaultValue': 'string'
            },
        ],
        'SupportedTrainingInstanceTypes': [
            'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.p4d.24xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5n.xlarge'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge',
        ],
        'SupportsDistributedTraining': True|False,
        'MetricDefinitions': [
            {
                'Name': 'string',
                'Regex': 'string'
            },
        ],
        'TrainingChannels': [
            {
                'Name': 'string',
                'Description': 'string',
                'IsRequired': True|False,
                'SupportedContentTypes': [
                    'string',
                ],
                'SupportedCompressionTypes': [
                    'None'|'Gzip',
                ],
                'SupportedInputModes': [
                    'Pipe'|'File',
                ]
            },
        ],
        'SupportedTuningJobObjectiveMetrics': [
            {
                'Type': 'Maximize'|'Minimize',
                'MetricName': 'string'
            },
        ]
    },
    InferenceSpecification={
        'Containers': [
            {
                'ContainerHostname': 'string',
                'Image': 'string',
                'ImageDigest': 'string',
                'ModelDataUrl': 'string',
                'ProductId': 'string'
            },
        ],
        'SupportedTransformInstanceTypes': [
            'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge',
        ],
        'SupportedRealtimeInferenceInstanceTypes': [
            'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.12xlarge'|'ml.m5d.24xlarge'|'ml.c4.large'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.large'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.12xlarge'|'ml.r5.24xlarge'|'ml.r5d.large'|'ml.r5d.xlarge'|'ml.r5d.2xlarge'|'ml.r5d.4xlarge'|'ml.r5d.12xlarge'|'ml.r5d.24xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge',
        ],
        'SupportedContentTypes': [
            'string',
        ],
        'SupportedResponseMIMETypes': [
            'string',
        ]
    },
    ValidationSpecification={
        'ValidationRole': 'string',
        'ValidationProfiles': [
            {
                'ProfileName': 'string',
                'TrainingJobDefinition': {
                    'TrainingInputMode': 'Pipe'|'File',
                    'HyperParameters': {
                        'string': 'string'
                    },
                    'InputDataConfig': [
                        {
                            'ChannelName': 'string',
                            'DataSource': {
                                'S3DataSource': {
                                    'S3DataType': 'ManifestFile'|'S3Prefix'|'AugmentedManifestFile',
                                    'S3Uri': 'string',
                                    'S3DataDistributionType': 'FullyReplicated'|'ShardedByS3Key',
                                    'AttributeNames': [
                                        'string',
                                    ]
                                },
                                'FileSystemDataSource': {
                                    'FileSystemId': 'string',
                                    'FileSystemAccessMode': 'rw'|'ro',
                                    'FileSystemType': 'EFS'|'FSxLustre',
                                    'DirectoryPath': 'string'
                                }
                            },
                            'ContentType': 'string',
                            'CompressionType': 'None'|'Gzip',
                            'RecordWrapperType': 'None'|'RecordIO',
                            'InputMode': 'Pipe'|'File',
                            'ShuffleConfig': {
                                'Seed': 123
                            }
                        },
                    ],
                    'OutputDataConfig': {
                        'KmsKeyId': 'string',
                        'S3OutputPath': 'string'
                    },
                    'ResourceConfig': {
                        'InstanceType': 'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.p4d.24xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5n.xlarge'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge',
                        'InstanceCount': 123,
                        'VolumeSizeInGB': 123,
                        'VolumeKmsKeyId': 'string'
                    },
                    'StoppingCondition': {
                        'MaxRuntimeInSeconds': 123,
                        'MaxWaitTimeInSeconds': 123
                    }
                },
                'TransformJobDefinition': {
                    'MaxConcurrentTransforms': 123,
                    'MaxPayloadInMB': 123,
                    'BatchStrategy': 'MultiRecord'|'SingleRecord',
                    'Environment': {
                        'string': 'string'
                    },
                    'TransformInput': {
                        'DataSource': {
                            'S3DataSource': {
                                'S3DataType': 'ManifestFile'|'S3Prefix'|'AugmentedManifestFile',
                                'S3Uri': 'string'
                            }
                        },
                        'ContentType': 'string',
                        'CompressionType': 'None'|'Gzip',
                        'SplitType': 'None'|'Line'|'RecordIO'|'TFRecord'
                    },
                    'TransformOutput': {
                        'S3OutputPath': 'string',
                        'Accept': 'string',
                        'AssembleWith': 'None'|'Line',
                        'KmsKeyId': 'string'
                    },
                    'TransformResources': {
                        'InstanceType': 'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge',
                        'InstanceCount': 123,
                        'VolumeKmsKeyId': 'string'
                    }
                }
            },
        ]
    },
    CertifyForMarketplace=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • AlgorithmName (string) --

    [REQUIRED]

    The name of the algorithm.

  • AlgorithmDescription (string) -- A description of the algorithm.
  • TrainingSpecification (dict) --

    [REQUIRED]

    Specifies details about training jobs run by this algorithm, including the following:

    • The Amazon ECR path of the container and the version digest of the algorithm.
    • The hyperparameters that the algorithm supports.
    • The instance types that the algorithm supports for training.
    • Whether the algorithm supports distributed training.
    • The metrics that the algorithm emits to Amazon CloudWatch.
    • Which metrics that the algorithm emits can be used as the objective metric for hyperparameter tuning jobs.
    • The input channels that the algorithm supports for training data. For example, an algorithm might support train , validation , and test channels.
    • TrainingImage (string) -- [REQUIRED]

      The Amazon ECR registry path of the Docker image that contains the training algorithm.

    • TrainingImageDigest (string) --

      An MD5 hash of the training algorithm that identifies the Docker image used for training.

    • SupportedHyperParameters (list) --

      A list of the HyperParameterSpecification objects, that define the supported hyperparameters. This is required if the algorithm supports automatic model tuning.>

      • (dict) --

        Defines a hyperparameter to be used by an algorithm.

        • Name (string) -- [REQUIRED]

          The name of this hyperparameter. The name must be unique.

        • Description (string) --

          A brief description of the hyperparameter.

        • Type (string) -- [REQUIRED]

          The type of this hyperparameter. The valid types are Integer , Continuous , Categorical , and FreeText .

        • Range (dict) --

          The allowed range for this hyperparameter.

          • IntegerParameterRangeSpecification (dict) --

            A IntegerParameterRangeSpecification object that defines the possible values for an integer hyperparameter.

            • MinValue (string) -- [REQUIRED]

              The minimum integer value allowed.

            • MaxValue (string) -- [REQUIRED]

              The maximum integer value allowed.

          • ContinuousParameterRangeSpecification (dict) --

            A ContinuousParameterRangeSpecification object that defines the possible values for a continuous hyperparameter.

            • MinValue (string) -- [REQUIRED]

              The minimum floating-point value allowed.

            • MaxValue (string) -- [REQUIRED]

              The maximum floating-point value allowed.

          • CategoricalParameterRangeSpecification (dict) --

            A CategoricalParameterRangeSpecification object that defines the possible values for a categorical hyperparameter.

            • Values (list) -- [REQUIRED]

              The allowed categories for the hyperparameter.

              • (string) --
        • IsTunable (boolean) --

          Indicates whether this hyperparameter is tunable in a hyperparameter tuning job.

        • IsRequired (boolean) --

          Indicates whether this hyperparameter is required.

        • DefaultValue (string) --

          The default value for this hyperparameter. If a default value is specified, a hyperparameter cannot be required.

    • SupportedTrainingInstanceTypes (list) -- [REQUIRED]

      A list of the instance types that this algorithm can use for training.

      • (string) --
    • SupportsDistributedTraining (boolean) --

      Indicates whether the algorithm supports distributed training. If set to false, buyers can't request more than one instance during training.

    • MetricDefinitions (list) --

      A list of MetricDefinition objects, which are used for parsing metrics generated by the algorithm.

      • (dict) --

        Specifies a metric that the training algorithm writes to stderr or stdout . Amazon SageMakerhyperparameter tuning captures all defined metrics. You specify one metric that a hyperparameter tuning job uses as its objective metric to choose the best training job.

        • Name (string) -- [REQUIRED]

          The name of the metric.

        • Regex (string) -- [REQUIRED]

          A regular expression that searches the output of a training job and gets the value of the metric. For more information about using regular expressions to define metrics, see Defining Objective Metrics .

    • TrainingChannels (list) -- [REQUIRED]

      A list of ChannelSpecification objects, which specify the input sources to be used by the algorithm.

      • (dict) --

        Defines a named input source, called a channel, to be used by an algorithm.

        • Name (string) -- [REQUIRED]

          The name of the channel.

        • Description (string) --

          A brief description of the channel.

        • IsRequired (boolean) --

          Indicates whether the channel is required by the algorithm.

        • SupportedContentTypes (list) -- [REQUIRED]

          The supported MIME types for the data.

          • (string) --
        • SupportedCompressionTypes (list) --

          The allowed compression types, if data compression is used.

          • (string) --
        • SupportedInputModes (list) -- [REQUIRED]

          The allowed input mode, either FILE or PIPE.

          In FILE mode, Amazon SageMaker copies the data from the input source onto the local Amazon Elastic Block Store (Amazon EBS) volumes before starting your training algorithm. This is the most commonly used input mode.

          In PIPE mode, Amazon SageMaker streams input data from the source directly to your algorithm without using the EBS volume.

          • (string) --
    • SupportedTuningJobObjectiveMetrics (list) --

      A list of the metrics that the algorithm emits that can be used as the objective metric in a hyperparameter tuning job.

      • (dict) --

        Defines the objective metric for a hyperparameter tuning job. Hyperparameter tuning uses the value of this metric to evaluate the training jobs it launches, and returns the training job that results in either the highest or lowest value for this metric, depending on the value you specify for the Type parameter.

        • Type (string) -- [REQUIRED]

          Whether to minimize or maximize the objective metric.

        • MetricName (string) -- [REQUIRED]

          The name of the metric to use for the objective metric.

  • InferenceSpecification (dict) --

    Specifies details about inference jobs that the algorithm runs, including the following:

    • The Amazon ECR paths of containers that contain the inference code and model artifacts.
    • The instance types that the algorithm supports for transform jobs and real-time endpoints used for inference.
    • The input and output content formats that the algorithm supports for inference.
    • Containers (list) -- [REQUIRED]

      The Amazon ECR registry path of the Docker image that contains the inference code.

      • (dict) --

        Describes the Docker container for the model package.

        • ContainerHostname (string) --

          The DNS host name for the Docker container.

        • Image (string) -- [REQUIRED]

          The Amazon EC2 Container Registry (Amazon ECR) path where inference code is stored.

          If you are using your own custom algorithm instead of an algorithm provided by Amazon SageMaker, the inference code must meet Amazon SageMaker requirements. Amazon SageMaker supports both registry/repository[:tag] and registry/repository[@digest] image path formats. For more information, see Using Your Own Algorithms with Amazon SageMaker .

        • ImageDigest (string) --

          An MD5 hash of the training algorithm that identifies the Docker image used for training.

        • ModelDataUrl (string) --

          The Amazon S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix).

          Note

          The model artifacts must be in an S3 bucket that is in the same region as the model package.

        • ProductId (string) --

          The AWS Marketplace product ID of the model package.

    • SupportedTransformInstanceTypes (list) --

      A list of the instance types on which a transformation job can be run or on which an endpoint can be deployed.

      This parameter is required for unversioned models, and optional for versioned models.

      • (string) --
    • SupportedRealtimeInferenceInstanceTypes (list) --

      A list of the instance types that are used to generate inferences in real-time.

      This parameter is required for unversioned models, and optional for versioned models.

      • (string) --
    • SupportedContentTypes (list) -- [REQUIRED]

      The supported MIME types for the input data.

      • (string) --
    • SupportedResponseMIMETypes (list) -- [REQUIRED]

      The supported MIME types for the output data.

      • (string) --
  • ValidationSpecification (dict) --

    Specifies configurations for one or more training jobs and that Amazon SageMaker runs to test the algorithm's training code and, optionally, one or more batch transform jobs that Amazon SageMaker runs to test the algorithm's inference code.

    • ValidationRole (string) -- [REQUIRED]

      The IAM roles that Amazon SageMaker uses to run the training jobs.

    • ValidationProfiles (list) -- [REQUIRED]

      An array of AlgorithmValidationProfile objects, each of which specifies a training job and batch transform job that Amazon SageMaker runs to validate your algorithm.

      • (dict) --

        Defines a training job and a batch transform job that Amazon SageMaker runs to validate your algorithm.

        The data provided in the validation profile is made available to your buyers on AWS Marketplace.

        • ProfileName (string) -- [REQUIRED]

          The name of the profile for the algorithm. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).

        • TrainingJobDefinition (dict) -- [REQUIRED]

          The TrainingJobDefinition object that describes the training job that Amazon SageMaker runs to validate your algorithm.

          • TrainingInputMode (string) -- [REQUIRED]

            The input mode used by the algorithm for the training job. For the input modes that Amazon SageMaker algorithms support, see Algorithms .

            If an algorithm supports the File input mode, Amazon SageMaker downloads the training data from S3 to the provisioned ML storage Volume, and mounts the directory to docker volume for training container. If an algorithm supports the Pipe input mode, Amazon SageMaker streams data directly from S3 to the container.

          • HyperParameters (dict) --

            The hyperparameters used for the training job.

            • (string) --
              • (string) --
          • InputDataConfig (list) -- [REQUIRED]

            An array of Channel objects, each of which specifies an input source.

            • (dict) --

              A channel is a named input source that training algorithms can consume.

              • ChannelName (string) -- [REQUIRED]

                The name of the channel.

              • DataSource (dict) -- [REQUIRED]

                The location of the channel data.

                • S3DataSource (dict) --

                  The S3 location of the data source that is associated with a channel.

                  • S3DataType (string) -- [REQUIRED]

                    If you choose S3Prefix , S3Uri identifies a key name prefix. Amazon SageMaker uses all objects that match the specified key name prefix for model training.

                    If you choose ManifestFile , S3Uri identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for model training.

                    If you choose AugmentedManifestFile , S3Uri identifies an object that is an augmented manifest file in JSON lines format. This file contains the data you want to use for model training. AugmentedManifestFile can only be used if the Channel's input mode is Pipe .

                  • S3Uri (string) -- [REQUIRED]

                    Depending on the value specified for the S3DataType , identifies either a key name prefix or a manifest. For example:

                    • A key name prefix might look like this: s3://bucketname/exampleprefix
                    • A manifest might look like this: s3://bucketname/example.manifest A manifest is an S3 object which is a JSON file consisting of an array of elements. The first element is a prefix which is followed by one or more suffixes. SageMaker appends the suffix elements to the prefix to get a full set of S3Uri . Note that the prefix must be a valid non-empty S3Uri that precludes users from specifying a manifest whose individual S3Uri is sourced from different S3 buckets. The following code example shows a valid manifest format: [ {"prefix": "s3://customer_bucket/some/prefix/"}, "relative/path/to/custdata-1", "relative/path/custdata-2", ... "relative/path/custdata-N" ] This JSON is equivalent to the following S3Uri list: s3://customer_bucket/some/prefix/relative/path/to/custdata-1 s3://customer_bucket/some/prefix/relative/path/custdata-2 ... s3://customer_bucket/some/prefix/relative/path/custdata-N The complete set of S3Uri in this manifest is the input data for the channel for this data source. The object that each S3Uri points to must be readable by the IAM role that Amazon SageMaker uses to perform tasks on your behalf.
                  • S3DataDistributionType (string) --

                    If you want Amazon SageMaker to replicate the entire dataset on each ML compute instance that is launched for model training, specify FullyReplicated .

                    If you want Amazon SageMaker to replicate a subset of data on each ML compute instance that is launched for model training, specify ShardedByS3Key . If there are n ML compute instances launched for a training job, each instance gets approximately 1/n of the number of S3 objects. In this case, model training on each machine uses only the subset of training data.

                    Don't choose more ML compute instances for training than available S3 objects. If you do, some nodes won't get any data and you will pay for nodes that aren't getting any training data. This applies in both File and Pipe modes. Keep this in mind when developing algorithms.

                    In distributed training, where you use multiple ML compute EC2 instances, you might choose ShardedByS3Key . If the algorithm requires copying training data to the ML storage volume (when TrainingInputMode is set to File ), this copies 1/n of the number of objects.

                  • AttributeNames (list) --

                    A list of one or more attribute names to use that are found in a specified augmented manifest file.

                    • (string) --
                • FileSystemDataSource (dict) --

                  The file system that is associated with a channel.

                  • FileSystemId (string) -- [REQUIRED]

                    The file system id.

                  • FileSystemAccessMode (string) -- [REQUIRED]

                    The access mode of the mount of the directory associated with the channel. A directory can be mounted either in ro (read-only) or rw (read-write) mode.

                  • FileSystemType (string) -- [REQUIRED]

                    The file system type.

                  • DirectoryPath (string) -- [REQUIRED]

                    The full path to the directory to associate with the channel.

              • ContentType (string) --

                The MIME type of the data.

              • CompressionType (string) --

                If training data is compressed, the compression type. The default value is None . CompressionType is used only in Pipe input mode. In File mode, leave this field unset or set it to None.

              • RecordWrapperType (string) --

                Specify RecordIO as the value when input data is in raw format but the training algorithm requires the RecordIO format. In this case, Amazon SageMaker wraps each individual S3 object in a RecordIO record. If the input data is already in RecordIO format, you don't need to set this attribute. For more information, see Create a Dataset Using RecordIO .

                In File mode, leave this field unset or set it to None.

              • InputMode (string) --

                (Optional) The input mode to use for the data channel in a training job. If you don't set a value for InputMode , Amazon SageMaker uses the value set for TrainingInputMode . Use this parameter to override the TrainingInputMode setting in a AlgorithmSpecification request when you have a channel that needs a different input mode from the training job's general setting. To download the data from Amazon Simple Storage Service (Amazon S3) to the provisioned ML storage volume, and mount the directory to a Docker volume, use File input mode. To stream data directly from Amazon S3 to the container, choose Pipe input mode.

                To use a model for incremental training, choose File input model.

              • ShuffleConfig (dict) --

                A configuration for a shuffle option for input data in a channel. If you use S3Prefix for S3DataType , this shuffles the results of the S3 key prefix matches. If you use ManifestFile , the order of the S3 object references in the ManifestFile is shuffled. If you use AugmentedManifestFile , the order of the JSON lines in the AugmentedManifestFile is shuffled. The shuffling order is determined using the Seed value.

                For Pipe input mode, shuffling is done at the start of every epoch. With large datasets this ensures that the order of the training data is different for each epoch, it helps reduce bias and possible overfitting. In a multi-node training job when ShuffleConfig is combined with S3DataDistributionType of ShardedByS3Key , the data is shuffled across nodes so that the content sent to a particular node on the first epoch might be sent to a different node on the second epoch.

                • Seed (integer) -- [REQUIRED]

                  Determines the shuffling order in ShuffleConfig value.

          • OutputDataConfig (dict) -- [REQUIRED]

            the path to the S3 bucket where you want to store model artifacts. Amazon SageMaker creates subfolders for the artifacts.

            • KmsKeyId (string) --

              The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats:

              • // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab"
              • // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
              • // KMS Key Alias "alias/ExampleAlias"
              • // Amazon Resource Name (ARN) of a KMS Key Alias "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias"

              If you use a KMS key ID or an alias of your master key, the Amazon SageMaker execution role must include permissions to call kms:Encrypt . If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with KMS-managed keys for OutputDataConfig . If you use a bucket policy with an s3:PutObject permission that only allows objects with server-side encryption, set the condition key of s3:x-amz-server-side-encryption to "aws:kms" . For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.

              The KMS key policy must grant permission to the IAM role that you specify in your CreateTrainingJob , CreateTransformJob , or CreateHyperParameterTuningJob requests. For more information, see Using Key Policies in AWS KMS in the AWS Key Management Service Developer Guide .

            • S3OutputPath (string) -- [REQUIRED]

              Identifies the S3 path where you want Amazon SageMaker to store the model artifacts. For example, s3://bucket-name/key-name-prefix .

          • ResourceConfig (dict) -- [REQUIRED]

            The resources, including the ML compute instances and ML storage volumes, to use for model training.

            • InstanceType (string) -- [REQUIRED]

              The ML compute instance type.

            • InstanceCount (integer) -- [REQUIRED]

              The number of ML compute instances to use. For distributed training, provide a value greater than 1.

            • VolumeSizeInGB (integer) -- [REQUIRED]

              The size of the ML storage volume that you want to provision.

              ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML storage volume for scratch space. If you want to store the training data in the ML storage volume, choose File as the TrainingInputMode in the algorithm specification.

              You must specify sufficient ML storage for your scenario.

              Note

              Amazon SageMaker supports only the General Purpose SSD (gp2) ML storage volume type.

              Note

              Certain Nitro-based instances include local storage with a fixed total size, dependent on the instance type. When using these instances for training, Amazon SageMaker mounts the local instance storage instead of Amazon EBS gp2 storage. You can't request a VolumeSizeInGB greater than the total size of the local instance storage.

              For a list of instance types that support local instance storage, including the total size per instance type, see Instance Store Volumes .

            • VolumeKmsKeyId (string) --

              The AWS KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the training job.

              Note

              Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a VolumeKmsKeyId when using an instance type with local storage.

              For a list of instance types that support local instance storage, see Instance Store Volumes .

              For more information about local instance storage encryption, see SSD Instance Store Volumes .

              The VolumeKmsKeyId can be in any of the following formats:

              • // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab"
              • // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
          • StoppingCondition (dict) -- [REQUIRED]

            Specifies a limit to how long a model training job can run. When the job reaches the time limit, Amazon SageMaker ends the training job. Use this API to cap model training costs.

            To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts.

            • MaxRuntimeInSeconds (integer) --

              The maximum length of time, in seconds, that the training or compilation job can run. If job does not complete during this time, Amazon SageMaker ends the job. If value is not specified, default value is 1 day. The maximum value is 28 days.

            • MaxWaitTimeInSeconds (integer) --

              The maximum length of time, in seconds, how long you are willing to wait for a managed spot training job to complete. It is the amount of time spent waiting for Spot capacity plus the amount of time the training job runs. It must be equal to or greater than MaxRuntimeInSeconds .

        • TransformJobDefinition (dict) --

          The TransformJobDefinition object that describes the transform job that Amazon SageMaker runs to validate your algorithm.

          • MaxConcurrentTransforms (integer) --

            The maximum number of parallel requests that can be sent to each instance in a transform job. The default value is 1.

          • MaxPayloadInMB (integer) --

            The maximum payload size allowed, in MB. A payload is the data portion of a record (without metadata).

          • BatchStrategy (string) --

            A string that determines the number of records included in a single mini-batch.

            SingleRecord means only one record is used per mini-batch. MultiRecord means a mini-batch is set to contain as many records that can fit within the MaxPayloadInMB limit.
          • Environment (dict) --

            The environment variables to set in the Docker container. We support up to 16 key and values entries in the map.

            • (string) --
              • (string) --
          • TransformInput (dict) -- [REQUIRED]

            A description of the input source and the way the transform job consumes it.

            • DataSource (dict) -- [REQUIRED]

              Describes the location of the channel data, which is, the S3 location of the input data that the model can consume.

              • S3DataSource (dict) -- [REQUIRED]

                The S3 location of the data source that is associated with a channel.

                • S3DataType (string) -- [REQUIRED]

                  If you choose S3Prefix , S3Uri identifies a key name prefix. Amazon SageMaker uses all objects with the specified key name prefix for batch transform.

                  If you choose ManifestFile , S3Uri identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for batch transform.

                  The following values are compatible: ManifestFile , S3Prefix

                  The following value is not compatible: AugmentedManifestFile

                • S3Uri (string) -- [REQUIRED]

                  Depending on the value specified for the S3DataType , identifies either a key name prefix or a manifest. For example:

                  • A key name prefix might look like this: s3://bucketname/exampleprefix .
                  • A manifest might look like this: s3://bucketname/example.manifest The manifest is an S3 object which is a JSON file with the following format: [ {"prefix": "s3://customer_bucket/some/prefix/"}, "relative/path/to/custdata-1", "relative/path/custdata-2", ... "relative/path/custdata-N" ] The preceding JSON matches the following S3Uris : s3://customer_bucket/some/prefix/relative/path/to/custdata-1 s3://customer_bucket/some/prefix/relative/path/custdata-2 ... s3://customer_bucket/some/prefix/relative/path/custdata-N The complete set of S3Uris in this manifest constitutes the input data for the channel for this datasource. The object that each S3Uris points to must be readable by the IAM role that Amazon SageMaker uses to perform tasks on your behalf.
            • ContentType (string) --

              The multipurpose internet mail extension (MIME) type of the data. Amazon SageMaker uses the MIME type with each http call to transfer data to the transform job.

            • CompressionType (string) --

              If your transform data is compressed, specify the compression type. Amazon SageMaker automatically decompresses the data for the transform job accordingly. The default value is None .

            • SplitType (string) --

              The method to use to split the transform job's data files into smaller batches. Splitting is necessary when the total size of each object is too large to fit in a single request. You can also use data splitting to improve performance by processing multiple concurrent mini-batches. The default value for SplitType is None , which indicates that input data files are not split, and request payloads contain the entire contents of an input object. Set the value of this parameter to Line to split records on a newline character boundary. SplitType also supports a number of record-oriented binary data formats. Currently, the supported record formats are:

              • RecordIO
              • TFRecord

              When splitting is enabled, the size of a mini-batch depends on the values of the BatchStrategy and MaxPayloadInMB parameters. When the value of BatchStrategy is MultiRecord , Amazon SageMaker sends the maximum number of records in each request, up to the MaxPayloadInMB limit. If the value of BatchStrategy is SingleRecord , Amazon SageMaker sends individual records in each request.

              Note

              Some data formats represent a record as a binary payload wrapped with extra padding bytes. When splitting is applied to a binary data format, padding is removed if the value of BatchStrategy is set to SingleRecord . Padding is not removed if the value of BatchStrategy is set to MultiRecord .

              For more information about RecordIO , see Create a Dataset Using RecordIO in the MXNet documentation. For more information about TFRecord , see Consuming TFRecord data in the TensorFlow documentation.

          • TransformOutput (dict) -- [REQUIRED]

            Identifies the Amazon S3 location where you want Amazon SageMaker to save the results from the transform job.

            • S3OutputPath (string) -- [REQUIRED]

              The Amazon S3 path where you want Amazon SageMaker to store the results of the transform job. For example, s3://bucket-name/key-name-prefix .

              For every S3 object used as input for the transform job, batch transform stores the transformed data with an .``out`` suffix in a corresponding subfolder in the location in the output prefix. For example, for the input data stored at s3://bucket-name/input-name-prefix/dataset01/data.csv , batch transform stores the transformed data at s3://bucket-name/output-name-prefix/input-name-prefix/data.csv.out . Batch transform doesn't upload partially processed objects. For an input S3 object that contains multiple records, it creates an .``out`` file only if the transform job succeeds on the entire file. When the input contains multiple S3 objects, the batch transform job processes the listed S3 objects and uploads only the output for successfully processed objects. If any object fails in the transform job batch transform marks the job as failed to prompt investigation.

            • Accept (string) --

              The MIME type used to specify the output data. Amazon SageMaker uses the MIME type with each http call to transfer data from the transform job.

            • AssembleWith (string) --

              Defines how to assemble the results of the transform job as a single S3 object. Choose a format that is most convenient to you. To concatenate the results in binary format, specify None . To add a newline character at the end of every transformed record, specify Line .

            • KmsKeyId (string) --

              The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats:

              • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
              • Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
              • Alias name: alias/ExampleAlias
              • Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias

              If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.

              The KMS key policy must grant permission to the IAM role that you specify in your CreateModel request. For more information, see Using Key Policies in AWS KMS in the AWS Key Management Service Developer Guide .

          • TransformResources (dict) -- [REQUIRED]

            Identifies the ML compute instances for the transform job.

            • InstanceType (string) -- [REQUIRED]

              The ML compute instance type for the transform job. If you are using built-in algorithms to transform moderately sized datasets, we recommend using ml.m4.xlarge or ml.m5.large instance types.

            • InstanceCount (integer) -- [REQUIRED]

              The number of ML compute instances to use in the transform job. For distributed transform jobs, specify a value greater than 1. The default value is 1 .

            • VolumeKmsKeyId (string) --

              The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt model data on the storage volume attached to the ML compute instance(s) that run the batch transform job. The VolumeKmsKeyId can be any of the following formats:

              • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
              • Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
              • Alias name: alias/ExampleAlias
              • Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias
  • CertifyForMarketplace (boolean) -- Whether to certify the algorithm so that it can be listed in AWS Marketplace.
  • Tags (list) --

    An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging AWS Resources .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'AlgorithmArn': 'string'
}

Response Structure

  • (dict) --

    • AlgorithmArn (string) --

      The Amazon Resource Name (ARN) of the new algorithm.

create_app(**kwargs)

Creates a running App for the specified UserProfile. Supported Apps are JupyterServer and KernelGateway. This operation is automatically invoked by Amazon SageMaker Studio upon access to the associated Domain, and when new kernel configurations are selected by the user. A user may have multiple Apps active simultaneously.

See also: AWS API Documentation

Request Syntax

response = client.create_app(
    DomainId='string',
    UserProfileName='string',
    AppType='JupyterServer'|'KernelGateway'|'TensorBoard',
    AppName='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    ResourceSpec={
        'SageMakerImageArn': 'string',
        'SageMakerImageVersionArn': 'string',
        'InstanceType': 'system'|'ml.t3.micro'|'ml.t3.small'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.8xlarge'|'ml.m5.12xlarge'|'ml.m5.16xlarge'|'ml.m5.24xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.12xlarge'|'ml.c5.18xlarge'|'ml.c5.24xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'
    }
)
Parameters
  • DomainId (string) --

    [REQUIRED]

    The domain ID.

  • UserProfileName (string) --

    [REQUIRED]

    The user profile name.

  • AppType (string) --

    [REQUIRED]

    The type of app.

  • AppName (string) --

    [REQUIRED]

    The name of the app.

  • Tags (list) --

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

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

  • ResourceSpec (dict) --

    The instance type and the Amazon Resource Name (ARN) of the SageMaker image created on the instance.

    • SageMakerImageArn (string) --

      The ARN of the SageMaker image that the image version belongs to.

    • SageMakerImageVersionArn (string) --

      The ARN of the image version created on the instance.

    • InstanceType (string) --

      The instance type that the image version runs on.

Return type

dict

Returns

Response Syntax

{
    'AppArn': 'string'
}

Response Structure

  • (dict) --

    • AppArn (string) --

      The Amazon Resource Name (ARN) of the app.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
  • SageMaker.Client.exceptions.ResourceInUse
create_app_image_config(**kwargs)

Creates a configuration for running a SageMaker image as a KernelGateway app. The configuration specifies the Amazon Elastic File System (EFS) storage volume on the image, and a list of the kernels in the image.

See also: AWS API Documentation

Request Syntax

response = client.create_app_image_config(
    AppImageConfigName='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    KernelGatewayImageConfig={
        'KernelSpecs': [
            {
                'Name': 'string',
                'DisplayName': 'string'
            },
        ],
        'FileSystemConfig': {
            'MountPath': 'string',
            'DefaultUid': 123,
            'DefaultGid': 123
        }
    }
)
Parameters
  • AppImageConfigName (string) --

    [REQUIRED]

    The name of the AppImageConfig. Must be unique to your account.

  • Tags (list) --

    A list of tags to apply to the AppImageConfig.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

  • KernelGatewayImageConfig (dict) --

    The KernelGatewayImageConfig.

    • KernelSpecs (list) -- [REQUIRED]

      The specification of the Jupyter kernels in the image.

      • (dict) --

        The specification of a Jupyter kernel.

        • Name (string) -- [REQUIRED]

          The name of the kernel.

        • DisplayName (string) --

          The display name of the kernel.

    • FileSystemConfig (dict) --

      The Amazon Elastic File System (EFS) storage configuration for a SageMaker image.

      • MountPath (string) --

        The path within the image to mount the user's EFS home directory. The directory should be empty. If not specified, defaults to /home/sagemaker-user .

      • DefaultUid (integer) --

        The default POSIX user ID (UID). If not specified, defaults to 1000 .

      • DefaultGid (integer) --

        The default POSIX group ID (GID). If not specified, defaults to 100 .

Return type

dict

Returns

Response Syntax

{
    'AppImageConfigArn': 'string'
}

Response Structure

  • (dict) --

    • AppImageConfigArn (string) --

      The Amazon Resource Name (ARN) of the AppImageConfig.

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
create_artifact(**kwargs)

Creates an artifact . An artifact is a lineage tracking entity that represents a URI addressable object or data. Some examples are the S3 URI of a dataset and the ECR registry path of an image. For more information, see Amazon SageMaker ML Lineage Tracking .

See also: AWS API Documentation

Request Syntax

response = client.create_artifact(
    ArtifactName='string',
    Source={
        'SourceUri': 'string',
        'SourceTypes': [
            {
                'SourceIdType': 'MD5Hash'|'S3ETag'|'S3Version'|'Custom',
                'Value': 'string'
            },
        ]
    },
    ArtifactType='string',
    Properties={
        'string': 'string'
    },
    MetadataProperties={
        'CommitId': 'string',
        'Repository': 'string',
        'GeneratedBy': 'string',
        'ProjectId': 'string'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ArtifactName (string) -- The name of the artifact. Must be unique to your account in an AWS Region.
  • Source (dict) --

    [REQUIRED]

    The ID, ID type, and URI of the source.

    • SourceUri (string) -- [REQUIRED]

      The URI of the source.

    • SourceTypes (list) --

      A list of source types.

      • (dict) --

        The ID and ID type of an artifact source.

        • SourceIdType (string) -- [REQUIRED]

          The type of ID.

        • Value (string) -- [REQUIRED]

          The ID.

  • ArtifactType (string) --

    [REQUIRED]

    The artifact type.

  • Properties (dict) --

    A list of properties to add to the artifact.

    • (string) --
      • (string) --
  • MetadataProperties (dict) --

    Metadata properties of the tracking entity, trial, or trial component.

    • CommitId (string) --

      The commit ID.

    • Repository (string) --

      The repository.

    • GeneratedBy (string) --

      The entity this entity was generated by.

    • ProjectId (string) --

      The project ID.

  • Tags (list) --

    A list of tags to apply to the artifact.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'ArtifactArn': 'string'
}

Response Structure

  • (dict) --

    • ArtifactArn (string) --

      The Amazon Resource Name (ARN) of the artifact.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_auto_ml_job(**kwargs)

Creates an Autopilot job.

Find the best performing model after you run an Autopilot job by calling . Deploy that model by following the steps described in Step 6.1: Deploy the Model to Amazon SageMaker Hosting Services .

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

See also: AWS API Documentation

Request Syntax

response = client.create_auto_ml_job(
    AutoMLJobName='string',
    InputDataConfig=[
        {
            'DataSource': {
                'S3DataSource': {
                    'S3DataType': 'ManifestFile'|'S3Prefix',
                    'S3Uri': 'string'
                }
            },
            'CompressionType': 'None'|'Gzip',
            'TargetAttributeName': 'string'
        },
    ],
    OutputDataConfig={
        'KmsKeyId': 'string',
        'S3OutputPath': 'string'
    },
    ProblemType='BinaryClassification'|'MulticlassClassification'|'Regression',
    AutoMLJobObjective={
        'MetricName': 'Accuracy'|'MSE'|'F1'|'F1macro'|'AUC'
    },
    AutoMLJobConfig={
        'CompletionCriteria': {
            'MaxCandidates': 123,
            'MaxRuntimePerTrainingJobInSeconds': 123,
            'MaxAutoMLJobRuntimeInSeconds': 123
        },
        'SecurityConfig': {
            'VolumeKmsKeyId': 'string',
            'EnableInterContainerTrafficEncryption': True|False,
            'VpcConfig': {
                'SecurityGroupIds': [
                    'string',
                ],
                'Subnets': [
                    'string',
                ]
            }
        }
    },
    RoleArn='string',
    GenerateCandidateDefinitionsOnly=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • AutoMLJobName (string) --

    [REQUIRED]

    Identifies an Autopilot job. Must be unique to your account and is case-insensitive.

  • InputDataConfig (list) --

    [REQUIRED]

    Similar to InputDataConfig supported by Tuning. Format(s) supported: CSV. Minimum of 500 rows.

    • (dict) --

      Similar to Channel. A channel is a named input source that training algorithms can consume. Refer to Channel for detailed descriptions.

      • DataSource (dict) -- [REQUIRED]

        The data source.

        • S3DataSource (dict) -- [REQUIRED]

          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) -- [REQUIRED]

            The data type.

          • S3Uri (string) -- [REQUIRED]

            The URL to the Amazon S3 data source.

      • CompressionType (string) --

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

      • TargetAttributeName (string) -- [REQUIRED]

        The name of the target variable in supervised learning, a.k.a. 'y'.

  • OutputDataConfig (dict) --

    [REQUIRED]

    Similar to OutputDataConfig supported by Tuning. Format(s) supported: CSV.

    • KmsKeyId (string) --

      The AWS KMS encryption key ID.

    • S3OutputPath (string) -- [REQUIRED]

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

  • ProblemType (string) -- Defines the kind of preprocessing and algorithms intended for the candidates. Options include: BinaryClassification, MulticlassClassification, and Regression.
  • AutoMLJobObjective (dict) --

    Defines the objective of a an AutoML job. You provide a AutoMLJobObjective$MetricName and Autopilot infers whether to minimize or maximize it. If a metric is not specified, the most commonly used ObjectiveMetric for problem type is automaically selected.

    • MetricName (string) -- [REQUIRED]

      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. When the data contains outliers, they tend to dominate the MSE which might cause subpar prediction performance.
      • Accuracy : The ratio of the number correctly classified items to the total number (correctly and incorrectly) classified. It is used for binary and multiclass classification. Measures how close the predicted class values are to the actual values. Accuracy values vary between zero and one, one being perfect accuracy and zero 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; 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 being 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, one being perfect accuracy and one half not better than a random classifier. Values less that one half predict worse than a random predictor and such consistently bad predictors can 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 used 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 being 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.
  • AutoMLJobConfig (dict) --

    Contains CompletionCriteria and SecurityConfig.

    • CompletionCriteria (dict) --

      How long a 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, a job is allowed to run.

      • MaxAutoMLJobRuntimeInSeconds (integer) --

        The maximum time, in seconds, an AutoML job is allowed to wait for a trial to complete. It must be equal to or greater than MaxRuntimePerTrainingJobInSeconds.

    • SecurityConfig (dict) --

      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 (dict) --

        VPC configuration.

        • SecurityGroupIds (list) -- [REQUIRED]

          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) -- [REQUIRED]

          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) --
  • RoleArn (string) --

    [REQUIRED]

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

  • GenerateCandidateDefinitionsOnly (boolean) -- Generates possible candidates without training a model. 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.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'AutoMLJobArn': 'string'
}

Response Structure

  • (dict) --

    • AutoMLJobArn (string) --

      When a job is created, it is assigned a unique ARN.

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_code_repository(**kwargs)

Creates a Git repository as a resource in your Amazon SageMaker account. You can associate the repository with notebook instances so that you can use Git source control for the notebooks you create. The Git repository is a resource in your Amazon SageMaker account, so it can be associated with more than one notebook instance, and it persists independently from the lifecycle of any notebook instances it is associated with.

The repository can be hosted either in AWS CodeCommit or in any other Git repository.

See also: AWS API Documentation

Request Syntax

response = client.create_code_repository(
    CodeRepositoryName='string',
    GitConfig={
        'RepositoryUrl': 'string',
        'Branch': 'string',
        'SecretArn': 'string'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • CodeRepositoryName (string) --

    [REQUIRED]

    The name of the Git repository. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).

  • GitConfig (dict) --

    [REQUIRED]

    Specifies details about the repository, including the URL where the repository is located, the default branch, and credentials to use to access the repository.

    • RepositoryUrl (string) -- [REQUIRED]

      The URL where the Git repository is located.

    • Branch (string) --

      The default branch for the Git repository.

    • SecretArn (string) --

      The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that contains the credentials used to access the git repository. The secret must have a staging label of AWSCURRENT and must be in the following format:

      {"username": *UserName* , "password": *Password* }
  • Tags (list) --

    An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging AWS Resources .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'CodeRepositoryArn': 'string'
}

Response Structure

  • (dict) --

    • CodeRepositoryArn (string) --

      The Amazon Resource Name (ARN) of the new repository.

create_compilation_job(**kwargs)

Starts a model compilation job. After the model has been compiled, Amazon SageMaker saves the resulting model artifacts to an Amazon Simple Storage Service (Amazon S3) bucket that you specify.

If you choose to host your model using Amazon SageMaker hosting services, you can use the resulting model artifacts as part of the model. You can also use the artifacts with AWS IoT Greengrass. In that case, deploy them as an ML resource.

In the request body, you provide the following:

  • A name for the compilation job
  • Information about the input model artifacts
  • The output location for the compiled model and the device (target) that the model runs on
  • The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker assumes to perform the model compilation job.

You can also provide a Tag to track the model compilation job's resource use and costs. The response body contains the CompilationJobArn for the compiled job.

To stop a model compilation job, use StopCompilationJob . To get information about a particular model compilation job, use DescribeCompilationJob . To get information about multiple model compilation jobs, use ListCompilationJobs .

See also: AWS API Documentation

Request Syntax

response = client.create_compilation_job(
    CompilationJobName='string',
    RoleArn='string',
    InputConfig={
        'S3Uri': 'string',
        'DataInputConfig': 'string',
        'Framework': 'TENSORFLOW'|'KERAS'|'MXNET'|'ONNX'|'PYTORCH'|'XGBOOST'|'TFLITE'|'DARKNET'|'SKLEARN'
    },
    OutputConfig={
        'S3OutputLocation': 'string',
        'TargetDevice': 'lambda'|'ml_m4'|'ml_m5'|'ml_c4'|'ml_c5'|'ml_p2'|'ml_p3'|'ml_g4dn'|'ml_inf1'|'jetson_tx1'|'jetson_tx2'|'jetson_nano'|'jetson_xavier'|'rasp3b'|'imx8qm'|'deeplens'|'rk3399'|'rk3288'|'aisage'|'sbe_c'|'qcs605'|'qcs603'|'sitara_am57x'|'amba_cv22'|'x86_win32'|'x86_win64'|'coreml'|'jacinto_tda4vm',
        'TargetPlatform': {
            'Os': 'ANDROID'|'LINUX',
            'Arch': 'X86_64'|'X86'|'ARM64'|'ARM_EABI'|'ARM_EABIHF',
            'Accelerator': 'INTEL_GRAPHICS'|'MALI'|'NVIDIA'
        },
        'CompilerOptions': 'string',
        'KmsKeyId': 'string'
    },
    StoppingCondition={
        'MaxRuntimeInSeconds': 123,
        'MaxWaitTimeInSeconds': 123
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • CompilationJobName (string) --

    [REQUIRED]

    A name for the model compilation job. The name must be unique within the AWS Region and within your AWS account.

  • RoleArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.

    During model compilation, Amazon SageMaker needs your permission to:

    • Read input data from an S3 bucket
    • Write model artifacts to an S3 bucket
    • Write logs to Amazon CloudWatch Logs
    • Publish metrics to Amazon CloudWatch

    You grant permissions for all of these tasks to an IAM role. To pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission. For more information, see Amazon SageMaker Roles.

  • InputConfig (dict) --

    [REQUIRED]

    Provides information about the location of input model artifacts, the name and shape of the expected data inputs, and the framework in which the model was trained.

    • S3Uri (string) -- [REQUIRED]

      The S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix).

    • DataInputConfig (string) -- [REQUIRED]

      Specifies the name and shape of the expected data inputs for your trained model with a JSON dictionary form. The data inputs are InputConfig$Framework specific.

      • TensorFlow : You must specify the name and shape (NHWC format) of the expected data inputs using a dictionary format for your trained model. The dictionary formats required for the console and CLI are different.
        • Examples for one input:
          • If using the console, {"input":[1,1024,1024,3]}
          • If using the CLI, {\"input\":[1,1024,1024,3]}
        • Examples for two inputs:
          • If using the console, {"data1": [1,28,28,1], "data2":[1,28,28,1]}
          • If using the CLI, {\"data1\": [1,28,28,1], \"data2\":[1,28,28,1]}
      • KERAS : You must specify the name and shape (NCHW format) of expected data inputs using a dictionary format for your trained model. Note that while Keras model artifacts should be uploaded in NHWC (channel-last) format, DataInputConfig should be specified in NCHW (channel-first) format. The dictionary formats required for the console and CLI are different.
        • Examples for one input:
          • If using the console, {"input_1":[1,3,224,224]}
          • If using the CLI, {\"input_1\":[1,3,224,224]}
        • Examples for two inputs:
          • If using the console, {"input_1": [1,3,224,224], "input_2":[1,3,224,224]}
          • If using the CLI, {\"input_1\": [1,3,224,224], \"input_2\":[1,3,224,224]}
      • MXNET/ONNX/DARKNET : You must specify the name and shape (NCHW format) of the expected data inputs in order using a dictionary format for your trained model. The dictionary formats required for the console and CLI are different.
        • Examples for one input:
          • If using the console, {"data":[1,3,1024,1024]}
          • If using the CLI, {\"data\":[1,3,1024,1024]}
        • Examples for two inputs:
          • If using the console, {"var1": [1,1,28,28], "var2":[1,1,28,28]}
          • If using the CLI, {\"var1\": [1,1,28,28], \"var2\":[1,1,28,28]}
      • PyTorch : You can either specify the name and shape (NCHW format) of expected data inputs in order using a dictionary format for your trained model or you can specify the shape only using a list format. The dictionary formats required for the console and CLI are different. The list formats for the console and CLI are the same.
        • Examples for one input in dictionary format:
          • If using the console, {"input0":[1,3,224,224]}
          • If using the CLI, {\"input0\":[1,3,224,224]}
        • Example for one input in list format: [[1,3,224,224]]
        • Examples for two inputs in dictionary format:
          • If using the console, {"input0":[1,3,224,224], "input1":[1,3,224,224]}
          • If using the CLI, {\"input0\":[1,3,224,224], \"input1\":[1,3,224,224]}
        • Example for two inputs in list format: [[1,3,224,224], [1,3,224,224]]
      • XGBOOST : input data name and shape are not needed.
      DataInputConfig supports the following parameters for CoreML OutputConfig$TargetDevice (ML Model format):
      • shape : Input shape, for example {"input_1": {"shape": [1,224,224,3]}} . In addition to static input shapes, CoreML converter supports Flexible input shapes:
        • Range Dimension. You can use the Range Dimension feature if you know the input shape will be within some specific interval in that dimension, for example: {"input_1": {"shape": ["1..10", 224, 224, 3]}}
        • Enumerated shapes. Sometimes, the models are trained to work only on a select set of inputs. You can enumerate all supported input shapes, for example: {"input_1": {"shape": [[1, 224, 224, 3], [1, 160, 160, 3]]}}
      • default_shape : Default input shape. You can set a default shape during conversion for both Range Dimension and Enumerated Shapes. For example {"input_1": {"shape": ["1..10", 224, 224, 3], "default_shape": [1, 224, 224, 3]}}
      • type : Input type. Allowed values: Image and Tensor . By default, the converter generates an ML Model with inputs of type Tensor (MultiArray). User can set input type to be Image. Image input type requires additional input parameters such as bias and scale .
      • bias : If the input type is an Image, you need to provide the bias vector.
      • scale : If the input type is an Image, you need to provide a scale factor.

      CoreML ClassifierConfig parameters can be specified using OutputConfig$CompilerOptions . CoreML converter supports Tensorflow and PyTorch models. CoreML conversion examples:

      • Tensor type input:
        • "DataInputConfig": {"input_1": {"shape": [[1,224,224,3], [1,160,160,3]], "default_shape": [1,224,224,3]}}
      • Tensor type input without input name (PyTorch):
        • "DataInputConfig": [{"shape": [[1,3,224,224], [1,3,160,160]], "default_shape": [1,3,224,224]}]
      • Image type input:
        • "DataInputConfig": {"input_1": {"shape": [[1,224,224,3], [1,160,160,3]], "default_shape": [1,224,224,3], "type": "Image", "bias": [-1,-1,-1], "scale": 0.007843137255}}
        • "CompilerOptions": {"class_labels": "imagenet_labels_1000.txt"}
      • Image type input without input name (PyTorch):
        • "DataInputConfig": [{"shape": [[1,3,224,224], [1,3,160,160]], "default_shape": [1,3,224,224], "type": "Image", "bias": [-1,-1,-1], "scale": 0.007843137255}]
        • "CompilerOptions": {"class_labels": "imagenet_labels_1000.txt"}
    • Framework (string) -- [REQUIRED]

      Identifies the framework in which the model was trained. For example: TENSORFLOW.

  • OutputConfig (dict) --

    [REQUIRED]

    Provides information about the output location for the compiled model and the target device the model runs on.

    • S3OutputLocation (string) -- [REQUIRED]

      Identifies the S3 bucket where you want Amazon SageMaker to store the model artifacts. For example, s3://bucket-name/key-name-prefix .

    • TargetDevice (string) --

      Identifies the target device or the machine learning instance that you want to run your model on after the compilation has completed. Alternatively, you can specify OS, architecture, and accelerator using TargetPlatform fields. It can be used instead of TargetPlatform .

    • TargetPlatform (dict) --

      Contains information about a target platform that you want your model to run on, such as OS, architecture, and accelerators. It is an alternative of TargetDevice .

      The following examples show how to configure the TargetPlatform and CompilerOptions JSON strings for popular target platforms:

      • Raspberry Pi 3 Model B+ "TargetPlatform": {"Os": "LINUX", "Arch": "ARM_EABIHF"}, "CompilerOptions": {'mattr': ['+neon']}
      • Jetson TX2 "TargetPlatform": {"Os": "LINUX", "Arch": "ARM64", "Accelerator": "NVIDIA"}, "CompilerOptions": {'gpu-code': 'sm_62', 'trt-ver': '6.0.1', 'cuda-ver': '10.0'}
      • EC2 m5.2xlarge instance OS "TargetPlatform": {"Os": "LINUX", "Arch": "X86_64", "Accelerator": "NVIDIA"}, "CompilerOptions": {'mcpu': 'skylake-avx512'}
      • RK3399 "TargetPlatform": {"Os": "LINUX", "Arch": "ARM64", "Accelerator": "MALI"}
      • ARMv7 phone (CPU) "TargetPlatform": {"Os": "ANDROID", "Arch": "ARM_EABI"}, "CompilerOptions": {'ANDROID_PLATFORM': 25, 'mattr': ['+neon']}
      • ARMv8 phone (CPU) "TargetPlatform": {"Os": "ANDROID", "Arch": "ARM64"}, "CompilerOptions": {'ANDROID_PLATFORM': 29}
      • Os (string) -- [REQUIRED]

        Specifies a target platform OS.

        • LINUX : Linux-based operating systems.
        • ANDROID : Android operating systems. Android API level can be specified using the ANDROID_PLATFORM compiler option. For example, "CompilerOptions": {'ANDROID_PLATFORM': 28}
      • Arch (string) -- [REQUIRED]

        Specifies a target platform architecture.

        • X86_64 : 64-bit version of the x86 instruction set.
        • X86 : 32-bit version of the x86 instruction set.
        • ARM64 : ARMv8 64-bit CPU.
        • ARM_EABIHF : ARMv7 32-bit, Hard Float.
        • ARM_EABI : ARMv7 32-bit, Soft Float. Used by Android 32-bit ARM platform.
      • Accelerator (string) --

        Specifies a target platform accelerator (optional).

        • NVIDIA : Nvidia graphics processing unit. It also requires gpu-code , trt-ver , cuda-ver compiler options
        • MALI : ARM Mali graphics processor
        • INTEL_GRAPHICS : Integrated Intel graphics
    • CompilerOptions (string) --

      Specifies additional parameters for compiler options in JSON format. The compiler options are TargetPlatform specific. It is required for NVIDIA accelerators and highly recommended for CPU compilations. For any other cases, it is optional to specify CompilerOptions.

      • CPU : Compilation for CPU supports the following compiler options.
        • mcpu : CPU micro-architecture. For example, {'mcpu': 'skylake-avx512'}
        • mattr : CPU flags. For example, {'mattr': ['+neon', '+vfpv4']}
      • ARM : Details of ARM CPU compilations.
        • NEON : NEON is an implementation of the Advanced SIMD extension used in ARMv7 processors. For example, add {'mattr': ['+neon']} to the compiler options if compiling for ARM 32-bit platform with the NEON support.
      • NVIDIA : Compilation for NVIDIA GPU supports the following compiler options.
        • gpu_code : Specifies the targeted architecture.
        • trt-ver : Specifies the TensorRT versions in x.y.z. format.
        • cuda-ver : Specifies the CUDA version in x.y format.

      For example, {'gpu-code': 'sm_72', 'trt-ver': '6.0.1', 'cuda-ver': '10.1'}

      • ANDROID : Compilation for the Android OS supports the following compiler options:
        • ANDROID_PLATFORM : Specifies the Android API levels. Available levels range from 21 to 29. For example, {'ANDROID_PLATFORM': 28} .
        • mattr : Add {'mattr': ['+neon']} to compiler options if compiling for ARM 32-bit platform with NEON support.
      • INFERENTIA : Compilation for target ml_inf1 uses compiler options passed in as a JSON string. For example, "CompilerOptions": "\"--verbose 1 --num-neuroncores 2 -O2\"" . For information about supported compiler options, see Neuron Compiler CLI .
      • CoreML : Compilation for the CoreML OutputConfig$TargetDevice supports the following compiler options:
        • class_labels : Specifies the classification labels file name inside input tar.gz file. For example, {"class_labels": "imagenet_labels_1000.txt"} . Labels inside the txt file should be separated by newlines.
    • KmsKeyId (string) --

      The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume after compilation job. If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account

      The KmsKeyId can be any of the following formats:

      • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
      • Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
      • Alias name: alias/ExampleAlias
      • Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias
  • StoppingCondition (dict) --

    [REQUIRED]

    Specifies a limit to how long a model compilation job can run. When the job reaches the time limit, Amazon SageMaker ends the compilation job. Use this API to cap model training costs.

    • MaxRuntimeInSeconds (integer) --

      The maximum length of time, in seconds, that the training or compilation job can run. If job does not complete during this time, Amazon SageMaker ends the job. If value is not specified, default value is 1 day. The maximum value is 28 days.

    • MaxWaitTimeInSeconds (integer) --

      The maximum length of time, in seconds, how long you are willing to wait for a managed spot training job to complete. It is the amount of time spent waiting for Spot capacity plus the amount of time the training job runs. It must be equal to or greater than MaxRuntimeInSeconds .

  • Tags (list) --

    An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging AWS Resources .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'CompilationJobArn': 'string'
}

Response Structure

  • (dict) --

    • CompilationJobArn (string) --

      If the action is successful, the service sends back an HTTP 200 response. Amazon SageMaker returns the following data in JSON format:

      • CompilationJobArn : The Amazon Resource Name (ARN) of the compiled job.

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_context(**kwargs)

Creates a context . A context is a lineage tracking entity that represents a logical grouping of other tracking or experiment entities. Some examples are an endpoint and a model package. For more information, see Amazon SageMaker ML Lineage Tracking .

See also: AWS API Documentation

Request Syntax

response = client.create_context(
    ContextName='string',
    Source={
        'SourceUri': 'string',
        'SourceType': 'string',
        'SourceId': 'string'
    },
    ContextType='string',
    Description='string',
    Properties={
        'string': 'string'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ContextName (string) --

    [REQUIRED]

    The name of the context. Must be unique to your account in an AWS Region.

  • Source (dict) --

    [REQUIRED]

    The source type, ID, and URI.

    • SourceUri (string) -- [REQUIRED]

      The URI of the source.

    • SourceType (string) --

      The type of the source.

    • SourceId (string) --

      The ID of the source.

  • ContextType (string) --

    [REQUIRED]

    The context type.

  • Description (string) -- The description of the context.
  • Properties (dict) --

    A list of properties to add to the context.

    • (string) --
      • (string) --
  • Tags (list) --

    A list of tags to apply to the context.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'ContextArn': 'string'
}

Response Structure

  • (dict) --

    • ContextArn (string) --

      The Amazon Resource Name (ARN) of the context.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_domain(**kwargs)

Creates a Domain used by Amazon SageMaker Studio. A domain consists of an associated Amazon Elastic File System (EFS) volume, a list of authorized users, and a variety of security, application, policy, and Amazon Virtual Private Cloud (VPC) configurations. An AWS account is limited to one domain per region. Users within a domain can share notebook files and other artifacts with each other.

EFS storage

When a domain is created, an EFS volume is created for use by all of the users within the domain. Each user receives a private home directory within the EFS volume for notebooks, Git repositories, and data files.

SageMaker uses the AWS Key Management Service (AWS KMS) to encrypt the EFS volume attached to the domain with an AWS managed customer master key (CMK) by default. For more control, you can specify a customer managed CMK. For more information, see Protect Data at Rest Using Encryption .

VPC configuration

All SageMaker Studio traffic between the domain and the EFS volume is through the specified VPC and subnets. For other Studio traffic, you can specify the AppNetworkAccessType parameter. AppNetworkAccessType corresponds to the network access type that you choose when you onboard to Studio. The following options are available:

  • PublicInternetOnly - Non-EFS traffic goes through a VPC managed by Amazon SageMaker, which allows internet access. This is the default value.
  • VpcOnly - All Studio traffic is through the specified VPC and subnets. Internet access is disabled by default. To allow internet access, you must specify a NAT gateway. When internet access is disabled, you won't be able to run a Studio notebook or to train or host models unless your VPC has an interface endpoint to the SageMaker API and runtime or a NAT gateway and your security groups allow outbound connections.

For more information, see Connect SageMaker Studio Notebooks to Resources in a VPC .

See also: AWS API Documentation

Request Syntax

response = client.create_domain(
    DomainName='string',
    AuthMode='SSO'|'IAM',
    DefaultUserSettings={
        'ExecutionRole': 'string',
        'SecurityGroups': [
            'string',
        ],
        'SharingSettings': {
            'NotebookOutputOption': 'Allowed'|'Disabled',
            'S3OutputPath': 'string',
            'S3KmsKeyId': 'string'
        },
        'JupyterServerAppSettings': {
            'DefaultResourceSpec': {
                'SageMakerImageArn': 'string',
                'SageMakerImageVersionArn': 'string',
                'InstanceType': 'system'|'ml.t3.micro'|'ml.t3.small'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.8xlarge'|'ml.m5.12xlarge'|'ml.m5.16xlarge'|'ml.m5.24xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.12xlarge'|'ml.c5.18xlarge'|'ml.c5.24xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'
            }
        },
        'KernelGatewayAppSettings': {
            'DefaultResourceSpec': {
                'SageMakerImageArn': 'string',
                'SageMakerImageVersionArn': 'string',
                'InstanceType': 'system'|'ml.t3.micro'|'ml.t3.small'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.8xlarge'|'ml.m5.12xlarge'|'ml.m5.16xlarge'|'ml.m5.24xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.12xlarge'|'ml.c5.18xlarge'|'ml.c5.24xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'
            },
            'CustomImages': [
                {
                    'ImageName': 'string',
                    'ImageVersionNumber': 123,
                    'AppImageConfigName': 'string'
                },
            ]
        },
        'TensorBoardAppSettings': {
            'DefaultResourceSpec': {
                'SageMakerImageArn': 'string',
                'SageMakerImageVersionArn': 'string',
                'InstanceType': 'system'|'ml.t3.micro'|'ml.t3.small'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.8xlarge'|'ml.m5.12xlarge'|'ml.m5.16xlarge'|'ml.m5.24xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.12xlarge'|'ml.c5.18xlarge'|'ml.c5.24xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'
            }
        }
    },
    SubnetIds=[
        'string',
    ],
    VpcId='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    AppNetworkAccessType='PublicInternetOnly'|'VpcOnly',
    HomeEfsFileSystemKmsKeyId='string',
    KmsKeyId='string'
)
Parameters
  • DomainName (string) --

    [REQUIRED]

    A name for the domain.

  • AuthMode (string) --

    [REQUIRED]

    The mode of authentication that members use to access the domain.

  • DefaultUserSettings (dict) --

    [REQUIRED]

    The default user settings.

    • ExecutionRole (string) --

      The execution role for the user.

    • SecurityGroups (list) --

      The security groups for the Amazon Virtual Private Cloud (VPC) that Studio uses for communication.

      Optional when the CreateDomain.AppNetworkAccessType parameter is set to PublicInternetOnly .

      Required when the CreateDomain.AppNetworkAccessType parameter is set to VpcOnly .

      • (string) --
    • SharingSettings (dict) --

      The sharing settings.

      • NotebookOutputOption (string) --

        Whether to include the notebook cell output when sharing the notebook. The default is Disabled .

      • S3OutputPath (string) --

        When NotebookOutputOption is Allowed , the Amazon S3 bucket used to save the notebook cell output.

      • S3KmsKeyId (string) --

        When NotebookOutputOption is Allowed , the AWS Key Management Service (KMS) encryption key ID used to encrypt the notebook cell output in the Amazon S3 bucket.

    • JupyterServerAppSettings (dict) --

      The Jupyter server's app settings.

      • DefaultResourceSpec (dict) --

        The default instance type and the Amazon Resource Name (ARN) of the default SageMaker image used by the JupyterServer app.

        • SageMakerImageArn (string) --

          The ARN of the SageMaker image that the image version belongs to.

        • SageMakerImageVersionArn (string) --

          The ARN of the image version created on the instance.

        • InstanceType (string) --

          The instance type that the image version runs on.

    • KernelGatewayAppSettings (dict) --

      The kernel gateway app settings.

      • DefaultResourceSpec (dict) --

        The default instance type and the Amazon Resource Name (ARN) of the default SageMaker image used by the KernelGateway app.

        • SageMakerImageArn (string) --

          The ARN of the SageMaker image that the image version belongs to.

        • SageMakerImageVersionArn (string) --

          The ARN of the image version created on the instance.

        • InstanceType (string) --

          The instance type that the image version runs on.

      • CustomImages (list) --

        A list of custom SageMaker images that are configured to run as a KernelGateway app.

        • (dict) --

          A custom SageMaker image. For more information, see Bring your own SageMaker image .

          • ImageName (string) -- [REQUIRED]

            The name of the CustomImage. Must be unique to your account.

          • ImageVersionNumber (integer) --

            The version number of the CustomImage.

          • AppImageConfigName (string) -- [REQUIRED]

            The name of the AppImageConfig.

    • TensorBoardAppSettings (dict) --

      The TensorBoard app settings.

      • DefaultResourceSpec (dict) --

        The default instance type and the Amazon Resource Name (ARN) of the SageMaker image created on the instance.

        • SageMakerImageArn (string) --

          The ARN of the SageMaker image that the image version belongs to.

        • SageMakerImageVersionArn (string) --

          The ARN of the image version created on the instance.

        • InstanceType (string) --

          The instance type that the image version runs on.

  • SubnetIds (list) --

    [REQUIRED]

    The VPC subnets that Studio uses for communication.

    • (string) --
  • VpcId (string) --

    [REQUIRED]

    The ID of the Amazon Virtual Private Cloud (VPC) that Studio uses for communication.

  • Tags (list) --

    Tags to associated with the Domain. Each tag consists of a key and an optional value. Tag keys must be unique per resource. Tags are searchable using the Search API.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

  • AppNetworkAccessType (string) --

    Specifies the VPC used for non-EFS traffic. The default value is PublicInternetOnly .

    • PublicInternetOnly - Non-EFS traffic is through a VPC managed by Amazon SageMaker, which allows direct internet access
    • VpcOnly - All Studio traffic is through the specified VPC and subnets
  • HomeEfsFileSystemKmsKeyId (string) -- This member is deprecated and replaced with KmsKeyId .
  • KmsKeyId (string) -- SageMaker uses AWS KMS to encrypt the EFS volume attached to the domain with an AWS managed customer master key (CMK) by default. For more control, specify a customer managed CMK.
Return type

dict

Returns

Response Syntax

{
    'DomainArn': 'string',
    'Url': 'string'
}

Response Structure

  • (dict) --

    • DomainArn (string) --

      The Amazon Resource Name (ARN) of the created domain.

    • Url (string) --

      The URL to the created domain.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
  • SageMaker.Client.exceptions.ResourceInUse
create_endpoint(**kwargs)

Creates an endpoint using the endpoint configuration specified in the request. Amazon SageMaker uses the endpoint to provision resources and deploy models. You create the endpoint configuration with the CreateEndpointConfig API.

Use this API to deploy models using Amazon SageMaker hosting services.

For an example that calls this method when deploying a model to Amazon SageMaker hosting services, see Deploy the Model to Amazon SageMaker Hosting Services (AWS SDK for Python (Boto 3)).

Note

You must not delete an EndpointConfig that is in use by an endpoint that is live or while the UpdateEndpoint or CreateEndpoint operations are being performed on the endpoint. To update an endpoint, you must create a new EndpointConfig .

The endpoint name must be unique within an AWS Region in your AWS account.

When it receives the request, Amazon SageMaker creates the endpoint, launches the resources (ML compute instances), and deploys the model(s) on them.

Note

When you call CreateEndpoint , a load call is made to DynamoDB to verify that your endpoint configuration exists. When you read data from a DynamoDB table supporting ` Eventually Consistent Reads https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html`__ , the response might not reflect the results of a recently completed write operation. The response might include some stale data. If the dependent entities are not yet in DynamoDB, this causes a validation error. If you repeat your read request after a short time, the response should return the latest data. So retry logic is recommended to handle these possible issues. We also recommend that customers call DescribeEndpointConfig before calling CreateEndpoint to minimize the potential impact of a DynamoDB eventually consistent read.

When Amazon SageMaker receives the request, it sets the endpoint status to Creating . After it creates the endpoint, it sets the status to InService . Amazon SageMaker can then process incoming requests for inferences. To check the status of an endpoint, use the DescribeEndpoint API.

If any of the models hosted at this endpoint get model data from an Amazon S3 location, Amazon SageMaker uses AWS Security Token Service to download model artifacts from the S3 path you provided. AWS STS is activated in your IAM user account by default. If you previously deactivated AWS STS for a region, you need to reactivate AWS STS for that region. For more information, see Activating and Deactivating AWS STS in an AWS Region in the AWS Identity and Access Management User Guide .

Note

To add the IAM role policies for using this API operation, go to the IAM console , and choose Roles in the left navigation pane. Search the IAM role that you want to grant access to use the CreateEndpoint and CreateEndpointConfig API operations, add the following policies to the role.

  • Option 1: For a full Amazon SageMaker access, search and attach the AmazonSageMakerFullAccess policy.
  • Option 2: For granting a limited access to an IAM role, paste the following Action elements manually into the JSON file of the IAM role: "Action": ["sagemaker:CreateEndpoint", "sagemaker:CreateEndpointConfig"] "Resource": [ "arn:aws:sagemaker:region:account-id:endpoint/endpointName" "arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName" ] For more information, see Amazon SageMaker API Permissions: Actions, Permissions, and Resources Reference .

See also: AWS API Documentation

Request Syntax

response = client.create_endpoint(
    EndpointName='string',
    EndpointConfigName='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • EndpointName (string) --

    [REQUIRED]

    The name of the endpoint.The name must be unique within an AWS Region in your AWS account. The name is case-insensitive in CreateEndpoint , but the case is preserved and must be matched in .

  • EndpointConfigName (string) --

    [REQUIRED]

    The name of an endpoint configuration. For more information, see CreateEndpointConfig .

  • Tags (list) --

    An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging AWS Resources .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'EndpointArn': 'string'
}

Response Structure

  • (dict) --

    • EndpointArn (string) --

      The Amazon Resource Name (ARN) of the endpoint.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_endpoint_config(**kwargs)

Creates an endpoint configuration that Amazon SageMaker hosting services uses to deploy models. In the configuration, you identify one or more models, created using the CreateModel API, to deploy and the resources that you want Amazon SageMaker to provision. Then you call the CreateEndpoint API.

Note

Use this API if you want to use Amazon SageMaker hosting services to deploy models into production.

In the request, you define a ProductionVariant , for each model that you want to deploy. Each ProductionVariant parameter also describes the resources that you want Amazon SageMaker to provision. This includes the number and type of ML compute instances to deploy.

If you are hosting multiple models, you also assign a VariantWeight to specify how much traffic you want to allocate to each model. For example, suppose that you want to host two models, A and B, and you assign traffic weight 2 for model A and 1 for model B. Amazon SageMaker distributes two-thirds of the traffic to Model A, and one-third to model B.

For an example that calls this method when deploying a model to Amazon SageMaker hosting services, see Deploy the Model to Amazon SageMaker Hosting Services (AWS SDK for Python (Boto 3)).

Note

When you call CreateEndpoint , a load call is made to DynamoDB to verify that your endpoint configuration exists. When you read data from a DynamoDB table supporting ` Eventually Consistent Reads https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html`__ , the response might not reflect the results of a recently completed write operation. The response might include some stale data. If the dependent entities are not yet in DynamoDB, this causes a validation error. If you repeat your read request after a short time, the response should return the latest data. So retry logic is recommended to handle these possible issues. We also recommend that customers call DescribeEndpointConfig before calling CreateEndpoint to minimize the potential impact of a DynamoDB eventually consistent read.

See also: AWS API Documentation

Request Syntax

response = client.create_endpoint_config(
    EndpointConfigName='string',
    ProductionVariants=[
        {
            'VariantName': 'string',
            'ModelName': 'string',
            'InitialInstanceCount': 123,
            'InstanceType': 'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.12xlarge'|'ml.m5d.24xlarge'|'ml.c4.large'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.large'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.12xlarge'|'ml.r5.24xlarge'|'ml.r5d.large'|'ml.r5d.xlarge'|'ml.r5d.2xlarge'|'ml.r5d.4xlarge'|'ml.r5d.12xlarge'|'ml.r5d.24xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge',
            'InitialVariantWeight': ...,
            'AcceleratorType': 'ml.eia1.medium'|'ml.eia1.large'|'ml.eia1.xlarge'|'ml.eia2.medium'|'ml.eia2.large'|'ml.eia2.xlarge'
        },
    ],
    DataCaptureConfig={
        'EnableCapture': True|False,
        'InitialSamplingPercentage': 123,
        'DestinationS3Uri': 'string',
        'KmsKeyId': 'string',
        'CaptureOptions': [
            {
                'CaptureMode': 'Input'|'Output'
            },
        ],
        'CaptureContentTypeHeader': {
            'CsvContentTypes': [
                'string',
            ],
            'JsonContentTypes': [
                'string',
            ]
        }
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    KmsKeyId='string'
)
Parameters
  • EndpointConfigName (string) --

    [REQUIRED]

    The name of the endpoint configuration. You specify this name in a CreateEndpoint request.

  • ProductionVariants (list) --

    [REQUIRED]

    An list of ProductionVariant objects, one for each model that you want to host at this endpoint.

    • (dict) --

      Identifies a model that you want to host and the resources to deploy for hosting it. If you are deploying multiple models, tell Amazon SageMaker how to distribute traffic among the models by specifying variant weights.

      • VariantName (string) -- [REQUIRED]

        The name of the production variant.

      • ModelName (string) -- [REQUIRED]

        The name of the model that you want to host. This is the name that you specified when creating the model.

      • InitialInstanceCount (integer) -- [REQUIRED]

        Number of instances to launch initially.

      • InstanceType (string) -- [REQUIRED]

        The ML compute instance type.

      • InitialVariantWeight (float) --

        Determines initial traffic distribution among all of the models that you specify in the endpoint configuration. The traffic to a production variant is determined by the ratio of the VariantWeight to the sum of all VariantWeight values across all ProductionVariants. If unspecified, it defaults to 1.0.

      • AcceleratorType (string) --

        The size of the Elastic Inference (EI) instance to use for the production variant. EI instances provide on-demand GPU computing for inference. For more information, see Using Elastic Inference in Amazon SageMaker .

  • DataCaptureConfig (dict) --
    • EnableCapture (boolean) --
    • InitialSamplingPercentage (integer) -- [REQUIRED]
    • DestinationS3Uri (string) -- [REQUIRED]
    • KmsKeyId (string) --
    • CaptureOptions (list) -- [REQUIRED]
      • (dict) --
        • CaptureMode (string) -- [REQUIRED]
    • CaptureContentTypeHeader (dict) --
      • CsvContentTypes (list) --
        • (string) --
      • JsonContentTypes (list) --
        • (string) --
  • Tags (list) --

    An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging AWS Resources .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

  • KmsKeyId (string) --

    The Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.

    The KmsKeyId can be any of the following formats:

    • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
    • Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
    • Alias name: alias/ExampleAlias
    • Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias

    The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint , UpdateEndpoint requests. For more information, refer to the AWS Key Management Service section`Using Key Policies in AWS KMS <https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html>`__

    Note

    Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a KmsKeyId when using an instance type with local storage. If any of the models that you specify in the ProductionVariants parameter use nitro-based instances with local storage, do not specify a value for the KmsKeyId parameter. If you specify a value for KmsKeyId when using any nitro-based instances with local storage, the call to CreateEndpointConfig fails.

    For a list of instance types that support local instance storage, see Instance Store Volumes .

    For more information about local instance storage encryption, see SSD Instance Store Volumes .

Return type

dict

Returns

Response Syntax

{
    'EndpointConfigArn': 'string'
}

Response Structure

  • (dict) --

    • EndpointConfigArn (string) --

      The Amazon Resource Name (ARN) of the endpoint configuration.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_experiment(**kwargs)

Creates an SageMaker experiment . An experiment is a collection of trials that are observed, compared and evaluated as a group. A trial is a set of steps, called trial components , that produce a machine learning model.

The goal of an experiment is to determine the components that produce the best model. Multiple trials are performed, each one isolating and measuring the impact of a change to one or more inputs, while keeping the remaining inputs constant.

When you use Amazon SageMaker Studio or the Amazon SageMaker Python SDK, all experiments, trials, and trial components are automatically tracked, logged, and indexed. When you use the AWS SDK for Python (Boto), you must use the logging APIs provided by the SDK.

You can add tags to experiments, trials, trial components and then use the Search API to search for the tags.

To add a description to an experiment, specify the optional Description parameter. To add a description later, or to change the description, call the UpdateExperiment API.

To get a list of all your experiments, call the ListExperiments API. To view an experiment's properties, call the DescribeExperiment API. To get a list of all the trials associated with an experiment, call the ListTrials API. To create a trial call the CreateTrial API.

See also: AWS API Documentation

Request Syntax

response = client.create_experiment(
    ExperimentName='string',
    DisplayName='string',
    Description='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ExperimentName (string) --

    [REQUIRED]

    The name of the experiment. The name must be unique in your AWS account and is not case-sensitive.

  • DisplayName (string) -- The name of the experiment as displayed. The name doesn't need to be unique. If you don't specify DisplayName , the value in ExperimentName is displayed.
  • Description (string) -- The description of the experiment.
  • Tags (list) --

    A list of tags to associate with the experiment. You can use Search API to search on the tags.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'ExperimentArn': 'string'
}

Response Structure

  • (dict) --

    • ExperimentArn (string) --

      The Amazon Resource Name (ARN) of the experiment.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_feature_group(**kwargs)

Create a new FeatureGroup . A FeatureGroup is a group of Features defined in the FeatureStore to describe a Record .

The FeatureGroup defines the schema and features contained in the FeatureGroup. A FeatureGroup definition is composed of a list of Features , a RecordIdentifierFeatureName , an EventTimeFeatureName and configurations for its OnlineStore and OfflineStore . Check AWS service quotas to see the FeatureGroup s quota for your AWS account.

Warning

You must include at least one of OnlineStoreConfig and OfflineStoreConfig to create a FeatureGroup .

See also: AWS API Documentation

Request Syntax

response = client.create_feature_group(
    FeatureGroupName='string',
    RecordIdentifierFeatureName='string',
    EventTimeFeatureName='string',
    FeatureDefinitions=[
        {
            'FeatureName': 'string',
            'FeatureType': 'Integral'|'Fractional'|'String'
        },
    ],
    OnlineStoreConfig={
        'SecurityConfig': {
            'KmsKeyId': 'string'
        },
        'EnableOnlineStore': True|False
    },
    OfflineStoreConfig={
        'S3StorageConfig': {
            'S3Uri': 'string',
            'KmsKeyId': 'string'
        },
        'DisableGlueTableCreation': True|False,
        'DataCatalogConfig': {
            'TableName': 'string',
            'Catalog': 'string',
            'Database': 'string'
        }
    },
    RoleArn='string',
    Description='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • FeatureGroupName (string) --

    [REQUIRED]

    The name of the FeatureGroup . The name must be unique within an AWS Region in an AWS account. The name:

    • Must start and end with an alphanumeric character.
    • Can only contain alphanumeric character and hyphens. Spaces are not allowed.
  • RecordIdentifierFeatureName (string) --

    [REQUIRED]

    The name of the Feature whose value uniquely identifies a Record defined in the FeatureStore . Only the latest record per identifier value will be stored in the OnlineStore . RecordIdentifierFeatureName must be one of feature definitions' names.

    You use the RecordIdentifierFeatureName to access data in a FeatureStore .

    This name:

    • Must start and end with an alphanumeric character.
    • Can only contains alphanumeric characters, hyphens, underscores. Spaces are not allowed.
  • EventTimeFeatureName (string) --

    [REQUIRED]

    The name of the feature that stores the EventTime of a Record in a FeatureGroup .

    An EventTime is a point in time when a new event occurs that corresponds to the creation or update of a Record in a FeatureGroup . All Records in the FeatureGroup must have a corresponding EventTime .

    An EventTime can be a String or Fractional .

    • Fractional : EventTime feature values must be a Unix timestamp in seconds.
    • String : EventTime feature values must be an ISO-8601 string in the format. The following formats are supported yyyy-MM-dd'T'HH:mm:ssZ and yyyy-MM-dd'T'HH:mm:ss.SSSZ where yyyy , MM , and dd represent the year, month, and day respectively and HH , mm , ss , and if applicable, SSS represent the hour, month, second and milliseconds respsectively. 'T' and Z are constants.
  • FeatureDefinitions (list) --

    [REQUIRED]

    A list of Feature names and types. Name and Type is compulsory per Feature .

    Valid feature FeatureType s are Integral , Fractional and String .

    FeatureName s cannot be any of the following: is_deleted , write_time , api_invocation_time

    You can create up to 2,500 FeatureDefinition s per FeatureGroup .

    • (dict) --

      A list of features. You must include FeatureName and FeatureType . Valid feature FeatureType s are Integral , Fractional and String .

      • FeatureName (string) --

        The name of a feature. The type must be a string. FeatureName cannot be any of the following: is_deleted , write_time , api_invocation_time .

      • FeatureType (string) --

        The value type of a feature. Valid values are Integral, Fractional, or String.

  • OnlineStoreConfig (dict) --

    You can turn the OnlineStore on or off by specifying True for the EnableOnlineStore flag in OnlineStoreConfig ; the default value is False .

    You can also include an AWS KMS key ID (KMSKeyId ) for at-rest encryption of the OnlineStore .

    • SecurityConfig (dict) --

      Use to specify KMS Key ID (KMSKeyId ) for at-rest encryption of your OnlineStore .

      • KmsKeyId (string) --

        The ID of the AWS Key Management Service (AWS KMS) key that SageMaker Feature Store uses to encrypt the Amazon S3 objects at rest using Amazon S3 server-side encryption.

        The caller (either IAM user or IAM role) of CreateFeatureGroup must have below permissions to the OnlineStore KmsKeyId :

        • "kms:Encrypt"
        • "kms:Decrypt"
        • "kms:DescribeKey"
        • "kms:CreateGrant"
        • "kms:RetireGrant"
        • "kms:ReEncryptFrom"
        • "kms:ReEncryptTo"
        • "kms:GenerateDataKey"
        • "kms:ListAliases"
        • "kms:ListGrants"
        • "kms:RevokeGrant"

        The caller (either IAM user or IAM role) to all DataPlane operations (PutRecord , GetRecord , DeleteRecord ) must have the following permissions to the KmsKeyId :

        • "kms:Decrypt"
    • EnableOnlineStore (boolean) --

      Turn OnlineStore off by specifying False for the EnableOnlineStore flag. Turn OnlineStore on by specifying True for the EnableOnlineStore flag.

      The default value is False .

  • OfflineStoreConfig (dict) --

    Use this to configure an OfflineFeatureStore . This parameter allows you to specify:

    • The Amazon Simple Storage Service (Amazon S3) location of an OfflineStore .
    • A configuration for an AWS Glue or AWS Hive data cataolgue.
    • An KMS encryption key to encrypt the Amazon S3 location used for OfflineStore .

    To learn more about this parameter, see OfflineStoreConfig .

    • S3StorageConfig (dict) -- [REQUIRED]

      The Amazon Simple Storage (Amazon S3) location of OfflineStore .

      • S3Uri (string) -- [REQUIRED]

        The S3 URI, or location in Amazon S3, of OfflineStore .

        S3 URIs have a format similar to the following: s3://example-bucket/prefix/ .

      • KmsKeyId (string) --

        The AWS Key Management Service (KMS) key ID of the key used to encrypt any objects written into the OfflineStore S3 location.

        The IAM roleARN that is passed as a parameter to CreateFeatureGroup must have below permissions to the KmsKeyId :

        • "kms:GenerateDataKey"
    • DisableGlueTableCreation (boolean) --

      Set to True to disable the automatic creation of an AWS Glue table when configuring an OfflineStore .

    • DataCatalogConfig (dict) --

      The meta data of the Glue table that is autogenerated when an OfflineStore is created.

      • TableName (string) -- [REQUIRED]

        The name of the Glue table.

      • Catalog (string) -- [REQUIRED]

        The name of the Glue table catalog.

      • Database (string) -- [REQUIRED]

        The name of the Glue table database.

  • RoleArn (string) -- The Amazon Resource Name (ARN) of the IAM execution role used to persist data into the OfflineStore if an OfflineStoreConfig is provided.
  • Description (string) -- A free-form description of a FeatureGroup .
  • Tags (list) --

    Tags used to identify Features in each FeatureGroup .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'FeatureGroupArn': 'string'
}

Response Structure

  • (dict) --

    • FeatureGroupArn (string) --

      The Amazon Resource Name (ARN) of the FeatureGroup . This is a unique identifier for the feature group.

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_flow_definition(**kwargs)

Creates a flow definition.

See also: AWS API Documentation

Request Syntax

response = client.create_flow_definition(
    FlowDefinitionName='string',
    HumanLoopRequestSource={
        'AwsManagedHumanLoopRequestSource': 'AWS/Rekognition/DetectModerationLabels/Image/V3'|'AWS/Textract/AnalyzeDocument/Forms/V1'
    },
    HumanLoopActivationConfig={
        'HumanLoopActivationConditionsConfig': {
            'HumanLoopActivationConditions': 'string'
        }
    },
    HumanLoopConfig={
        'WorkteamArn': 'string',
        'HumanTaskUiArn': 'string',
        'TaskTitle': 'string',
        'TaskDescription': 'string',
        'TaskCount': 123,
        'TaskAvailabilityLifetimeInSeconds': 123,
        'TaskTimeLimitInSeconds': 123,
        'TaskKeywords': [
            'string',
        ],
        'PublicWorkforceTaskPrice': {
            'AmountInUsd': {
                'Dollars': 123,
                'Cents': 123,
                'TenthFractionsOfACent': 123
            }
        }
    },
    OutputConfig={
        'S3OutputPath': 'string',
        'KmsKeyId': 'string'
    },
    RoleArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • FlowDefinitionName (string) --

    [REQUIRED]

    The name of your flow definition.

  • HumanLoopRequestSource (dict) --

    Container for configuring the source of human task requests. Use to specify if Amazon Rekognition or Amazon Textract is used as an integration source.

    • AwsManagedHumanLoopRequestSource (string) -- [REQUIRED]

      Specifies whether Amazon Rekognition or Amazon Textract are used as the integration source. The default field settings and JSON parsing rules are different based on the integration source. Valid values:

  • HumanLoopActivationConfig (dict) --

    An object containing information about the events that trigger a human workflow.

    • HumanLoopActivationConditionsConfig (dict) -- [REQUIRED]

      Container structure for defining under what conditions SageMaker creates a human loop.

      • HumanLoopActivationConditions (string) -- [REQUIRED]

        JSON expressing use-case specific conditions declaratively. If any condition is matched, atomic tasks are created against the configured work team. The set of conditions is different for Rekognition and Textract. For more information about how to structure the JSON, see JSON Schema for Human Loop Activation Conditions in Amazon Augmented AI in the Amazon SageMaker Developer Guide .

  • HumanLoopConfig (dict) --

    [REQUIRED]

    An object containing information about the tasks the human reviewers will perform.

    • WorkteamArn (string) -- [REQUIRED]

      Amazon Resource Name (ARN) of a team of workers.

    • HumanTaskUiArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the human task user interface.

    • TaskTitle (string) -- [REQUIRED]

      A title for the human worker task.

    • TaskDescription (string) -- [REQUIRED]

      A description for the human worker task.

    • TaskCount (integer) -- [REQUIRED]

      The number of distinct workers who will perform the same task on each object. For example, if TaskCount is set to 3 for an image classification labeling job, three workers will classify each input image. Increasing TaskCount can improve label accuracy.

    • TaskAvailabilityLifetimeInSeconds (integer) --

      The length of time that a task remains available for review by human workers.

    • TaskTimeLimitInSeconds (integer) --

      The amount of time that a worker has to complete a task. The default value is 3,600 seconds (1 hour)

    • TaskKeywords (list) --

      Keywords used to describe the task so that workers can discover the task.

      • (string) --
    • PublicWorkforceTaskPrice (dict) --

      Defines the amount of money paid to an Amazon Mechanical Turk worker for each task performed.

      Use one of the following prices for bounding box tasks. Prices are in US dollars and should be based on the complexity of the task; the longer it takes in your initial testing, the more you should offer.

      • 0.036
      • 0.048
      • 0.060
      • 0.072
      • 0.120
      • 0.240
      • 0.360
      • 0.480
      • 0.600
      • 0.720
      • 0.840
      • 0.960
      • 1.080
      • 1.200

      Use one of the following prices for image classification, text classification, and custom tasks. Prices are in US dollars.

      • 0.012
      • 0.024
      • 0.036
      • 0.048
      • 0.060
      • 0.072
      • 0.120
      • 0.240
      • 0.360
      • 0.480
      • 0.600
      • 0.720
      • 0.840
      • 0.960
      • 1.080
      • 1.200

      Use one of the following prices for semantic segmentation tasks. Prices are in US dollars.

      • 0.840
      • 0.960
      • 1.080
      • 1.200

      Use one of the following prices for Textract AnalyzeDocument Important Form Key Amazon Augmented AI review tasks. Prices are in US dollars.

      • 2.400
      • 2.280
      • 2.160
      • 2.040
      • 1.920
      • 1.800
      • 1.680
      • 1.560
      • 1.440
      • 1.320
      • 1.200
      • 1.080
      • 0.960
      • 0.840
      • 0.720
      • 0.600
      • 0.480
      • 0.360
      • 0.240
      • 0.120
      • 0.072
      • 0.060
      • 0.048
      • 0.036
      • 0.024
      • 0.012

      Use one of the following prices for Rekognition DetectModerationLabels Amazon Augmented AI review tasks. Prices are in US dollars.

      • 1.200
      • 1.080
      • 0.960
      • 0.840
      • 0.720
      • 0.600
      • 0.480
      • 0.360
      • 0.240
      • 0.120
      • 0.072
      • 0.060
      • 0.048
      • 0.036
      • 0.024
      • 0.012

      Use one of the following prices for Amazon Augmented AI custom human review tasks. Prices are in US dollars.

      • 1.200
      • 1.080
      • 0.960
      • 0.840
      • 0.720
      • 0.600
      • 0.480
      • 0.360
      • 0.240
      • 0.120
      • 0.072
      • 0.060
      • 0.048
      • 0.036
      • 0.024
      • 0.012
      • AmountInUsd (dict) --

        Defines the amount of money paid to an Amazon Mechanical Turk worker in United States dollars.

        • Dollars (integer) --

          The whole number of dollars in the amount.

        • Cents (integer) --

          The fractional portion, in cents, of the amount.

        • TenthFractionsOfACent (integer) --

          Fractions of a cent, in tenths.

  • OutputConfig (dict) --

    [REQUIRED]

    An object containing information about where the human review results will be uploaded.

    • S3OutputPath (string) -- [REQUIRED]

      The Amazon S3 path where the object containing human output will be made available.

    • KmsKeyId (string) --

      The Amazon Key Management Service (KMS) key ID for server-side encryption.

  • RoleArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the role needed to call other services on your behalf. For example, arn:aws:iam::1234567890:role/service-role/AmazonSageMaker-ExecutionRole-20180111T151298 .

  • Tags (list) --

    An array of key-value pairs that contain metadata to help you categorize and organize a flow definition. Each tag consists of a key and a value, both of which you define.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'FlowDefinitionArn': 'string'
}

Response Structure

  • (dict) --

    • FlowDefinitionArn (string) --

      The Amazon Resource Name (ARN) of the flow definition you create.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
  • SageMaker.Client.exceptions.ResourceInUse
create_human_task_ui(**kwargs)

Defines the settings you will use for the human review workflow user interface. Reviewers will see a three-panel interface with an instruction area, the item to review, and an input area.

See also: AWS API Documentation

Request Syntax

response = client.create_human_task_ui(
    HumanTaskUiName='string',
    UiTemplate={
        'Content': 'string'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • HumanTaskUiName (string) --

    [REQUIRED]

    The name of the user interface you are creating.

  • UiTemplate (dict) --

    [REQUIRED]

    The Liquid template for the worker user interface.

    • Content (string) -- [REQUIRED]

      The content of the Liquid template for the worker user interface.

  • Tags (list) --

    An array of key-value pairs that contain metadata to help you categorize and organize a human review workflow user interface. Each tag consists of a key and a value, both of which you define.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'HumanTaskUiArn': 'string'
}

Response Structure

  • (dict) --

    • HumanTaskUiArn (string) --

      The Amazon Resource Name (ARN) of the human review workflow user interface you create.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
  • SageMaker.Client.exceptions.ResourceInUse
create_hyper_parameter_tuning_job(**kwargs)

Starts a hyperparameter tuning job. A hyperparameter tuning job finds the best version of a model by running many training jobs on your dataset using the algorithm you choose and values for hyperparameters within ranges that you specify. It then chooses the hyperparameter values that result in a model that performs the best, as measured by an objective metric that you choose.

See also: AWS API Documentation

Request Syntax

response = client.create_hyper_parameter_tuning_job(
    HyperParameterTuningJobName='string',
    HyperParameterTuningJobConfig={
        'Strategy': 'Bayesian'|'Random',
        'HyperParameterTuningJobObjective': {
            'Type': 'Maximize'|'Minimize',
            'MetricName': 'string'
        },
        'ResourceLimits': {
            'MaxNumberOfTrainingJobs': 123,
            'MaxParallelTrainingJobs': 123
        },
        'ParameterRanges': {
            'IntegerParameterRanges': [
                {
                    'Name': 'string',
                    'MinValue': 'string',
                    'MaxValue': 'string',
                    'ScalingType': 'Auto'|'Linear'|'Logarithmic'|'ReverseLogarithmic'
                },
            ],
            'ContinuousParameterRanges': [
                {
                    'Name': 'string',
                    'MinValue': 'string',
                    'MaxValue': 'string',
                    'ScalingType': 'Auto'|'Linear'|'Logarithmic'|'ReverseLogarithmic'
                },
            ],
            'CategoricalParameterRanges': [
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ]
        },
        'TrainingJobEarlyStoppingType': 'Off'|'Auto',
        'TuningJobCompletionCriteria': {
            'TargetObjectiveMetricValue': ...
        }
    },
    TrainingJobDefinition={
        'DefinitionName': 'string',
        'TuningObjective': {
            'Type': 'Maximize'|'Minimize',
            'MetricName': 'string'
        },
        'HyperParameterRanges': {
            'IntegerParameterRanges': [
                {
                    'Name': 'string',
                    'MinValue': 'string',
                    'MaxValue': 'string',
                    'ScalingType': 'Auto'|'Linear'|'Logarithmic'|'ReverseLogarithmic'
                },
            ],
            'ContinuousParameterRanges': [
                {
                    'Name': 'string',
                    'MinValue': 'string',
                    'MaxValue': 'string',
                    'ScalingType': 'Auto'|'Linear'|'Logarithmic'|'ReverseLogarithmic'
                },
            ],
            'CategoricalParameterRanges': [
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ]
        },
        'StaticHyperParameters': {
            'string': 'string'
        },
        'AlgorithmSpecification': {
            'TrainingImage': 'string',
            'TrainingInputMode': 'Pipe'|'File',
            'AlgorithmName': 'string',
            'MetricDefinitions': [
                {
                    'Name': 'string',
                    'Regex': 'string'
                },
            ]
        },
        'RoleArn': 'string',
        'InputDataConfig': [
            {
                'ChannelName': 'string',
                'DataSource': {
                    'S3DataSource': {
                        'S3DataType': 'ManifestFile'|'S3Prefix'|'AugmentedManifestFile',
                        'S3Uri': 'string',
                        'S3DataDistributionType': 'FullyReplicated'|'ShardedByS3Key',
                        'AttributeNames': [
                            'string',
                        ]
                    },
                    'FileSystemDataSource': {
                        'FileSystemId': 'string',
                        'FileSystemAccessMode': 'rw'|'ro',
                        'FileSystemType': 'EFS'|'FSxLustre',
                        'DirectoryPath': 'string'
                    }
                },
                'ContentType': 'string',
                'CompressionType': 'None'|'Gzip',
                'RecordWrapperType': 'None'|'RecordIO',
                'InputMode': 'Pipe'|'File',
                'ShuffleConfig': {
                    'Seed': 123
                }
            },
        ],
        'VpcConfig': {
            'SecurityGroupIds': [
                'string',
            ],
            'Subnets': [
                'string',
            ]
        },
        'OutputDataConfig': {
            'KmsKeyId': 'string',
            'S3OutputPath': 'string'
        },
        'ResourceConfig': {
            'InstanceType': 'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.p4d.24xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5n.xlarge'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge',
            'InstanceCount': 123,
            'VolumeSizeInGB': 123,
            'VolumeKmsKeyId': 'string'
        },
        'StoppingCondition': {
            'MaxRuntimeInSeconds': 123,
            'MaxWaitTimeInSeconds': 123
        },
        'EnableNetworkIsolation': True|False,
        'EnableInterContainerTrafficEncryption': True|False,
        'EnableManagedSpotTraining': True|False,
        'CheckpointConfig': {
            'S3Uri': 'string',
            'LocalPath': 'string'
        }
    },
    TrainingJobDefinitions=[
        {
            'DefinitionName': 'string',
            'TuningObjective': {
                'Type': 'Maximize'|'Minimize',
                'MetricName': 'string'
            },
            'HyperParameterRanges': {
                'IntegerParameterRanges': [
                    {
                        'Name': 'string',
                        'MinValue': 'string',
                        'MaxValue': 'string',
                        'ScalingType': 'Auto'|'Linear'|'Logarithmic'|'ReverseLogarithmic'
                    },
                ],
                'ContinuousParameterRanges': [
                    {
                        'Name': 'string',
                        'MinValue': 'string',
                        'MaxValue': 'string',
                        'ScalingType': 'Auto'|'Linear'|'Logarithmic'|'ReverseLogarithmic'
                    },
                ],
                'CategoricalParameterRanges': [
                    {
                        'Name': 'string',
                        'Values': [
                            'string',
                        ]
                    },
                ]
            },
            'StaticHyperParameters': {
                'string': 'string'
            },
            'AlgorithmSpecification': {
                'TrainingImage': 'string',
                'TrainingInputMode': 'Pipe'|'File',
                'AlgorithmName': 'string',
                'MetricDefinitions': [
                    {
                        'Name': 'string',
                        'Regex': 'string'
                    },
                ]
            },
            'RoleArn': 'string',
            'InputDataConfig': [
                {
                    'ChannelName': 'string',
                    'DataSource': {
                        'S3DataSource': {
                            'S3DataType': 'ManifestFile'|'S3Prefix'|'AugmentedManifestFile',
                            'S3Uri': 'string',
                            'S3DataDistributionType': 'FullyReplicated'|'ShardedByS3Key',
                            'AttributeNames': [
                                'string',
                            ]
                        },
                        'FileSystemDataSource': {
                            'FileSystemId': 'string',
                            'FileSystemAccessMode': 'rw'|'ro',
                            'FileSystemType': 'EFS'|'FSxLustre',
                            'DirectoryPath': 'string'
                        }
                    },
                    'ContentType': 'string',
                    'CompressionType': 'None'|'Gzip',
                    'RecordWrapperType': 'None'|'RecordIO',
                    'InputMode': 'Pipe'|'File',
                    'ShuffleConfig': {
                        'Seed': 123
                    }
                },
            ],
            'VpcConfig': {
                'SecurityGroupIds': [
                    'string',
                ],
                'Subnets': [
                    'string',
                ]
            },
            'OutputDataConfig': {
                'KmsKeyId': 'string',
                'S3OutputPath': 'string'
            },
            'ResourceConfig': {
                'InstanceType': 'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.p4d.24xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5n.xlarge'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge',
                'InstanceCount': 123,
                'VolumeSizeInGB': 123,
                'VolumeKmsKeyId': 'string'
            },
            'StoppingCondition': {
                'MaxRuntimeInSeconds': 123,
                'MaxWaitTimeInSeconds': 123
            },
            'EnableNetworkIsolation': True|False,
            'EnableInterContainerTrafficEncryption': True|False,
            'EnableManagedSpotTraining': True|False,
            'CheckpointConfig': {
                'S3Uri': 'string',
                'LocalPath': 'string'
            }
        },
    ],
    WarmStartConfig={
        'ParentHyperParameterTuningJobs': [
            {
                'HyperParameterTuningJobName': 'string'
            },
        ],
        'WarmStartType': 'IdenticalDataAndAlgorithm'|'TransferLearning'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • HyperParameterTuningJobName (string) --

    [REQUIRED]

    The name of the tuning job. This name is the prefix for the names of all training jobs that this tuning job launches. The name must be unique within the same AWS account and AWS Region. The name must have 1 to 32 characters. Valid characters are a-z, A-Z, 0-9, and : + = @ _ % - (hyphen). The name is not case sensitive.

  • HyperParameterTuningJobConfig (dict) --

    [REQUIRED]

    The HyperParameterTuningJobConfig object that describes the tuning job, including the search strategy, the objective metric used to evaluate training jobs, ranges of parameters to search, and resource limits for the tuning job. For more information, see How Hyperparameter Tuning Works .

    • Strategy (string) -- [REQUIRED]

      Specifies how hyperparameter tuning chooses the combinations of hyperparameter values to use for the training job it launches. To use the Bayesian search strategy, set this to Bayesian . To randomly search, set it to Random . For information about search strategies, see How Hyperparameter Tuning Works .

    • HyperParameterTuningJobObjective (dict) --

      The HyperParameterTuningJobObjective object that specifies the objective metric for this tuning job.

      • Type (string) -- [REQUIRED]

        Whether to minimize or maximize the objective metric.

      • MetricName (string) -- [REQUIRED]

        The name of the metric to use for the objective metric.

    • ResourceLimits (dict) -- [REQUIRED]

      The ResourceLimits object that specifies the maximum number of training jobs and parallel training jobs for this tuning job.

      • MaxNumberOfTrainingJobs (integer) -- [REQUIRED]

        The maximum number of training jobs that a hyperparameter tuning job can launch.

      • MaxParallelTrainingJobs (integer) -- [REQUIRED]

        The maximum number of concurrent training jobs that a hyperparameter tuning job can launch.

    • ParameterRanges (dict) --

      The ParameterRanges object that specifies the ranges of hyperparameters that this tuning job searches.

      • IntegerParameterRanges (list) --

        The array of IntegerParameterRange objects that specify ranges of integer hyperparameters that a hyperparameter tuning job searches.

        • (dict) --

          For a hyperparameter of the integer type, specifies the range that a hyperparameter tuning job searches.

          • Name (string) -- [REQUIRED]

            The name of the hyperparameter to search.

          • MinValue (string) -- [REQUIRED]

            The minimum value of the hyperparameter to search.

          • MaxValue (string) -- [REQUIRED]

            The maximum value of the hyperparameter to search.

          • ScalingType (string) --

            The scale that hyperparameter tuning uses to search the hyperparameter range. For information about choosing a hyperparameter scale, see Hyperparameter Scaling . One of the following values:

            Auto

            Amazon SageMaker hyperparameter tuning chooses the best scale for the hyperparameter.

            Linear

            Hyperparameter tuning searches the values in the hyperparameter range by using a linear scale.

            Logarithmic

            Hyperparameter tuning searches the values in the hyperparameter range by using a logarithmic scale.

            Logarithmic scaling works only for ranges that have only values greater than 0.

      • ContinuousParameterRanges (list) --

        The array of ContinuousParameterRange objects that specify ranges of continuous hyperparameters that a hyperparameter tuning job searches.

        • (dict) --

          A list of continuous hyperparameters to tune.

          • Name (string) -- [REQUIRED]

            The name of the continuous hyperparameter to tune.

          • MinValue (string) -- [REQUIRED]

            The minimum value for the hyperparameter. The tuning job uses floating-point values between this value and MaxValue for tuning.

          • MaxValue (string) -- [REQUIRED]

            The maximum value for the hyperparameter. The tuning job uses floating-point values between MinValue value and this value for tuning.

          • ScalingType (string) --

            The scale that hyperparameter tuning uses to search the hyperparameter range. For information about choosing a hyperparameter scale, see Hyperparameter Scaling . One of the following values:

            Auto

            Amazon SageMaker hyperparameter tuning chooses the best scale for the hyperparameter.

            Linear

            Hyperparameter tuning searches the values in the hyperparameter range by using a linear scale.

            Logarithmic

            Hyperparameter tuning searches the values in the hyperparameter range by using a logarithmic scale.

            Logarithmic scaling works only for ranges that have only values greater than 0.

            ReverseLogarithmic

            Hyperparameter tuning searches the values in the hyperparameter range by using a reverse logarithmic scale.

            Reverse logarithmic scaling works only for ranges that are entirely within the range 0<=x<1.0.

      • CategoricalParameterRanges (list) --

        The array of CategoricalParameterRange objects that specify ranges of categorical hyperparameters that a hyperparameter tuning job searches.

        • (dict) --

          A list of categorical hyperparameters to tune.

          • Name (string) -- [REQUIRED]

            The name of the categorical hyperparameter to tune.

          • Values (list) -- [REQUIRED]

            A list of the categories for the hyperparameter.

            • (string) --
    • TrainingJobEarlyStoppingType (string) --

      Specifies whether to use early stopping for training jobs launched by the hyperparameter tuning job. This can be one of the following values (the default value is OFF ):

      OFF

      Training jobs launched by the hyperparameter tuning job do not use early stopping.

      AUTO

      Amazon SageMaker stops training jobs launched by the hyperparameter tuning job when they are unlikely to perform better than previously completed training jobs. For more information, see Stop Training Jobs Early .

    • TuningJobCompletionCriteria (dict) --

      The tuning job's completion criteria.

      • TargetObjectiveMetricValue (float) -- [REQUIRED]

        The value of the objective metric.

  • TrainingJobDefinition (dict) --

    The HyperParameterTrainingJobDefinition object that describes the training jobs that this tuning job launches, including static hyperparameters, input data configuration, output data configuration, resource configuration, and stopping condition.

    • DefinitionName (string) --

      The job definition name.

    • TuningObjective (dict) --

      Defines the objective metric for a hyperparameter tuning job. Hyperparameter tuning uses the value of this metric to evaluate the training jobs it launches, and returns the training job that results in either the highest or lowest value for this metric, depending on the value you specify for the Type parameter.

      • Type (string) -- [REQUIRED]

        Whether to minimize or maximize the objective metric.

      • MetricName (string) -- [REQUIRED]

        The name of the metric to use for the objective metric.

    • HyperParameterRanges (dict) --

      Specifies ranges of integer, continuous, and categorical hyperparameters that a hyperparameter tuning job searches. The hyperparameter tuning job launches training jobs with hyperparameter values within these ranges to find the combination of values that result in the training job with the best performance as measured by the objective metric of the hyperparameter tuning job.

      Note

      You can specify a maximum of 20 hyperparameters that a hyperparameter tuning job can search over. Every possible value of a categorical parameter range counts against this limit.

      • IntegerParameterRanges (list) --

        The array of IntegerParameterRange objects that specify ranges of integer hyperparameters that a hyperparameter tuning job searches.

        • (dict) --

          For a hyperparameter of the integer type, specifies the range that a hyperparameter tuning job searches.

          • Name (string) -- [REQUIRED]

            The name of the hyperparameter to search.

          • MinValue (string) -- [REQUIRED]

            The minimum value of the hyperparameter to search.

          • MaxValue (string) -- [REQUIRED]

            The maximum value of the hyperparameter to search.

          • ScalingType (string) --

            The scale that hyperparameter tuning uses to search the hyperparameter range. For information about choosing a hyperparameter scale, see Hyperparameter Scaling . One of the following values:

            Auto

            Amazon SageMaker hyperparameter tuning chooses the best scale for the hyperparameter.

            Linear

            Hyperparameter tuning searches the values in the hyperparameter range by using a linear scale.

            Logarithmic

            Hyperparameter tuning searches the values in the hyperparameter range by using a logarithmic scale.

            Logarithmic scaling works only for ranges that have only values greater than 0.

      • ContinuousParameterRanges (list) --

        The array of ContinuousParameterRange objects that specify ranges of continuous hyperparameters that a hyperparameter tuning job searches.

        • (dict) --

          A list of continuous hyperparameters to tune.

          • Name (string) -- [REQUIRED]

            The name of the continuous hyperparameter to tune.

          • MinValue (string) -- [REQUIRED]

            The minimum value for the hyperparameter. The tuning job uses floating-point values between this value and MaxValue for tuning.

          • MaxValue (string) -- [REQUIRED]

            The maximum value for the hyperparameter. The tuning job uses floating-point values between MinValue value and this value for tuning.

          • ScalingType (string) --

            The scale that hyperparameter tuning uses to search the hyperparameter range. For information about choosing a hyperparameter scale, see Hyperparameter Scaling . One of the following values:

            Auto

            Amazon SageMaker hyperparameter tuning chooses the best scale for the hyperparameter.

            Linear

            Hyperparameter tuning searches the values in the hyperparameter range by using a linear scale.

            Logarithmic

            Hyperparameter tuning searches the values in the hyperparameter range by using a logarithmic scale.

            Logarithmic scaling works only for ranges that have only values greater than 0.

            ReverseLogarithmic

            Hyperparameter tuning searches the values in the hyperparameter range by using a reverse logarithmic scale.

            Reverse logarithmic scaling works only for ranges that are entirely within the range 0<=x<1.0.

      • CategoricalParameterRanges (list) --

        The array of CategoricalParameterRange objects that specify ranges of categorical hyperparameters that a hyperparameter tuning job searches.

        • (dict) --

          A list of categorical hyperparameters to tune.

          • Name (string) -- [REQUIRED]

            The name of the categorical hyperparameter to tune.

          • Values (list) -- [REQUIRED]

            A list of the categories for the hyperparameter.

            • (string) --
    • StaticHyperParameters (dict) --

      Specifies the values of hyperparameters that do not change for the tuning job.

      • (string) --
        • (string) --
    • AlgorithmSpecification (dict) -- [REQUIRED]

      The HyperParameterAlgorithmSpecification object that specifies the resource algorithm to use for the training jobs that the tuning job launches.

      • TrainingImage (string) --

        The registry path of the Docker image that contains the training algorithm. For information about Docker registry paths for built-in algorithms, see Algorithms Provided by Amazon SageMaker: Common Parameters . Amazon SageMaker supports both registry/repository[:tag] and registry/repository[@digest] image path formats. For more information, see Using Your Own Algorithms with Amazon SageMaker .

      • TrainingInputMode (string) -- [REQUIRED]

        The input mode that the algorithm supports: File or Pipe. In File input mode, Amazon SageMaker downloads the training data from Amazon S3 to the storage volume that is attached to the training instance and mounts the directory to the Docker volume for the training container. In Pipe input mode, Amazon SageMaker streams data directly from Amazon S3 to the container.

        If you specify File mode, make sure that you provision the storage volume that is attached to the training instance with enough capacity to accommodate the training data downloaded from Amazon S3, the model artifacts, and intermediate information.

        For more information about input modes, see Algorithms .

      • AlgorithmName (string) --

        The name of the resource algorithm to use for the hyperparameter tuning job. If you specify a value for this parameter, do not specify a value for TrainingImage .

      • MetricDefinitions (list) --

        An array of MetricDefinition objects that specify the metrics that the algorithm emits.

        • (dict) --

          Specifies a metric that the training algorithm writes to stderr or stdout . Amazon SageMakerhyperparameter tuning captures all defined metrics. You specify one metric that a hyperparameter tuning job uses as its objective metric to choose the best training job.

          • Name (string) -- [REQUIRED]

            The name of the metric.

          • Regex (string) -- [REQUIRED]

            A regular expression that searches the output of a training job and gets the value of the metric. For more information about using regular expressions to define metrics, see Defining Objective Metrics .

    • RoleArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the IAM role associated with the training jobs that the tuning job launches.

    • InputDataConfig (list) --

      An array of Channel objects that specify the input for the training jobs that the tuning job launches.

      • (dict) --

        A channel is a named input source that training algorithms can consume.

        • ChannelName (string) -- [REQUIRED]

          The name of the channel.

        • DataSource (dict) -- [REQUIRED]

          The location of the channel data.

          • S3DataSource (dict) --

            The S3 location of the data source that is associated with a channel.

            • S3DataType (string) -- [REQUIRED]

              If you choose S3Prefix , S3Uri identifies a key name prefix. Amazon SageMaker uses all objects that match the specified key name prefix for model training.

              If you choose ManifestFile , S3Uri identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for model training.

              If you choose AugmentedManifestFile , S3Uri identifies an object that is an augmented manifest file in JSON lines format. This file contains the data you want to use for model training. AugmentedManifestFile can only be used if the Channel's input mode is Pipe .

            • S3Uri (string) -- [REQUIRED]

              Depending on the value specified for the S3DataType , identifies either a key name prefix or a manifest. For example:

              • A key name prefix might look like this: s3://bucketname/exampleprefix
              • A manifest might look like this: s3://bucketname/example.manifest A manifest is an S3 object which is a JSON file consisting of an array of elements. The first element is a prefix which is followed by one or more suffixes. SageMaker appends the suffix elements to the prefix to get a full set of S3Uri . Note that the prefix must be a valid non-empty S3Uri that precludes users from specifying a manifest whose individual S3Uri is sourced from different S3 buckets. The following code example shows a valid manifest format: [ {"prefix": "s3://customer_bucket/some/prefix/"}, "relative/path/to/custdata-1", "relative/path/custdata-2", ... "relative/path/custdata-N" ] This JSON is equivalent to the following S3Uri list: s3://customer_bucket/some/prefix/relative/path/to/custdata-1 s3://customer_bucket/some/prefix/relative/path/custdata-2 ... s3://customer_bucket/some/prefix/relative/path/custdata-N The complete set of S3Uri in this manifest is the input data for the channel for this data source. The object that each S3Uri points to must be readable by the IAM role that Amazon SageMaker uses to perform tasks on your behalf.
            • S3DataDistributionType (string) --

              If you want Amazon SageMaker to replicate the entire dataset on each ML compute instance that is launched for model training, specify FullyReplicated .

              If you want Amazon SageMaker to replicate a subset of data on each ML compute instance that is launched for model training, specify ShardedByS3Key . If there are n ML compute instances launched for a training job, each instance gets approximately 1/n of the number of S3 objects. In this case, model training on each machine uses only the subset of training data.

              Don't choose more ML compute instances for training than available S3 objects. If you do, some nodes won't get any data and you will pay for nodes that aren't getting any training data. This applies in both File and Pipe modes. Keep this in mind when developing algorithms.

              In distributed training, where you use multiple ML compute EC2 instances, you might choose ShardedByS3Key . If the algorithm requires copying training data to the ML storage volume (when TrainingInputMode is set to File ), this copies 1/n of the number of objects.

            • AttributeNames (list) --

              A list of one or more attribute names to use that are found in a specified augmented manifest file.

              • (string) --
          • FileSystemDataSource (dict) --

            The file system that is associated with a channel.

            • FileSystemId (string) -- [REQUIRED]

              The file system id.

            • FileSystemAccessMode (string) -- [REQUIRED]

              The access mode of the mount of the directory associated with the channel. A directory can be mounted either in ro (read-only) or rw (read-write) mode.

            • FileSystemType (string) -- [REQUIRED]

              The file system type.

            • DirectoryPath (string) -- [REQUIRED]

              The full path to the directory to associate with the channel.

        • ContentType (string) --

          The MIME type of the data.

        • CompressionType (string) --

          If training data is compressed, the compression type. The default value is None . CompressionType is used only in Pipe input mode. In File mode, leave this field unset or set it to None.

        • RecordWrapperType (string) --

          Specify RecordIO as the value when input data is in raw format but the training algorithm requires the RecordIO format. In this case, Amazon SageMaker wraps each individual S3 object in a RecordIO record. If the input data is already in RecordIO format, you don't need to set this attribute. For more information, see Create a Dataset Using RecordIO .

          In File mode, leave this field unset or set it to None.

        • InputMode (string) --

          (Optional) The input mode to use for the data channel in a training job. If you don't set a value for InputMode , Amazon SageMaker uses the value set for TrainingInputMode . Use this parameter to override the TrainingInputMode setting in a AlgorithmSpecification request when you have a channel that needs a different input mode from the training job's general setting. To download the data from Amazon Simple Storage Service (Amazon S3) to the provisioned ML storage volume, and mount the directory to a Docker volume, use File input mode. To stream data directly from Amazon S3 to the container, choose Pipe input mode.

          To use a model for incremental training, choose File input model.

        • ShuffleConfig (dict) --

          A configuration for a shuffle option for input data in a channel. If you use S3Prefix for S3DataType , this shuffles the results of the S3 key prefix matches. If you use ManifestFile , the order of the S3 object references in the ManifestFile is shuffled. If you use AugmentedManifestFile , the order of the JSON lines in the AugmentedManifestFile is shuffled. The shuffling order is determined using the Seed value.

          For Pipe input mode, shuffling is done at the start of every epoch. With large datasets this ensures that the order of the training data is different for each epoch, it helps reduce bias and possible overfitting. In a multi-node training job when ShuffleConfig is combined with S3DataDistributionType of ShardedByS3Key , the data is shuffled across nodes so that the content sent to a particular node on the first epoch might be sent to a different node on the second epoch.

          • Seed (integer) -- [REQUIRED]

            Determines the shuffling order in ShuffleConfig value.

    • VpcConfig (dict) --

      The VpcConfig object that specifies the VPC that you want the training jobs that this hyperparameter tuning job launches to connect to. Control access to and from your training container by configuring the VPC. For more information, see Protect Training Jobs by Using an Amazon Virtual Private Cloud .

      • SecurityGroupIds (list) -- [REQUIRED]

        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) -- [REQUIRED]

        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) --
    • OutputDataConfig (dict) -- [REQUIRED]

      Specifies the path to the Amazon S3 bucket where you store model artifacts from the training jobs that the tuning job launches.

      • KmsKeyId (string) --

        The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats:

        • // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab"
        • // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        • // KMS Key Alias "alias/ExampleAlias"
        • // Amazon Resource Name (ARN) of a KMS Key Alias "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias"

        If you use a KMS key ID or an alias of your master key, the Amazon SageMaker execution role must include permissions to call kms:Encrypt . If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with KMS-managed keys for OutputDataConfig . If you use a bucket policy with an s3:PutObject permission that only allows objects with server-side encryption, set the condition key of s3:x-amz-server-side-encryption to "aws:kms" . For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.

        The KMS key policy must grant permission to the IAM role that you specify in your CreateTrainingJob , CreateTransformJob , or CreateHyperParameterTuningJob requests. For more information, see Using Key Policies in AWS KMS in the AWS Key Management Service Developer Guide .

      • S3OutputPath (string) -- [REQUIRED]

        Identifies the S3 path where you want Amazon SageMaker to store the model artifacts. For example, s3://bucket-name/key-name-prefix .

    • ResourceConfig (dict) -- [REQUIRED]

      The resources, including the compute instances and storage volumes, to use for the training jobs that the tuning job launches.

      Storage volumes store model artifacts and incremental states. Training algorithms might also use storage volumes for scratch space. If you want Amazon SageMaker to use the storage volume to store the training data, choose File as the TrainingInputMode in the algorithm specification. For distributed training algorithms, specify an instance count greater than 1.

      • InstanceType (string) -- [REQUIRED]

        The ML compute instance type.

      • InstanceCount (integer) -- [REQUIRED]

        The number of ML compute instances to use. For distributed training, provide a value greater than 1.

      • VolumeSizeInGB (integer) -- [REQUIRED]

        The size of the ML storage volume that you want to provision.

        ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML storage volume for scratch space. If you want to store the training data in the ML storage volume, choose File as the TrainingInputMode in the algorithm specification.

        You must specify sufficient ML storage for your scenario.

        Note

        Amazon SageMaker supports only the General Purpose SSD (gp2) ML storage volume type.

        Note

        Certain Nitro-based instances include local storage with a fixed total size, dependent on the instance type. When using these instances for training, Amazon SageMaker mounts the local instance storage instead of Amazon EBS gp2 storage. You can't request a VolumeSizeInGB greater than the total size of the local instance storage.

        For a list of instance types that support local instance storage, including the total size per instance type, see Instance Store Volumes .

      • VolumeKmsKeyId (string) --

        The AWS KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the training job.

        Note

        Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a VolumeKmsKeyId when using an instance type with local storage.

        For a list of instance types that support local instance storage, see Instance Store Volumes .

        For more information about local instance storage encryption, see SSD Instance Store Volumes .

        The VolumeKmsKeyId can be in any of the following formats:

        • // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab"
        • // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
    • StoppingCondition (dict) -- [REQUIRED]

      Specifies a limit to how long a model hyperparameter training job can run. It also specifies how long you are willing to wait for a managed spot training job to complete. When the job reaches the a limit, Amazon SageMaker ends the training job. Use this API to cap model training costs.

      • MaxRuntimeInSeconds (integer) --

        The maximum length of time, in seconds, that the training or compilation job can run. If job does not complete during this time, Amazon SageMaker ends the job. If value is not specified, default value is 1 day. The maximum value is 28 days.

      • MaxWaitTimeInSeconds (integer) --

        The maximum length of time, in seconds, how long you are willing to wait for a managed spot training job to complete. It is the amount of time spent waiting for Spot capacity plus the amount of time the training job runs. It must be equal to or greater than MaxRuntimeInSeconds .

    • EnableNetworkIsolation (boolean) --

      Isolates the training container. No inbound or outbound network calls can be made, except for calls between peers within a training cluster for distributed training. If network isolation is used for training jobs that are configured to use a VPC, Amazon SageMaker downloads and uploads customer data and model artifacts through the specified VPC, but the training container does not have network access.

    • EnableInterContainerTrafficEncryption (boolean) --

      To encrypt all communications between ML compute instances in distributed training, choose True . Encryption provides greater security for distributed training, but training might take longer. How long it takes depends on the amount of communication between compute instances, especially if you use a deep learning algorithm in distributed training.

    • EnableManagedSpotTraining (boolean) --

      A Boolean indicating whether managed spot training is enabled (True ) or not (False ).

    • CheckpointConfig (dict) --

      Contains information about the output location for managed spot training checkpoint data.

      • S3Uri (string) -- [REQUIRED]

        Identifies the S3 path where you want Amazon SageMaker to store checkpoints. For example, s3://bucket-name/key-name-prefix .

      • LocalPath (string) --

        (Optional) The local directory where checkpoints are written. The default directory is /opt/ml/checkpoints/ .

  • TrainingJobDefinitions (list) --

    A list of the HyperParameterTrainingJobDefinition objects launched for this tuning job.

    • (dict) --

      Defines the training jobs launched by a hyperparameter tuning job.

      • DefinitionName (string) --

        The job definition name.

      • TuningObjective (dict) --

        Defines the objective metric for a hyperparameter tuning job. Hyperparameter tuning uses the value of this metric to evaluate the training jobs it launches, and returns the training job that results in either the highest or lowest value for this metric, depending on the value you specify for the Type parameter.

        • Type (string) -- [REQUIRED]

          Whether to minimize or maximize the objective metric.

        • MetricName (string) -- [REQUIRED]

          The name of the metric to use for the objective metric.

      • HyperParameterRanges (dict) --

        Specifies ranges of integer, continuous, and categorical hyperparameters that a hyperparameter tuning job searches. The hyperparameter tuning job launches training jobs with hyperparameter values within these ranges to find the combination of values that result in the training job with the best performance as measured by the objective metric of the hyperparameter tuning job.

        Note

        You can specify a maximum of 20 hyperparameters that a hyperparameter tuning job can search over. Every possible value of a categorical parameter range counts against this limit.

        • IntegerParameterRanges (list) --

          The array of IntegerParameterRange objects that specify ranges of integer hyperparameters that a hyperparameter tuning job searches.

          • (dict) --

            For a hyperparameter of the integer type, specifies the range that a hyperparameter tuning job searches.

            • Name (string) -- [REQUIRED]

              The name of the hyperparameter to search.

            • MinValue (string) -- [REQUIRED]

              The minimum value of the hyperparameter to search.

            • MaxValue (string) -- [REQUIRED]

              The maximum value of the hyperparameter to search.

            • ScalingType (string) --

              The scale that hyperparameter tuning uses to search the hyperparameter range. For information about choosing a hyperparameter scale, see Hyperparameter Scaling . One of the following values:

              Auto

              Amazon SageMaker hyperparameter tuning chooses the best scale for the hyperparameter.

              Linear

              Hyperparameter tuning searches the values in the hyperparameter range by using a linear scale.

              Logarithmic

              Hyperparameter tuning searches the values in the hyperparameter range by using a logarithmic scale.

              Logarithmic scaling works only for ranges that have only values greater than 0.

        • ContinuousParameterRanges (list) --

          The array of ContinuousParameterRange objects that specify ranges of continuous hyperparameters that a hyperparameter tuning job searches.

          • (dict) --

            A list of continuous hyperparameters to tune.

            • Name (string) -- [REQUIRED]

              The name of the continuous hyperparameter to tune.

            • MinValue (string) -- [REQUIRED]

              The minimum value for the hyperparameter. The tuning job uses floating-point values between this value and MaxValue for tuning.

            • MaxValue (string) -- [REQUIRED]

              The maximum value for the hyperparameter. The tuning job uses floating-point values between MinValue value and this value for tuning.

            • ScalingType (string) --

              The scale that hyperparameter tuning uses to search the hyperparameter range. For information about choosing a hyperparameter scale, see Hyperparameter Scaling . One of the following values:

              Auto

              Amazon SageMaker hyperparameter tuning chooses the best scale for the hyperparameter.

              Linear

              Hyperparameter tuning searches the values in the hyperparameter range by using a linear scale.

              Logarithmic

              Hyperparameter tuning searches the values in the hyperparameter range by using a logarithmic scale.

              Logarithmic scaling works only for ranges that have only values greater than 0.

              ReverseLogarithmic

              Hyperparameter tuning searches the values in the hyperparameter range by using a reverse logarithmic scale.

              Reverse logarithmic scaling works only for ranges that are entirely within the range 0<=x<1.0.

        • CategoricalParameterRanges (list) --

          The array of CategoricalParameterRange objects that specify ranges of categorical hyperparameters that a hyperparameter tuning job searches.

          • (dict) --

            A list of categorical hyperparameters to tune.

            • Name (string) -- [REQUIRED]

              The name of the categorical hyperparameter to tune.

            • Values (list) -- [REQUIRED]

              A list of the categories for the hyperparameter.

              • (string) --
      • StaticHyperParameters (dict) --

        Specifies the values of hyperparameters that do not change for the tuning job.

        • (string) --
          • (string) --
      • AlgorithmSpecification (dict) -- [REQUIRED]

        The HyperParameterAlgorithmSpecification object that specifies the resource algorithm to use for the training jobs that the tuning job launches.

        • TrainingImage (string) --

          The registry path of the Docker image that contains the training algorithm. For information about Docker registry paths for built-in algorithms, see Algorithms Provided by Amazon SageMaker: Common Parameters . Amazon SageMaker supports both registry/repository[:tag] and registry/repository[@digest] image path formats. For more information, see Using Your Own Algorithms with Amazon SageMaker .

        • TrainingInputMode (string) -- [REQUIRED]

          The input mode that the algorithm supports: File or Pipe. In File input mode, Amazon SageMaker downloads the training data from Amazon S3 to the storage volume that is attached to the training instance and mounts the directory to the Docker volume for the training container. In Pipe input mode, Amazon SageMaker streams data directly from Amazon S3 to the container.

          If you specify File mode, make sure that you provision the storage volume that is attached to the training instance with enough capacity to accommodate the training data downloaded from Amazon S3, the model artifacts, and intermediate information.

          For more information about input modes, see Algorithms .

        • AlgorithmName (string) --

          The name of the resource algorithm to use for the hyperparameter tuning job. If you specify a value for this parameter, do not specify a value for TrainingImage .

        • MetricDefinitions (list) --

          An array of MetricDefinition objects that specify the metrics that the algorithm emits.

          • (dict) --

            Specifies a metric that the training algorithm writes to stderr or stdout . Amazon SageMakerhyperparameter tuning captures all defined metrics. You specify one metric that a hyperparameter tuning job uses as its objective metric to choose the best training job.

            • Name (string) -- [REQUIRED]

              The name of the metric.

            • Regex (string) -- [REQUIRED]

              A regular expression that searches the output of a training job and gets the value of the metric. For more information about using regular expressions to define metrics, see Defining Objective Metrics .

      • RoleArn (string) -- [REQUIRED]

        The Amazon Resource Name (ARN) of the IAM role associated with the training jobs that the tuning job launches.

      • InputDataConfig (list) --

        An array of Channel objects that specify the input for the training jobs that the tuning job launches.

        • (dict) --

          A channel is a named input source that training algorithms can consume.

          • ChannelName (string) -- [REQUIRED]

            The name of the channel.

          • DataSource (dict) -- [REQUIRED]

            The location of the channel data.

            • S3DataSource (dict) --

              The S3 location of the data source that is associated with a channel.

              • S3DataType (string) -- [REQUIRED]

                If you choose S3Prefix , S3Uri identifies a key name prefix. Amazon SageMaker uses all objects that match the specified key name prefix for model training.

                If you choose ManifestFile , S3Uri identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for model training.

                If you choose AugmentedManifestFile , S3Uri identifies an object that is an augmented manifest file in JSON lines format. This file contains the data you want to use for model training. AugmentedManifestFile can only be used if the Channel's input mode is Pipe .

              • S3Uri (string) -- [REQUIRED]

                Depending on the value specified for the S3DataType , identifies either a key name prefix or a manifest. For example:

                • A key name prefix might look like this: s3://bucketname/exampleprefix
                • A manifest might look like this: s3://bucketname/example.manifest A manifest is an S3 object which is a JSON file consisting of an array of elements. The first element is a prefix which is followed by one or more suffixes. SageMaker appends the suffix elements to the prefix to get a full set of S3Uri . Note that the prefix must be a valid non-empty S3Uri that precludes users from specifying a manifest whose individual S3Uri is sourced from different S3 buckets. The following code example shows a valid manifest format: [ {"prefix": "s3://customer_bucket/some/prefix/"}, "relative/path/to/custdata-1", "relative/path/custdata-2", ... "relative/path/custdata-N" ] This JSON is equivalent to the following S3Uri list: s3://customer_bucket/some/prefix/relative/path/to/custdata-1 s3://customer_bucket/some/prefix/relative/path/custdata-2 ... s3://customer_bucket/some/prefix/relative/path/custdata-N The complete set of S3Uri in this manifest is the input data for the channel for this data source. The object that each S3Uri points to must be readable by the IAM role that Amazon SageMaker uses to perform tasks on your behalf.
              • S3DataDistributionType (string) --

                If you want Amazon SageMaker to replicate the entire dataset on each ML compute instance that is launched for model training, specify FullyReplicated .

                If you want Amazon SageMaker to replicate a subset of data on each ML compute instance that is launched for model training, specify ShardedByS3Key . If there are n ML compute instances launched for a training job, each instance gets approximately 1/n of the number of S3 objects. In this case, model training on each machine uses only the subset of training data.

                Don't choose more ML compute instances for training than available S3 objects. If you do, some nodes won't get any data and you will pay for nodes that aren't getting any training data. This applies in both File and Pipe modes. Keep this in mind when developing algorithms.

                In distributed training, where you use multiple ML compute EC2 instances, you might choose ShardedByS3Key . If the algorithm requires copying training data to the ML storage volume (when TrainingInputMode is set to File ), this copies 1/n of the number of objects.

              • AttributeNames (list) --

                A list of one or more attribute names to use that are found in a specified augmented manifest file.

                • (string) --
            • FileSystemDataSource (dict) --

              The file system that is associated with a channel.

              • FileSystemId (string) -- [REQUIRED]

                The file system id.

              • FileSystemAccessMode (string) -- [REQUIRED]

                The access mode of the mount of the directory associated with the channel. A directory can be mounted either in ro (read-only) or rw (read-write) mode.

              • FileSystemType (string) -- [REQUIRED]

                The file system type.

              • DirectoryPath (string) -- [REQUIRED]

                The full path to the directory to associate with the channel.

          • ContentType (string) --

            The MIME type of the data.

          • CompressionType (string) --

            If training data is compressed, the compression type. The default value is None . CompressionType is used only in Pipe input mode. In File mode, leave this field unset or set it to None.

          • RecordWrapperType (string) --

            Specify RecordIO as the value when input data is in raw format but the training algorithm requires the RecordIO format. In this case, Amazon SageMaker wraps each individual S3 object in a RecordIO record. If the input data is already in RecordIO format, you don't need to set this attribute. For more information, see Create a Dataset Using RecordIO .

            In File mode, leave this field unset or set it to None.

          • InputMode (string) --

            (Optional) The input mode to use for the data channel in a training job. If you don't set a value for InputMode , Amazon SageMaker uses the value set for TrainingInputMode . Use this parameter to override the TrainingInputMode setting in a AlgorithmSpecification request when you have a channel that needs a different input mode from the training job's general setting. To download the data from Amazon Simple Storage Service (Amazon S3) to the provisioned ML storage volume, and mount the directory to a Docker volume, use File input mode. To stream data directly from Amazon S3 to the container, choose Pipe input mode.

            To use a model for incremental training, choose File input model.

          • ShuffleConfig (dict) --

            A configuration for a shuffle option for input data in a channel. If you use S3Prefix for S3DataType , this shuffles the results of the S3 key prefix matches. If you use ManifestFile , the order of the S3 object references in the ManifestFile is shuffled. If you use AugmentedManifestFile , the order of the JSON lines in the AugmentedManifestFile is shuffled. The shuffling order is determined using the Seed value.

            For Pipe input mode, shuffling is done at the start of every epoch. With large datasets this ensures that the order of the training data is different for each epoch, it helps reduce bias and possible overfitting. In a multi-node training job when ShuffleConfig is combined with S3DataDistributionType of ShardedByS3Key , the data is shuffled across nodes so that the content sent to a particular node on the first epoch might be sent to a different node on the second epoch.

            • Seed (integer) -- [REQUIRED]

              Determines the shuffling order in ShuffleConfig value.

      • VpcConfig (dict) --

        The VpcConfig object that specifies the VPC that you want the training jobs that this hyperparameter tuning job launches to connect to. Control access to and from your training container by configuring the VPC. For more information, see Protect Training Jobs by Using an Amazon Virtual Private Cloud .

        • SecurityGroupIds (list) -- [REQUIRED]

          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) -- [REQUIRED]

          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) --
      • OutputDataConfig (dict) -- [REQUIRED]

        Specifies the path to the Amazon S3 bucket where you store model artifacts from the training jobs that the tuning job launches.

        • KmsKeyId (string) --

          The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats:

          • // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab"
          • // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
          • // KMS Key Alias "alias/ExampleAlias"
          • // Amazon Resource Name (ARN) of a KMS Key Alias "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias"

          If you use a KMS key ID or an alias of your master key, the Amazon SageMaker execution role must include permissions to call kms:Encrypt . If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with KMS-managed keys for OutputDataConfig . If you use a bucket policy with an s3:PutObject permission that only allows objects with server-side encryption, set the condition key of s3:x-amz-server-side-encryption to "aws:kms" . For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.

          The KMS key policy must grant permission to the IAM role that you specify in your CreateTrainingJob , CreateTransformJob , or CreateHyperParameterTuningJob requests. For more information, see Using Key Policies in AWS KMS in the AWS Key Management Service Developer Guide .

        • S3OutputPath (string) -- [REQUIRED]

          Identifies the S3 path where you want Amazon SageMaker to store the model artifacts. For example, s3://bucket-name/key-name-prefix .

      • ResourceConfig (dict) -- [REQUIRED]

        The resources, including the compute instances and storage volumes, to use for the training jobs that the tuning job launches.

        Storage volumes store model artifacts and incremental states. Training algorithms might also use storage volumes for scratch space. If you want Amazon SageMaker to use the storage volume to store the training data, choose File as the TrainingInputMode in the algorithm specification. For distributed training algorithms, specify an instance count greater than 1.

        • InstanceType (string) -- [REQUIRED]

          The ML compute instance type.

        • InstanceCount (integer) -- [REQUIRED]

          The number of ML compute instances to use. For distributed training, provide a value greater than 1.

        • VolumeSizeInGB (integer) -- [REQUIRED]

          The size of the ML storage volume that you want to provision.

          ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML storage volume for scratch space. If you want to store the training data in the ML storage volume, choose File as the TrainingInputMode in the algorithm specification.

          You must specify sufficient ML storage for your scenario.

          Note

          Amazon SageMaker supports only the General Purpose SSD (gp2) ML storage volume type.

          Note

          Certain Nitro-based instances include local storage with a fixed total size, dependent on the instance type. When using these instances for training, Amazon SageMaker mounts the local instance storage instead of Amazon EBS gp2 storage. You can't request a VolumeSizeInGB greater than the total size of the local instance storage.

          For a list of instance types that support local instance storage, including the total size per instance type, see Instance Store Volumes .

        • VolumeKmsKeyId (string) --

          The AWS KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the training job.

          Note

          Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a VolumeKmsKeyId when using an instance type with local storage.

          For a list of instance types that support local instance storage, see Instance Store Volumes .

          For more information about local instance storage encryption, see SSD Instance Store Volumes .

          The VolumeKmsKeyId can be in any of the following formats:

          • // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab"
          • // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
      • StoppingCondition (dict) -- [REQUIRED]

        Specifies a limit to how long a model hyperparameter training job can run. It also specifies how long you are willing to wait for a managed spot training job to complete. When the job reaches the a limit, Amazon SageMaker ends the training job. Use this API to cap model training costs.

        • MaxRuntimeInSeconds (integer) --

          The maximum length of time, in seconds, that the training or compilation job can run. If job does not complete during this time, Amazon SageMaker ends the job. If value is not specified, default value is 1 day. The maximum value is 28 days.

        • MaxWaitTimeInSeconds (integer) --

          The maximum length of time, in seconds, how long you are willing to wait for a managed spot training job to complete. It is the amount of time spent waiting for Spot capacity plus the amount of time the training job runs. It must be equal to or greater than MaxRuntimeInSeconds .

      • EnableNetworkIsolation (boolean) --

        Isolates the training container. No inbound or outbound network calls can be made, except for calls between peers within a training cluster for distributed training. If network isolation is used for training jobs that are configured to use a VPC, Amazon SageMaker downloads and uploads customer data and model artifacts through the specified VPC, but the training container does not have network access.

      • EnableInterContainerTrafficEncryption (boolean) --

        To encrypt all communications between ML compute instances in distributed training, choose True . Encryption provides greater security for distributed training, but training might take longer. How long it takes depends on the amount of communication between compute instances, especially if you use a deep learning algorithm in distributed training.

      • EnableManagedSpotTraining (boolean) --

        A Boolean indicating whether managed spot training is enabled (True ) or not (False ).

      • CheckpointConfig (dict) --

        Contains information about the output location for managed spot training checkpoint data.

        • S3Uri (string) -- [REQUIRED]

          Identifies the S3 path where you want Amazon SageMaker to store checkpoints. For example, s3://bucket-name/key-name-prefix .

        • LocalPath (string) --

          (Optional) The local directory where checkpoints are written. The default directory is /opt/ml/checkpoints/ .

  • WarmStartConfig (dict) --

    Specifies the configuration for starting the hyperparameter tuning job using one or more previous tuning jobs as a starting point. The results of previous tuning jobs are used to inform which combinations of hyperparameters to search over in the new tuning job.

    All training jobs launched by the new hyperparameter tuning job are evaluated by using the objective metric. If you specify IDENTICAL_DATA_AND_ALGORITHM as the WarmStartType value for the warm start configuration, the training job that performs the best in the new tuning job is compared to the best training jobs from the parent tuning jobs. From these, the training job that performs the best as measured by the objective metric is returned as the overall best training job.

    Note

    All training jobs launched by parent hyperparameter tuning jobs and the new hyperparameter tuning jobs count against the limit of training jobs for the tuning job.

    • ParentHyperParameterTuningJobs (list) -- [REQUIRED]

      An array of hyperparameter tuning jobs that are used as the starting point for the new hyperparameter tuning job. For more information about warm starting a hyperparameter tuning job, see Using a Previous Hyperparameter Tuning Job as a Starting Point .

      Hyperparameter tuning jobs created before October 1, 2018 cannot be used as parent jobs for warm start tuning jobs.

      • (dict) --

        A previously completed or stopped hyperparameter tuning job to be used as a starting point for a new hyperparameter tuning job.

        • HyperParameterTuningJobName (string) --

          The name of the hyperparameter tuning job to be used as a starting point for a new hyperparameter tuning job.

    • WarmStartType (string) -- [REQUIRED]

      Specifies one of the following:

      IDENTICAL_DATA_AND_ALGORITHM

      The new hyperparameter tuning job uses the same input data and training image as the parent tuning jobs. You can change the hyperparameter ranges to search and the maximum number of training jobs that the hyperparameter tuning job launches. You cannot use a new version of the training algorithm, unless the changes in the new version do not affect the algorithm itself. For example, changes that improve logging or adding support for a different data format are allowed. You can also change hyperparameters from tunable to static, and from static to tunable, but the total number of static plus tunable hyperparameters must remain the same as it is in all parent jobs. The objective metric for the new tuning job must be the same as for all parent jobs.

      TRANSFER_LEARNING

      The new hyperparameter tuning job can include input data, hyperparameter ranges, maximum number of concurrent training jobs, and maximum number of training jobs that are different than those of its parent hyperparameter tuning jobs. The training image can also be a different version from the version used in the parent hyperparameter tuning job. You can also change hyperparameters from tunable to static, and from static to tunable, but the total number of static plus tunable hyperparameters must remain the same as it is in all parent jobs. The objective metric for the new tuning job must be the same as for all parent jobs.

  • Tags (list) --

    An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging AWS Resources .

    Tags that you specify for the tuning job are also added to all training jobs that the tuning job launches.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'HyperParameterTuningJobArn': 'string'
}

Response Structure

  • (dict) --

    • HyperParameterTuningJobArn (string) --

      The Amazon Resource Name (ARN) of the tuning job. Amazon SageMaker assigns an ARN to a hyperparameter tuning job when you create it.

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_image(**kwargs)

Creates a custom SageMaker image. A SageMaker image is a set of image versions. Each image version represents a container image stored in Amazon Container Registry (ECR). For more information, see Bring your own SageMaker image .

See also: AWS API Documentation

Request Syntax

response = client.create_image(
    Description='string',
    DisplayName='string',
    ImageName='string',
    RoleArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • Description (string) -- The description of the image.
  • DisplayName (string) -- The display name of the image. If not provided, ImageName is displayed.
  • ImageName (string) --

    [REQUIRED]

    The name of the image. Must be unique to your account.

  • RoleArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.

  • Tags (list) --

    A list of tags to apply to the image.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'ImageArn': 'string'
}

Response Structure

  • (dict) --

    • ImageArn (string) --

      The Amazon Resource Name (ARN) of the image.

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_image_version(**kwargs)

Creates a version of the SageMaker image specified by ImageName . The version represents the Amazon Container Registry (ECR) container image specified by BaseImage .

See also: AWS API Documentation

Request Syntax

response = client.create_image_version(
    BaseImage='string',
    ClientToken='string',
    ImageName='string'
)
Parameters
  • BaseImage (string) --

    [REQUIRED]

    The registry path of the container image to use as the starting point for this version. The path is an Amazon Container Registry (ECR) URI in the following format:

    <acct-id>.dkr.ecr.<region>.amazonaws.com/<repo-name[:tag] or [@digest]>
  • ClientToken (string) --

    [REQUIRED]

    A unique ID. If not specified, the AWS CLI and AWS SDKs, such as the SDK for Python (Boto3), add a unique value to the call.

    This field is autopopulated if not provided.

  • ImageName (string) --

    [REQUIRED]

    The ImageName of the Image to create a version of.

Return type

dict

Returns

Response Syntax

{
    'ImageVersionArn': 'string'
}

Response Structure

  • (dict) --

    • ImageVersionArn (string) --

      The Amazon Resource Name (ARN) of the image version.

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceLimitExceeded
  • SageMaker.Client.exceptions.ResourceNotFound
create_labeling_job(**kwargs)

Creates a job that uses workers to label the data objects in your input dataset. You can use the labeled data to train machine learning models.

You can select your workforce from one of three providers:

  • A private workforce that you create. It can include employees, contractors, and outside experts. Use a private workforce when want the data to stay within your organization or when a specific set of skills is required.
  • One or more vendors that you select from the AWS Marketplace. Vendors provide expertise in specific areas.
  • The Amazon Mechanical Turk workforce. This is the largest workforce, but it should only be used for public data or data that has been stripped of any personally identifiable information.

You can also use automated data labeling to reduce the number of data objects that need to be labeled by a human. Automated data labeling uses active learning to determine if a data object can be labeled by machine or if it needs to be sent to a human worker. For more information, see Using Automated Data Labeling .

The data objects to be labeled are contained in an Amazon S3 bucket. You create a manifest file that describes the location of each object. For more information, see Using Input and Output Data .

The output can be used as the manifest file for another labeling job or as training data for your machine learning models.

See also: AWS API Documentation

Request Syntax

response = client.create_labeling_job(
    LabelingJobName='string',
    LabelAttributeName='string',
    InputConfig={
        'DataSource': {
            'S3DataSource': {
                'ManifestS3Uri': 'string'
            },
            'SnsDataSource': {
                'SnsTopicArn': 'string'
            }
        },
        'DataAttributes': {
            'ContentClassifiers': [
                'FreeOfPersonallyIdentifiableInformation'|'FreeOfAdultContent',
            ]
        }
    },
    OutputConfig={
        'S3OutputPath': 'string',
        'KmsKeyId': 'string',
        'SnsTopicArn': 'string'
    },
    RoleArn='string',
    LabelCategoryConfigS3Uri='string',
    StoppingConditions={
        'MaxHumanLabeledObjectCount': 123,
        'MaxPercentageOfInputDatasetLabeled': 123
    },
    LabelingJobAlgorithmsConfig={
        'LabelingJobAlgorithmSpecificationArn': 'string',
        'InitialActiveLearningModelArn': 'string',
        'LabelingJobResourceConfig': {
            'VolumeKmsKeyId': 'string'
        }
    },
    HumanTaskConfig={
        'WorkteamArn': 'string',
        'UiConfig': {
            'UiTemplateS3Uri': 'string',
            'HumanTaskUiArn': 'string'
        },
        'PreHumanTaskLambdaArn': 'string',
        'TaskKeywords': [
            'string',
        ],
        'TaskTitle': 'string',
        'TaskDescription': 'string',
        'NumberOfHumanWorkersPerDataObject': 123,
        'TaskTimeLimitInSeconds': 123,
        'TaskAvailabilityLifetimeInSeconds': 123,
        'MaxConcurrentTaskCount': 123,
        'AnnotationConsolidationConfig': {
            'AnnotationConsolidationLambdaArn': 'string'
        },
        'PublicWorkforceTaskPrice': {
            'AmountInUsd': {
                'Dollars': 123,
                'Cents': 123,
                'TenthFractionsOfACent': 123
            }
        }
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • LabelingJobName (string) --

    [REQUIRED]

    The name of the labeling job. This name is used to identify the job in a list of labeling jobs.

  • LabelAttributeName (string) --

    [REQUIRED]

    The attribute name to use for the label in the output manifest file. This is the key for the key/value pair formed with the label that a worker assigns to the object. The name can't end with "-metadata". If you are running a semantic segmentation labeling job, the attribute name must end with "-ref". If you are running any other kind of labeling job, the attribute name must not end with "-ref".

  • InputConfig (dict) --

    [REQUIRED]

    Input data for the labeling job, such as the Amazon S3 location of the data objects and the location of the manifest file that describes the data objects.

    • DataSource (dict) -- [REQUIRED]

      The location of the input data.

      • S3DataSource (dict) --

        The Amazon S3 location of the input data objects.

        • ManifestS3Uri (string) -- [REQUIRED]

          The Amazon S3 location of the manifest file that describes the input data objects.

      • SnsDataSource (dict) --

        An Amazon SNS data source used for streaming labeling jobs.

        • SnsTopicArn (string) -- [REQUIRED]

          The Amazon SNS input topic Amazon Resource Name (ARN). Specify the ARN of the input topic you will use to send new data objects to a streaming labeling job.

          If you specify an input topic for SnsTopicArn in InputConfig , you must specify a value for SnsTopicArn in OutputConfig .

    • DataAttributes (dict) --

      Attributes of the data specified by the customer.

      • ContentClassifiers (list) --

        Declares that your content is free of personally identifiable information or adult content. Amazon SageMaker may restrict the Amazon Mechanical Turk workers that can view your task based on this information.

        • (string) --
  • OutputConfig (dict) --

    [REQUIRED]

    The location of the output data and the AWS Key Management Service key ID for the key used to encrypt the output data, if any.

    • S3OutputPath (string) -- [REQUIRED]

      The Amazon S3 location to write output data.

    • KmsKeyId (string) --

      The AWS Key Management Service ID of the key used to encrypt the output data, if any.

      If you use a KMS key ID or an alias of your master key, the Amazon SageMaker execution role must include permissions to call kms:Encrypt . If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with KMS-managed keys for LabelingJobOutputConfig . If you use a bucket policy with an s3:PutObject permission that only allows objects with server-side encryption, set the condition key of s3:x-amz-server-side-encryption to "aws:kms" . For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.

      The KMS key policy must grant permission to the IAM role that you specify in your CreateLabelingJob request. For more information, see Using Key Policies in AWS KMS in the AWS Key Management Service Developer Guide .

    • SnsTopicArn (string) --

      An Amazon Simple Notification Service (Amazon SNS) output topic ARN.

      When workers complete labeling tasks, Ground Truth will send labeling task output data to the SNS output topic you specify here.

      You must provide a value for this parameter if you provide an Amazon SNS input topic in SnsDataSource in InputConfig .

  • RoleArn (string) --

    [REQUIRED]

    The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during data labeling. You must grant this role the necessary permissions so that Amazon SageMaker can successfully complete data labeling.

  • LabelCategoryConfigS3Uri (string) --

    The S3 URI of the file that defines the categories used to label the data objects.

    For 3D point cloud task types, see Create a Labeling Category Configuration File for 3D Point Cloud Labeling Jobs .

    For all other built-in task types and custom tasks , your label category configuration file must be a JSON file in the following format. Identify the labels you want to use by replacing label_1 , label_2 ,``...`` ,``label_n`` with your label categories.

    {

    "document-version": "2018-11-28"

    "labels": [

    {

    "label": "*label_1* "

    },

    {

    "label": "*label_2* "

    },

    ...

    {

    "label": "*label_n* "

    }

    ]

    }

  • StoppingConditions (dict) --

    A set of conditions for stopping the labeling job. If any of the conditions are met, the job is automatically stopped. You can use these conditions to control the cost of data labeling.

    • MaxHumanLabeledObjectCount (integer) --

      The maximum number of objects that can be labeled by human workers.

    • MaxPercentageOfInputDatasetLabeled (integer) --

      The maximum number of input data objects that should be labeled.

  • LabelingJobAlgorithmsConfig (dict) --

    Configures the information required to perform automated data labeling.

    • LabelingJobAlgorithmSpecificationArn (string) -- [REQUIRED]

      Specifies the Amazon Resource Name (ARN) of the algorithm used for auto-labeling. You must select one of the following ARNs:

      • Image classification arn:aws:sagemaker:*region* :027400017018:labeling-job-algorithm-specification/image-classification
      • Text classification arn:aws:sagemaker:*region* :027400017018:labeling-job-algorithm-specification/text-classification
      • Object detection arn:aws:sagemaker:*region* :027400017018:labeling-job-algorithm-specification/object-detection
      • Semantic Segmentation arn:aws:sagemaker:*region* :027400017018:labeling-job-algorithm-specification/semantic-segmentation
    • InitialActiveLearningModelArn (string) --

      At the end of an auto-label job Ground Truth sends the Amazon Resource Name (ARN) of the final model used for auto-labeling. You can use this model as the starting point for subsequent similar jobs by providing the ARN of the model here.

    • LabelingJobResourceConfig (dict) --

      Provides configuration information for a labeling job.

      • VolumeKmsKeyId (string) --

        The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the training job. The VolumeKmsKeyId can be any of the following formats:

        • // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab"
        • // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
  • HumanTaskConfig (dict) --

    [REQUIRED]

    Configures the labeling task and how it is presented to workers; including, but not limited to price, keywords, and batch size (task count).

    • WorkteamArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the work team assigned to complete the tasks.

    • UiConfig (dict) -- [REQUIRED]

      Information about the user interface that workers use to complete the labeling task.

      • UiTemplateS3Uri (string) --

        The Amazon S3 bucket location of the UI template, or worker task template. This is the template used to render the worker UI and tools for labeling job tasks. For more information about the contents of a UI template, see Creating Your Custom Labeling Task Template .

      • HumanTaskUiArn (string) --

        The ARN of the worker task template used to render the worker UI and tools for labeling job tasks.

        Use this parameter when you are creating a labeling job for 3D point cloud and video fram labeling jobs. Use your labeling job task type to select one of the following ARN's and use it with this parameter when you create a labeling job. Replace aws-region with the AWS region you are creating your labeling job in.

        3D Point Cloud HumanTaskUiArns

        Use this HumanTaskUiArn for 3D point cloud object detection and 3D point cloud object detection adjustment labeling jobs.

        • arn:aws:sagemaker:aws-region:394669845002:human-task-ui/PointCloudObjectDetection

        Use this HumanTaskUiArn for 3D point cloud object tracking and 3D point cloud object tracking adjustment labeling jobs.

        • arn:aws:sagemaker:aws-region:394669845002:human-task-ui/PointCloudObjectTracking

        Use this HumanTaskUiArn for 3D point cloud semantic segmentation and 3D point cloud semantic segmentation adjustment labeling jobs.

        • arn:aws:sagemaker:aws-region:394669845002:human-task-ui/PointCloudSemanticSegmentation
        Video Frame HumanTaskUiArns

        Use this HumanTaskUiArn for video frame object detection and video frame object detection adjustment labeling jobs.

        • arn:aws:sagemaker:region:394669845002:human-task-ui/VideoObjectDetection

        Use this HumanTaskUiArn for video frame object tracking and video frame object tracking adjustment labeling jobs.

        • arn:aws:sagemaker:aws-region:394669845002:human-task-ui/VideoObjectTracking
    • PreHumanTaskLambdaArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of a Lambda function that is run before a data object is sent to a human worker. Use this function to provide input to a custom labeling job.

      For built-in task types , use one of the following Amazon SageMaker Ground Truth Lambda function ARNs for PreHumanTaskLambdaArn . For custom labeling workflows, see Pre-annotation Lambda .

      Bounding box - Finds the most similar boxes from different workers based on the Jaccard index of the boxes.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-BoundingBox
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-BoundingBox
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-BoundingBox
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-BoundingBox
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-BoundingBox
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-BoundingBox
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-BoundingBox
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-BoundingBox
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-BoundingBox
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-BoundingBox
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-BoundingBox
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-BoundingBox
      Image classification - Uses a variant of the Expectation Maximization approach to estimate the true class of an image based on annotations from individual workers.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-ImageMultiClass
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-ImageMultiClass
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-ImageMultiClass
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-ImageMultiClass
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-ImageMultiClass
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-ImageMultiClass
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-ImageMultiClass
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-ImageMultiClass
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-ImageMultiClass
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-ImageMultiClass
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-ImageMultiClass
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-ImageMultiClass
      Multi-label image classification - Uses a variant of the Expectation Maximization approach to estimate the true classes of an image based on annotations from individual workers.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-ImageMultiClassMultiLabel
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-ImageMultiClassMultiLabel
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-ImageMultiClassMultiLabel
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-ImageMultiClassMultiLabel
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-ImageMultiClassMultiLabel
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-ImageMultiClassMultiLabel
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-ImageMultiClassMultiLabel
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-ImageMultiClassMultiLabel
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-ImageMultiClassMultiLabel
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-ImageMultiClassMultiLabel
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-ImageMultiClassMultiLabel
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-ImageMultiClassMultiLabel
      Semantic segmentation - Treats each pixel in an image as a multi-class classification and treats pixel annotations from workers as "votes" for the correct label.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-SemanticSegmentation
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-SemanticSegmentation
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-SemanticSegmentation
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-SemanticSegmentation
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-SemanticSegmentation
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-SemanticSegmentation
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-SemanticSegmentation
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-SemanticSegmentation
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-SemanticSegmentation
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-SemanticSegmentation
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-SemanticSegmentation
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-SemanticSegmentation
      Text classification - Uses a variant of the Expectation Maximization approach to estimate the true class of text based on annotations from individual workers.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-TextMultiClass
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-TextMultiClass
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-TextMultiClass
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-TextMultiClass
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-TextMultiClass
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-TextMultiClass
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-TextMultiClass
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-TextMultiClass
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-TextMultiClass
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-TextMultiClass
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-TextMultiClass
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-TextMultiClass
      Multi-label text classification - Uses a variant of the Expectation Maximization approach to estimate the true classes of text based on annotations from individual workers.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-TextMultiClassMultiLabel
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-TextMultiClassMultiLabel
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-TextMultiClassMultiLabel
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-TextMultiClassMultiLabel
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-TextMultiClassMultiLabel
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-TextMultiClassMultiLabel
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-TextMultiClassMultiLabel
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-TextMultiClassMultiLabel
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-TextMultiClassMultiLabel
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-TextMultiClassMultiLabel
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-TextMultiClassMultiLabel
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-TextMultiClassMultiLabel
      Named entity recognition - Groups similar selections and calculates aggregate boundaries, resolving to most-assigned label.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-NamedEntityRecognition
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-NamedEntityRecognition
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-NamedEntityRecognition
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-NamedEntityRecognition
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-NamedEntityRecognition
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-NamedEntityRecognition
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-NamedEntityRecognition
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-NamedEntityRecognition
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-NamedEntityRecognition
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-NamedEntityRecognition
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-NamedEntityRecognition
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-NamedEntityRecognition
      Video Classification - Use this task type when you need workers to classify videos using predefined labels that you specify. Workers are shown videos and are asked to choose one label for each video.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-VideoMultiClass
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-VideoMultiClass
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-VideoMultiClass
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-VideoMultiClass
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-VideoMultiClass
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-VideoMultiClass
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-VideoMultiClass
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-VideoMultiClass
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-VideoMultiClass
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-VideoMultiClass
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-VideoMultiClass
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-VideoMultiClass
      Video Frame Object Detection - Use this task type to have workers identify and locate objects in a sequence of video frames (images extracted from a video) using bounding boxes. For example, you can use this task to ask workers to identify and localize various objects in a series of video frames, such as cars, bikes, and pedestrians.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-VideoObjectDetection
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-VideoObjectDetection
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-VideoObjectDetection
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-VideoObjectDetection
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-VideoObjectDetection
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-VideoObjectDetection
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-VideoObjectDetection
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-VideoObjectDetection
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-VideoObjectDetection
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-VideoObjectDetection
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-VideoObjectDetection
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-VideoObjectDetection
      Video Frame Object Tracking - Use this task type to have workers track the movement of objects in a sequence of video frames (images extracted from a video) using bounding boxes. For example, you can use this task to ask workers to track the movement of objects, such as cars, bikes, and pedestrians.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-VideoObjectTracking
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-VideoObjectTracking
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-VideoObjectTracking
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-VideoObjectTracking
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-VideoObjectTracking
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-VideoObjectTracking
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-VideoObjectTracking
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-VideoObjectTracking
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-VideoObjectTracking
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-VideoObjectTracking
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-VideoObjectTracking
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-VideoObjectTracking
      3D Point Cloud Modalities

      Use the following pre-annotation lambdas for 3D point cloud labeling modality tasks. See 3D Point Cloud Task types to learn more.

      3D Point Cloud Object Detection - Use this task type when you want workers to classify objects in a 3D point cloud by drawing 3D cuboids around objects. For example, you can use this task type to ask workers to identify different types of objects in a point cloud, such as cars, bikes, and pedestrians.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-3DPointCloudObjectDetection
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-3DPointCloudObjectDetection
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-3DPointCloudObjectDetection
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-3DPointCloudObjectDetection
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-3DPointCloudObjectDetection
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-3DPointCloudObjectDetection
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-3DPointCloudObjectDetection
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-3DPointCloudObjectDetection
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-3DPointCloudObjectDetection
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-3DPointCloudObjectDetection
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-3DPointCloudObjectDetection
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-3DPointCloudObjectDetection
      3D Point Cloud Object Tracking - Use this task type when you want workers to draw 3D cuboids around objects that appear in a sequence of 3D point cloud frames. For example, you can use this task type to ask workers to track the movement of vehicles across multiple point cloud frames.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-3DPointCloudObjectTracking
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-3DPointCloudObjectTracking
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-3DPointCloudObjectTracking
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-3DPointCloudObjectTracking
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-3DPointCloudObjectTracking
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-3DPointCloudObjectTracking
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-3DPointCloudObjectTracking
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-3DPointCloudObjectTracking
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-3DPointCloudObjectTracking
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-3DPointCloudObjectTracking
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-3DPointCloudObjectTracking
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-3DPointCloudObjectTracking
      3D Point Cloud Semantic Segmentation - Use this task type when you want workers to create a point-level semantic segmentation masks by painting objects in a 3D point cloud using different colors where each color is assigned to one of the classes you specify.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-3DPointCloudSemanticSegmentation
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-3DPointCloudSemanticSegmentation
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-3DPointCloudSemanticSegmentation
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-3DPointCloudSemanticSegmentation
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-3DPointCloudSemanticSegmentation
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-3DPointCloudSemanticSegmentation
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-3DPointCloudSemanticSegmentation
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-3DPointCloudSemanticSegmentation
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-3DPointCloudSemanticSegmentation
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-3DPointCloudSemanticSegmentation
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-3DPointCloudSemanticSegmentation
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-3DPointCloudSemanticSegmentation
      Use the following ARNs for Label Verification and Adjustment Jobs

      Use label verification and adjustment jobs to review and adjust labels. To learn more, see Verify and Adjust Labels .

      Bounding box verification - Uses a variant of the Expectation Maximization approach to estimate the true class of verification judgement for bounding box labels based on annotations from individual workers.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-Adjustment3DPointCloudObjectTracking
      Bounding box adjustment - Finds the most similar boxes from different workers based on the Jaccard index of the adjusted annotations.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-AdjustmentBoundingBox
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-AdjustmentBoundingBox
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-AdjustmentBoundingBox
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-AdjustmentBoundingBox
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-AdjustmentBoundingBox
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-AdjustmentBoundingBox
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-AdjustmentBoundingBox
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-AdjustmentBoundingBox
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-AdjustmentBoundingBox
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-AdjustmentBoundingBox
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-AdjustmentBoundingBox
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-AdjustmentBoundingBox
      Semantic segmentation verification - Uses a variant of the Expectation Maximization approach to estimate the true class of verification judgment for semantic segmentation labels based on annotations from individual workers.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-VerificationSemanticSegmentation
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-VerificationSemanticSegmentation
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-VerificationSemanticSegmentation
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-VerificationSemanticSegmentation
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-VerificationSemanticSegmentation
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-VerificationSemanticSegmentation
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-VerificationSemanticSegmentation
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-VerificationSemanticSegmentation
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-VerificationSemanticSegmentation
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-VerificationSemanticSegmentation
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-VerificationSemanticSegmentation
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-VerificationSemanticSegmentation
      Semantic segmentation adjustment - Treats each pixel in an image as a multi-class classification and treats pixel adjusted annotations from workers as "votes" for the correct label.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-AdjustmentSemanticSegmentation
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-AdjustmentSemanticSegmentation
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-AdjustmentSemanticSegmentation
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-AdjustmentSemanticSegmentation
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-AdjustmentSemanticSegmentation
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-AdjustmentSemanticSegmentation
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-AdjustmentSemanticSegmentation
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-AdjustmentSemanticSegmentation
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-AdjustmentSemanticSegmentation
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-AdjustmentSemanticSegmentation
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-AdjustmentSemanticSegmentation
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-AdjustmentSemanticSegmentation
      Video Frame Object Detection Adjustment - Use this task type when you want workers to adjust bounding boxes that workers have added to video frames to classify and localize objects in a sequence of video frames.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-AdjustmentVideoObjectDetection
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-AdjustmentVideoObjectDetection
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-AdjustmentVideoObjectDetection
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-AdjustmentVideoObjectDetection
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-AdjustmentVideoObjectDetection
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-AdjustmentVideoObjectDetection
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-AdjustmentVideoObjectDetection
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-AdjustmentVideoObjectDetection
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-AdjustmentVideoObjectDetection
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-AdjustmentVideoObjectDetection
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-AdjustmentVideoObjectDetection
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-AdjustmentVideoObjectDetection
      Video Frame Object Tracking Adjustment - Use this task type when you want workers to adjust bounding boxes that workers have added to video frames to track object movement across a sequence of video frames.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-AdjustmentVideoObjectTracking
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-AdjustmentVideoObjectTracking
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-AdjustmentVideoObjectTracking
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-AdjustmentVideoObjectTracking
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-AdjustmentVideoObjectTracking
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-AdjustmentVideoObjectTracking
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-AdjustmentVideoObjectTracking
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-AdjustmentVideoObjectTracking
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-AdjustmentVideoObjectTracking
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-AdjustmentVideoObjectTracking
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-AdjustmentVideoObjectTracking
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-AdjustmentVideoObjectTracking
      3D point cloud object detection adjustment - Adjust 3D cuboids in a point cloud frame.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-Adjustment3DPointCloudObjectDetection
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-Adjustment3DPointCloudObjectDetection
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-Adjustment3DPointCloudObjectDetection
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-Adjustment3DPointCloudObjectDetection
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-Adjustment3DPointCloudObjectDetection
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-Adjustment3DPointCloudObjectDetection
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-Adjustment3DPointCloudObjectDetection
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-Adjustment3DPointCloudObjectDetection
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-Adjustment3DPointCloudObjectDetection
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-Adjustment3DPointCloudObjectDetection
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-Adjustment3DPointCloudObjectDetection
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-Adjustment3DPointCloudObjectDetection
      3D point cloud object tracking adjustment - Adjust 3D cuboids across a sequence of point cloud frames.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-Adjustment3DPointCloudObjectTracking
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-Adjustment3DPointCloudObjectTracking
      3D point cloud semantic segmentation adjustment - Adjust semantic segmentation masks in a 3D point cloud.
      • arn:aws:lambda:us-east-1:432418664414:function:PRE-Adjustment3DPointCloudSemanticSegmentation
      • arn:aws:lambda:us-east-2:266458841044:function:PRE-Adjustment3DPointCloudSemanticSegmentation
      • arn:aws:lambda:us-west-2:081040173940:function:PRE-Adjustment3DPointCloudSemanticSegmentation
      • arn:aws:lambda:eu-west-1:568282634449:function:PRE-Adjustment3DPointCloudSemanticSegmentation
      • arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-Adjustment3DPointCloudSemanticSegmentation
      • arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-Adjustment3DPointCloudSemanticSegmentation
      • arn:aws:lambda:ap-south-1:565803892007:function:PRE-Adjustment3DPointCloudSemanticSegmentation
      • arn:aws:lambda:eu-central-1:203001061592:function:PRE-Adjustment3DPointCloudSemanticSegmentation
      • arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-Adjustment3DPointCloudSemanticSegmentation
      • arn:aws:lambda:eu-west-2:487402164563:function:PRE-Adjustment3DPointCloudSemanticSegmentation
      • arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-Adjustment3DPointCloudSemanticSegmentation
      • arn:aws:lambda:ca-central-1:918755190332:function:PRE-Adjustment3DPointCloudSemanticSegmentation
    • TaskKeywords (list) --

      Keywords used to describe the task so that workers on Amazon Mechanical Turk can discover the task.

      • (string) --
    • TaskTitle (string) -- [REQUIRED]

      A title for the task for your human workers.

    • TaskDescription (string) -- [REQUIRED]

      A description of the task for your human workers.

    • NumberOfHumanWorkersPerDataObject (integer) -- [REQUIRED]

      The number of human workers that will label an object.

    • TaskTimeLimitInSeconds (integer) -- [REQUIRED]

      The amount of time that a worker has to complete a task.

    • TaskAvailabilityLifetimeInSeconds (integer) --

      The length of time that a task remains available for labeling by human workers. If you choose the Amazon Mechanical Turk workforce, the maximum is 12 hours (43200) . The default value is 864000 seconds (10 days). For private and vendor workforces, the maximum is as listed.

    • MaxConcurrentTaskCount (integer) --

      Defines the maximum number of data objects that can be labeled by human workers at the same time. Also referred to as batch size. Each object may have more than one worker at one time. The default value is 1000 objects.

    • AnnotationConsolidationConfig (dict) -- [REQUIRED]

      Configures how labels are consolidated across human workers.

      • AnnotationConsolidationLambdaArn (string) -- [REQUIRED]

        The Amazon Resource Name (ARN) of a Lambda function implements the logic for annotation consolidation and to process output data.

        This parameter is required for all labeling jobs. For built-in task types , use one of the following Amazon SageMaker Ground Truth Lambda function ARNs for AnnotationConsolidationLambdaArn . For custom labeling workflows, see Post-annotation Lambda .

        Bounding box - Finds the most similar boxes from different workers based on the Jaccard index of the boxes.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-BoundingBox arn:aws:lambda:us-east-2:266458841044:function:ACS-BoundingBox arn:aws:lambda:us-west-2:081040173940:function:ACS-BoundingBox arn:aws:lambda:eu-west-1:568282634449:function:ACS-BoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-BoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-BoundingBox arn:aws:lambda:ap-south-1:565803892007:function:ACS-BoundingBox arn:aws:lambda:eu-central-1:203001061592:function:ACS-BoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-BoundingBox arn:aws:lambda:eu-west-2:487402164563:function:ACS-BoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-BoundingBox arn:aws:lambda:ca-central-1:918755190332:function:ACS-BoundingBox
        Image classification - Uses a variant of the Expectation Maximization approach to estimate the true class of an image based on annotations from individual workers.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-ImageMultiClass arn:aws:lambda:us-east-2:266458841044:function:ACS-ImageMultiClass arn:aws:lambda:us-west-2:081040173940:function:ACS-ImageMultiClass arn:aws:lambda:eu-west-1:568282634449:function:ACS-ImageMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-ImageMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-ImageMultiClass arn:aws:lambda:ap-south-1:565803892007:function:ACS-ImageMultiClass arn:aws:lambda:eu-central-1:203001061592:function:ACS-ImageMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-ImageMultiClass arn:aws:lambda:eu-west-2:487402164563:function:ACS-ImageMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-ImageMultiClass arn:aws:lambda:ca-central-1:918755190332:function:ACS-ImageMultiClass
        Multi-label image classification - Uses a variant of the Expectation Maximization approach to estimate the true classes of an image based on annotations from individual workers.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:us-east-2:266458841044:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:us-west-2:081040173940:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:eu-west-1:568282634449:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-south-1:565803892007:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:eu-central-1:203001061592:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:eu-west-2:487402164563:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ca-central-1:918755190332:function:ACS-ImageMultiClassMultiLabel
        Semantic segmentation - Treats each pixel in an image as a multi-class classification and treats pixel annotations from workers as "votes" for the correct label.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-SemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-SemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-SemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-SemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-SemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-SemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-SemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-SemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-SemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-SemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-SemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-SemanticSegmentation
        Text classification - Uses a variant of the Expectation Maximization approach to estimate the true class of text based on annotations from individual workers.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-TextMultiClass arn:aws:lambda:us-east-2:266458841044:function:ACS-TextMultiClass arn:aws:lambda:us-west-2:081040173940:function:ACS-TextMultiClass arn:aws:lambda:eu-west-1:568282634449:function:ACS-TextMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-TextMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-TextMultiClass arn:aws:lambda:ap-south-1:565803892007:function:ACS-TextMultiClass arn:aws:lambda:eu-central-1:203001061592:function:ACS-TextMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-TextMultiClass arn:aws:lambda:eu-west-2:487402164563:function:ACS-TextMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-TextMultiClass arn:aws:lambda:ca-central-1:918755190332:function:ACS-TextMultiClass
        Multi-label text classification - Uses a variant of the Expectation Maximization approach to estimate the true classes of text based on annotations from individual workers.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:us-east-2:266458841044:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:us-west-2:081040173940:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:eu-west-1:568282634449:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-south-1:565803892007:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:eu-central-1:203001061592:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:eu-west-2:487402164563:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ca-central-1:918755190332:function:ACS-TextMultiClassMultiLabel
        Named entity recognition - Groups similar selections and calculates aggregate boundaries, resolving to most-assigned label.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-NamedEntityRecognition arn:aws:lambda:us-east-2:266458841044:function:ACS-NamedEntityRecognition arn:aws:lambda:us-west-2:081040173940:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-west-1:568282634449:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-south-1:565803892007:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-central-1:203001061592:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-west-2:487402164563:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-NamedEntityRecognition arn:aws:lambda:ca-central-1:918755190332:function:ACS-NamedEntityRecognition
        Named entity recognition - Groups similar selections and calculates aggregate boundaries, resolving to most-assigned label.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-NamedEntityRecognition arn:aws:lambda:us-east-2:266458841044:function:ACS-NamedEntityRecognition arn:aws:lambda:us-west-2:081040173940:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-west-1:568282634449:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-south-1:565803892007:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-central-1:203001061592:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-west-2:487402164563:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-NamedEntityRecognition arn:aws:lambda:ca-central-1:918755190332:function:ACS-NamedEntityRecognition
        Video Classification - Use this task type when you need workers to classify videos using predefined labels that you specify. Workers are shown videos and are asked to choose one label for each video.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-VideoMultiClass arn:aws:lambda:us-east-2:266458841044:function:ACS-VideoMultiClass arn:aws:lambda:us-west-2:081040173940:function:ACS-VideoMultiClass arn:aws:lambda:eu-west-1:568282634449:function:ACS-VideoMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VideoMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VideoMultiClass arn:aws:lambda:ap-south-1:565803892007:function:ACS-VideoMultiClass arn:aws:lambda:eu-central-1:203001061592:function:ACS-VideoMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VideoMultiClass arn:aws:lambda:eu-west-2:487402164563:function:ACS-VideoMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VideoMultiClass arn:aws:lambda:ca-central-1:918755190332:function:ACS-VideoMultiClass
        Video Frame Object Detection - Use this task type to have workers identify and locate objects in a sequence of video frames (images extracted from a video) using bounding boxes. For example, you can use this task to ask workers to identify and localize various objects in a series of video frames, such as cars, bikes, and pedestrians.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-VideoObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-VideoObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-VideoObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-VideoObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VideoObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VideoObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-VideoObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-VideoObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VideoObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-VideoObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VideoObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-VideoObjectDetection
        Video Frame Object Tracking - Use this task type to have workers track the movement of objects in a sequence of video frames (images extracted from a video) using bounding boxes. For example, you can use this task to ask workers to track the movement of objects, such as cars, bikes, and pedestrians.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-VideoObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-VideoObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-VideoObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-VideoObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VideoObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VideoObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-VideoObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-VideoObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VideoObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-VideoObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VideoObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-VideoObjectTracking
        3D point cloud object detection - Use this task type when you want workers to classify objects in a 3D point cloud by drawing 3D cuboids around objects. For example, you can use this task type to ask workers to identify different types of objects in a point cloud, such as cars, bikes, and pedestrians.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-3DPointCloudObjectDetection
        3D point cloud object tracking - Use this task type when you want workers to draw 3D cuboids around objects that appear in a sequence of 3D point cloud frames. For example, you can use this task type to ask workers to track the movement of vehicles across multiple point cloud frames.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-3DPointCloudObjectTracking
        3D point cloud semantic segmentation - Use this task type when you want workers to create a point-level semantic segmentation masks by painting objects in a 3D point cloud using different colors where each color is assigned to one of the classes you specify.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-3DPointCloudSemanticSegmentation
        Use the following ARNs for Label Verification and Adjustment Jobs

        Use label verification and adjustment jobs to review and adjust labels. To learn more, see Verify and Adjust Labels .

        Semantic segmentation adjustment - Treats each pixel in an image as a multi-class classification and treats pixel adjusted annotations from workers as "votes" for the correct label.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentSemanticSegmentation
        Semantic segmentation verification - Uses a variant of the Expectation Maximization approach to estimate the true class of verification judgment for semantic segmentation labels based on annotations from individual workers.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-VerificationSemanticSegmentation
        Bounding box verification - Uses a variant of the Expectation Maximization approach to estimate the true class of verification judgement for bounding box labels based on annotations from individual workers.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-VerificationBoundingBox arn:aws:lambda:us-east-2:266458841044:function:ACS-VerificationBoundingBox arn:aws:lambda:us-west-2:081040173940:function:ACS-VerificationBoundingBox arn:aws:lambda:eu-west-1:568282634449:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-south-1:565803892007:function:ACS-VerificationBoundingBox arn:aws:lambda:eu-central-1:203001061592:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VerificationBoundingBox arn:aws:lambda:eu-west-2:487402164563:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VerificationBoundingBox arn:aws:lambda:ca-central-1:918755190332:function:ACS-VerificationBoundingBox
        Bounding box adjustment - Finds the most similar boxes from different workers based on the Jaccard index of the adjusted annotations.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentBoundingBox arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentBoundingBox arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentBoundingBox arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentBoundingBox arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentBoundingBox arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentBoundingBox
        Video Frame Object Detection Adjustment - Use this task type when you want workers to adjust bounding boxes that workers have added to video frames to classify and localize objects in a sequence of video frames.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentVideoObjectDetection
        Video Frame Object Tracking Adjustment - Use this task type when you want workers to adjust bounding boxes that workers have added to video frames to track object movement across a sequence of video frames.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentVideoObjectTracking
        3D point cloud object detection adjustment - Use this task type when you want workers to adjust 3D cuboids around objects in a 3D point cloud.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-Adjustment3DPointCloudObjectDetection
        3D point cloud object tracking adjustment - Use this task type when you want workers to adjust 3D cuboids around objects that appear in a sequence of 3D point cloud frames.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-Adjustment3DPointCloudObjectTracking
        3D point cloud semantic segmentation adjustment - Use this task type when you want workers to adjust a point-level semantic segmentation masks using a paint tool.
        • arn:aws:lambda:us-east-1:432418664414:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-Adjustment3DPointCloudSemanticSegmentation
    • PublicWorkforceTaskPrice (dict) --

      The price that you pay for each task performed by an Amazon Mechanical Turk worker.

      • AmountInUsd (dict) --

        Defines the amount of money paid to an Amazon Mechanical Turk worker in United States dollars.

        • Dollars (integer) --

          The whole number of dollars in the amount.

        • Cents (integer) --

          The fractional portion, in cents, of the amount.

        • TenthFractionsOfACent (integer) --

          Fractions of a cent, in tenths.

  • Tags (list) --

    An array of key/value pairs. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'LabelingJobArn': 'string'
}

Response Structure

  • (dict) --

    • LabelingJobArn (string) --

      The Amazon Resource Name (ARN) of the labeling job. You use this ARN to identify the labeling job.

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_model(**kwargs)

Creates a model in Amazon SageMaker. In the request, you name the model and describe a primary container. For the primary container, you specify the Docker image that contains inference code, artifacts (from prior training), and a custom environment map that the inference code uses when you deploy the model for predictions.

Use this API to create a model if you want to use Amazon SageMaker hosting services or run a batch transform job.

To host your model, you create an endpoint configuration with the CreateEndpointConfig API, and then create an endpoint with the CreateEndpoint API. Amazon SageMaker then deploys all of the containers that you defined for the model in the hosting environment.

For an example that calls this method when deploying a model to Amazon SageMaker hosting services, see Deploy the Model to Amazon SageMaker Hosting Services (AWS SDK for Python (Boto 3)).

To run a batch transform using your model, you start a job with the CreateTransformJob API. Amazon SageMaker uses your model and your dataset to get inferences which are then saved to a specified S3 location.

In the CreateModel request, you must define a container with the PrimaryContainer parameter.

In the request, you also provide an IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on ML compute hosting instances or for batch transform jobs. In addition, you also use the IAM role to manage permissions the inference code needs. For example, if the inference code access any other AWS resources, you grant necessary permissions via this role.

See also: AWS API Documentation

Request Syntax

response = client.create_model(
    ModelName='string',
    PrimaryContainer={
        'ContainerHostname': 'string',
        'Image': 'string',
        'ImageConfig': {
            'RepositoryAccessMode': 'Platform'|'Vpc'
        },
        'Mode': 'SingleModel'|'MultiModel',
        'ModelDataUrl': 'string',
        'Environment': {
            'string': 'string'
        },
        'ModelPackageName': 'string'
    },
    Containers=[
        {
            'ContainerHostname': 'string',
            'Image': 'string',
            'ImageConfig': {
                'RepositoryAccessMode': 'Platform'|'Vpc'
            },
            'Mode': 'SingleModel'|'MultiModel',
            'ModelDataUrl': 'string',
            'Environment': {
                'string': 'string'
            },
            'ModelPackageName': 'string'
        },
    ],
    ExecutionRoleArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    VpcConfig={
        'SecurityGroupIds': [
            'string',
        ],
        'Subnets': [
            'string',
        ]
    },
    EnableNetworkIsolation=True|False
)
Parameters
  • ModelName (string) --

    [REQUIRED]

    The name of the new model.

  • PrimaryContainer (dict) --

    The location of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions.

    • ContainerHostname (string) --

      This parameter is ignored for models that contain only a PrimaryContainer .

      When a ContainerDefinition is part of an inference pipeline, the value of the parameter uniquely identifies the container for the purposes of logging and metrics. For information, see Use Logs and Metrics to Monitor an Inference Pipeline . If you don't specify a value for this parameter for a ContainerDefinition that is part of an inference pipeline, a unique name is automatically assigned based on the position of the ContainerDefinition in the pipeline. If you specify a value for the ContainerHostName for any ContainerDefinition that is part of an inference pipeline, you must specify a value for the ContainerHostName parameter of every ContainerDefinition in that pipeline.

    • Image (string) --

      The path where inference code is stored. This can be either in Amazon EC2 Container Registry or in a Docker registry that is accessible from the same VPC that you configure for your endpoint. If you are using your own custom algorithm instead of an algorithm provided by Amazon SageMaker, the inference code must meet Amazon SageMaker requirements. Amazon SageMaker supports both registry/repository[:tag] and registry/repository[@digest] image path formats. For more information, see Using Your Own Algorithms with Amazon SageMaker

    • ImageConfig (dict) --

      Specifies whether the model container is in Amazon ECR or a private Docker registry accessible from your Amazon Virtual Private Cloud (VPC). For information about storing containers in a private Docker registry, see Use a Private Docker Registry for Real-Time Inference Containers

      • RepositoryAccessMode (string) -- [REQUIRED]

        Set this to one of the following values:

        • Platform - The model image is hosted in Amazon ECR.
        • Vpc - The model image is hosted in a private Docker registry in your VPC.
    • Mode (string) --

      Whether the container hosts a single model or multiple models.

    • ModelDataUrl (string) --

      The S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). The S3 path is required for Amazon SageMaker built-in algorithms, but not if you use your own algorithms. For more information on built-in algorithms, see Common Parameters .

      Note

      The model artifacts must be in an S3 bucket that is in the same region as the model or endpoint you are creating.

      If you provide a value for this parameter, Amazon SageMaker uses AWS Security Token Service to download model artifacts from the S3 path you provide. AWS STS is activated in your IAM user account by default. If you previously deactivated AWS STS for a region, you need to reactivate AWS STS for that region. For more information, see Activating and Deactivating AWS STS in an AWS Region in the AWS Identity and Access Management User Guide .

      Warning

      If you use a built-in algorithm to create a model, Amazon SageMaker requires that you provide a S3 path to the model artifacts in ModelDataUrl .

    • Environment (dict) --

      The environment variables to set in the Docker container. Each key and value in the Environment string to string map can have length of up to 1024. We support up to 16 entries in the map.

      • (string) --
        • (string) --
    • ModelPackageName (string) --

      The name or Amazon Resource Name (ARN) of the model package to use to create the model.

  • Containers (list) --

    Specifies the containers in the inference pipeline.

    • (dict) --

      Describes the container, as part of model definition.

      • ContainerHostname (string) --

        This parameter is ignored for models that contain only a PrimaryContainer .

        When a ContainerDefinition is part of an inference pipeline, the value of the parameter uniquely identifies the container for the purposes of logging and metrics. For information, see Use Logs and Metrics to Monitor an Inference Pipeline . If you don't specify a value for this parameter for a ContainerDefinition that is part of an inference pipeline, a unique name is automatically assigned based on the position of the ContainerDefinition in the pipeline. If you specify a value for the ContainerHostName for any ContainerDefinition that is part of an inference pipeline, you must specify a value for the ContainerHostName parameter of every ContainerDefinition in that pipeline.

      • Image (string) --

        The path where inference code is stored. This can be either in Amazon EC2 Container Registry or in a Docker registry that is accessible from the same VPC that you configure for your endpoint. If you are using your own custom algorithm instead of an algorithm provided by Amazon SageMaker, the inference code must meet Amazon SageMaker requirements. Amazon SageMaker supports both registry/repository[:tag] and registry/repository[@digest] image path formats. For more information, see Using Your Own Algorithms with Amazon SageMaker

      • ImageConfig (dict) --

        Specifies whether the model container is in Amazon ECR or a private Docker registry accessible from your Amazon Virtual Private Cloud (VPC). For information about storing containers in a private Docker registry, see Use a Private Docker Registry for Real-Time Inference Containers

        • RepositoryAccessMode (string) -- [REQUIRED]

          Set this to one of the following values:

          • Platform - The model image is hosted in Amazon ECR.
          • Vpc - The model image is hosted in a private Docker registry in your VPC.
      • Mode (string) --

        Whether the container hosts a single model or multiple models.

      • ModelDataUrl (string) --

        The S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). The S3 path is required for Amazon SageMaker built-in algorithms, but not if you use your own algorithms. For more information on built-in algorithms, see Common Parameters .

        Note

        The model artifacts must be in an S3 bucket that is in the same region as the model or endpoint you are creating.

        If you provide a value for this parameter, Amazon SageMaker uses AWS Security Token Service to download model artifacts from the S3 path you provide. AWS STS is activated in your IAM user account by default. If you previously deactivated AWS STS for a region, you need to reactivate AWS STS for that region. For more information, see Activating and Deactivating AWS STS in an AWS Region in the AWS Identity and Access Management User Guide .

        Warning

        If you use a built-in algorithm to create a model, Amazon SageMaker requires that you provide a S3 path to the model artifacts in ModelDataUrl .

      • Environment (dict) --

        The environment variables to set in the Docker container. Each key and value in the Environment string to string map can have length of up to 1024. We support up to 16 entries in the map.

        • (string) --
          • (string) --
      • ModelPackageName (string) --

        The name or Amazon Resource Name (ARN) of the model package to use to create the model.

  • ExecutionRoleArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances or for batch transform jobs. Deploying on ML compute instances is part of model hosting. For more information, see Amazon SageMaker Roles .

    Note

    To be able to pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission.

  • Tags (list) --

    An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging AWS Resources .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

  • VpcConfig (dict) --

    A VpcConfig object that specifies the VPC that you want your model to connect to. Control access to and from your model container by configuring the VPC. VpcConfig is used in hosting services and in batch transform. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud and Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud .

    • SecurityGroupIds (list) -- [REQUIRED]

      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) -- [REQUIRED]

      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) --
  • EnableNetworkIsolation (boolean) -- Isolates the model container. No inbound or outbound network calls can be made to or from the model container.
Return type

dict

Returns

Response Syntax

{
    'ModelArn': 'string'
}

Response Structure

  • (dict) --

    • ModelArn (string) --

      The ARN of the model created in Amazon SageMaker.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_model_package(**kwargs)

Creates a model package that you can use to create Amazon SageMaker models or list on AWS Marketplace, or a versioned model that is part of a model group. Buyers can subscribe to model packages listed on AWS Marketplace to create models in Amazon SageMaker.

To create a model package by specifying a Docker container that contains your inference code and the Amazon S3 location of your model artifacts, provide values for InferenceSpecification . To create a model from an algorithm resource that you created or subscribed to in AWS Marketplace, provide a value for SourceAlgorithmSpecification .

Note

There are two types of model packages:

  • Versioned - a model that is part of a model group in the model registry.
  • Unversioned - a model package that is not part of a model group.

See also: AWS API Documentation

Request Syntax

response = client.create_model_package(
    ModelPackageName='string',
    ModelPackageGroupName='string',
    ModelPackageDescription='string',
    InferenceSpecification={
        'Containers': [
            {
                'ContainerHostname': 'string',
                'Image': 'string',
                'ImageDigest': 'string',
                'ModelDataUrl': 'string',
                'ProductId': 'string'
            },
        ],
        'SupportedTransformInstanceTypes': [
            'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge',
        ],
        'SupportedRealtimeInferenceInstanceTypes': [
            'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.12xlarge'|'ml.m5d.24xlarge'|'ml.c4.large'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.large'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.12xlarge'|'ml.r5.24xlarge'|'ml.r5d.large'|'ml.r5d.xlarge'|'ml.r5d.2xlarge'|'ml.r5d.4xlarge'|'ml.r5d.12xlarge'|'ml.r5d.24xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge',
        ],
        'SupportedContentTypes': [
            'string',
        ],
        'SupportedResponseMIMETypes': [
            'string',
        ]
    },
    ValidationSpecification={
        'ValidationRole': 'string',
        'ValidationProfiles': [
            {
                'ProfileName': 'string',
                'TransformJobDefinition': {
                    'MaxConcurrentTransforms': 123,
                    'MaxPayloadInMB': 123,
                    'BatchStrategy': 'MultiRecord'|'SingleRecord',
                    'Environment': {
                        'string': 'string'
                    },
                    'TransformInput': {
                        'DataSource': {
                            'S3DataSource': {
                                'S3DataType': 'ManifestFile'|'S3Prefix'|'AugmentedManifestFile',
                                'S3Uri': 'string'
                            }
                        },
                        'ContentType': 'string',
                        'CompressionType': 'None'|'Gzip',
                        'SplitType': 'None'|'Line'|'RecordIO'|'TFRecord'
                    },
                    'TransformOutput': {
                        'S3OutputPath': 'string',
                        'Accept': 'string',
                        'AssembleWith': 'None'|'Line',
                        'KmsKeyId': 'string'
                    },
                    'TransformResources': {
                        'InstanceType': 'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge',
                        'InstanceCount': 123,
                        'VolumeKmsKeyId': 'string'
                    }
                }
            },
        ]
    },
    SourceAlgorithmSpecification={
        'SourceAlgorithms': [
            {
                'ModelDataUrl': 'string',
                'AlgorithmName': 'string'
            },
        ]
    },
    CertifyForMarketplace=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    ModelApprovalStatus='Approved'|'Rejected'|'PendingManualApproval',
    MetadataProperties={
        'CommitId': 'string',
        'Repository': 'string',
        'GeneratedBy': 'string',
        'ProjectId': 'string'
    },
    ModelMetrics={
        'ModelQuality': {
            'Statistics': {
                'ContentType': 'string',
                'ContentDigest': 'string',
                'S3Uri': 'string'
            },
            'Constraints': {
                'ContentType': 'string',
                'ContentDigest': 'string',
                'S3Uri': 'string'
            }
        },
        'ModelDataQuality': {
            'Statistics': {
                'ContentType': 'string',
                'ContentDigest': 'string',
                'S3Uri': 'string'
            },
            'Constraints': {
                'ContentType': 'string',
                'ContentDigest': 'string',
                'S3Uri': 'string'
            }
        },
        'Bias': {
            'Report': {
                'ContentType': 'string',
                'ContentDigest': 'string',
                'S3Uri': 'string'
            }
        },
        'Explainability': {
            'Report': {
                'ContentType': 'string',
                'ContentDigest': 'string',
                'S3Uri': 'string'
            }
        }
    },
    ClientToken='string'
)
Parameters
  • ModelPackageName (string) --

    The name of the model package. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).

    This parameter is required for unversioned models. It is not applicable to versioned models.

  • ModelPackageGroupName (string) --

    The name of the model group that this model version belongs to.

    This parameter is required for versioned models, and does not apply to unversioned models.

  • ModelPackageDescription (string) -- A description of the model package.
  • InferenceSpecification (dict) --

    Specifies details about inference jobs that can be run with models based on this model package, including the following:

    • The Amazon ECR paths of containers that contain the inference code and model artifacts.
    • The instance types that the model package supports for transform jobs and real-time endpoints used for inference.
    • The input and output content formats that the model package supports for inference.
    • Containers (list) -- [REQUIRED]

      The Amazon ECR registry path of the Docker image that contains the inference code.

      • (dict) --

        Describes the Docker container for the model package.

        • ContainerHostname (string) --

          The DNS host name for the Docker container.

        • Image (string) -- [REQUIRED]

          The Amazon EC2 Container Registry (Amazon ECR) path where inference code is stored.

          If you are using your own custom algorithm instead of an algorithm provided by Amazon SageMaker, the inference code must meet Amazon SageMaker requirements. Amazon SageMaker supports both registry/repository[:tag] and registry/repository[@digest] image path formats. For more information, see Using Your Own Algorithms with Amazon SageMaker .

        • ImageDigest (string) --

          An MD5 hash of the training algorithm that identifies the Docker image used for training.

        • ModelDataUrl (string) --

          The Amazon S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix).

          Note

          The model artifacts must be in an S3 bucket that is in the same region as the model package.

        • ProductId (string) --

          The AWS Marketplace product ID of the model package.

    • SupportedTransformInstanceTypes (list) --

      A list of the instance types on which a transformation job can be run or on which an endpoint can be deployed.

      This parameter is required for unversioned models, and optional for versioned models.

      • (string) --
    • SupportedRealtimeInferenceInstanceTypes (list) --

      A list of the instance types that are used to generate inferences in real-time.

      This parameter is required for unversioned models, and optional for versioned models.

      • (string) --
    • SupportedContentTypes (list) -- [REQUIRED]

      The supported MIME types for the input data.

      • (string) --
    • SupportedResponseMIMETypes (list) -- [REQUIRED]

      The supported MIME types for the output data.

      • (string) --
  • ValidationSpecification (dict) --

    Specifies configurations for one or more transform jobs that Amazon SageMaker runs to test the model package.

    • ValidationRole (string) -- [REQUIRED]

      The IAM roles to be used for the validation of the model package.

    • ValidationProfiles (list) -- [REQUIRED]

      An array of ModelPackageValidationProfile objects, each of which specifies a batch transform job that Amazon SageMaker runs to validate your model package.

      • (dict) --

        Contains data, such as the inputs and targeted instance types that are used in the process of validating the model package.

        The data provided in the validation profile is made available to your buyers on AWS Marketplace.

        • ProfileName (string) -- [REQUIRED]

          The name of the profile for the model package.

        • TransformJobDefinition (dict) -- [REQUIRED]

          The TransformJobDefinition object that describes the transform job used for the validation of the model package.

          • MaxConcurrentTransforms (integer) --

            The maximum number of parallel requests that can be sent to each instance in a transform job. The default value is 1.

          • MaxPayloadInMB (integer) --

            The maximum payload size allowed, in MB. A payload is the data portion of a record (without metadata).

          • BatchStrategy (string) --

            A string that determines the number of records included in a single mini-batch.

            SingleRecord means only one record is used per mini-batch. MultiRecord means a mini-batch is set to contain as many records that can fit within the MaxPayloadInMB limit.
          • Environment (dict) --

            The environment variables to set in the Docker container. We support up to 16 key and values entries in the map.

            • (string) --
              • (string) --
          • TransformInput (dict) -- [REQUIRED]

            A description of the input source and the way the transform job consumes it.

            • DataSource (dict) -- [REQUIRED]

              Describes the location of the channel data, which is, the S3 location of the input data that the model can consume.

              • S3DataSource (dict) -- [REQUIRED]

                The S3 location of the data source that is associated with a channel.

                • S3DataType (string) -- [REQUIRED]

                  If you choose S3Prefix , S3Uri identifies a key name prefix. Amazon SageMaker uses all objects with the specified key name prefix for batch transform.

                  If you choose ManifestFile , S3Uri identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for batch transform.

                  The following values are compatible: ManifestFile , S3Prefix

                  The following value is not compatible: AugmentedManifestFile

                • S3Uri (string) -- [REQUIRED]

                  Depending on the value specified for the S3DataType , identifies either a key name prefix or a manifest. For example:

                  • A key name prefix might look like this: s3://bucketname/exampleprefix .
                  • A manifest might look like this: s3://bucketname/example.manifest The manifest is an S3 object which is a JSON file with the following format: [ {"prefix": "s3://customer_bucket/some/prefix/"}, "relative/path/to/custdata-1", "relative/path/custdata-2", ... "relative/path/custdata-N" ] The preceding JSON matches the following S3Uris : s3://customer_bucket/some/prefix/relative/path/to/custdata-1 s3://customer_bucket/some/prefix/relative/path/custdata-2 ... s3://customer_bucket/some/prefix/relative/path/custdata-N The complete set of S3Uris in this manifest constitutes the input data for the channel for this datasource. The object that each S3Uris points to must be readable by the IAM role that Amazon SageMaker uses to perform tasks on your behalf.
            • ContentType (string) --

              The multipurpose internet mail extension (MIME) type of the data. Amazon SageMaker uses the MIME type with each http call to transfer data to the transform job.

            • CompressionType (string) --

              If your transform data is compressed, specify the compression type. Amazon SageMaker automatically decompresses the data for the transform job accordingly. The default value is None .

            • SplitType (string) --

              The method to use to split the transform job's data files into smaller batches. Splitting is necessary when the total size of each object is too large to fit in a single request. You can also use data splitting to improve performance by processing multiple concurrent mini-batches. The default value for SplitType is None , which indicates that input data files are not split, and request payloads contain the entire contents of an input object. Set the value of this parameter to Line to split records on a newline character boundary. SplitType also supports a number of record-oriented binary data formats. Currently, the supported record formats are:

              • RecordIO
              • TFRecord

              When splitting is enabled, the size of a mini-batch depends on the values of the BatchStrategy and MaxPayloadInMB parameters. When the value of BatchStrategy is MultiRecord , Amazon SageMaker sends the maximum number of records in each request, up to the MaxPayloadInMB limit. If the value of BatchStrategy is SingleRecord , Amazon SageMaker sends individual records in each request.

              Note

              Some data formats represent a record as a binary payload wrapped with extra padding bytes. When splitting is applied to a binary data format, padding is removed if the value of BatchStrategy is set to SingleRecord . Padding is not removed if the value of BatchStrategy is set to MultiRecord .

              For more information about RecordIO , see Create a Dataset Using RecordIO in the MXNet documentation. For more information about TFRecord , see Consuming TFRecord data in the TensorFlow documentation.

          • TransformOutput (dict) -- [REQUIRED]

            Identifies the Amazon S3 location where you want Amazon SageMaker to save the results from the transform job.

            • S3OutputPath (string) -- [REQUIRED]

              The Amazon S3 path where you want Amazon SageMaker to store the results of the transform job. For example, s3://bucket-name/key-name-prefix .

              For every S3 object used as input for the transform job, batch transform stores the transformed data with an .``out`` suffix in a corresponding subfolder in the location in the output prefix. For example, for the input data stored at s3://bucket-name/input-name-prefix/dataset01/data.csv , batch transform stores the transformed data at s3://bucket-name/output-name-prefix/input-name-prefix/data.csv.out . Batch transform doesn't upload partially processed objects. For an input S3 object that contains multiple records, it creates an .``out`` file only if the transform job succeeds on the entire file. When the input contains multiple S3 objects, the batch transform job processes the listed S3 objects and uploads only the output for successfully processed objects. If any object fails in the transform job batch transform marks the job as failed to prompt investigation.

            • Accept (string) --

              The MIME type used to specify the output data. Amazon SageMaker uses the MIME type with each http call to transfer data from the transform job.

            • AssembleWith (string) --

              Defines how to assemble the results of the transform job as a single S3 object. Choose a format that is most convenient to you. To concatenate the results in binary format, specify None . To add a newline character at the end of every transformed record, specify Line .

            • KmsKeyId (string) --

              The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats:

              • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
              • Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
              • Alias name: alias/ExampleAlias
              • Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias

              If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.

              The KMS key policy must grant permission to the IAM role that you specify in your CreateModel request. For more information, see Using Key Policies in AWS KMS in the AWS Key Management Service Developer Guide .

          • TransformResources (dict) -- [REQUIRED]

            Identifies the ML compute instances for the transform job.

            • InstanceType (string) -- [REQUIRED]

              The ML compute instance type for the transform job. If you are using built-in algorithms to transform moderately sized datasets, we recommend using ml.m4.xlarge or ml.m5.large instance types.

            • InstanceCount (integer) -- [REQUIRED]

              The number of ML compute instances to use in the transform job. For distributed transform jobs, specify a value greater than 1. The default value is 1 .

            • VolumeKmsKeyId (string) --

              The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt model data on the storage volume attached to the ML compute instance(s) that run the batch transform job. The VolumeKmsKeyId can be any of the following formats:

              • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
              • Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
              • Alias name: alias/ExampleAlias
              • Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias
  • SourceAlgorithmSpecification (dict) --

    Details about the algorithm that was used to create the model package.

    • SourceAlgorithms (list) -- [REQUIRED]

      A list of the algorithms that were used to create a model package.

      • (dict) --

        Specifies an algorithm that was used to create the model package. The algorithm must be either an algorithm resource in your Amazon SageMaker account or an algorithm in AWS Marketplace that you are subscribed to.

        • ModelDataUrl (string) --

          The Amazon S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix).

          Note

          The model artifacts must be in an S3 bucket that is in the same region as the algorithm.

        • AlgorithmName (string) -- [REQUIRED]

          The name of an algorithm that was used to create the model package. The algorithm must be either an algorithm resource in your Amazon SageMaker account or an algorithm in AWS Marketplace that you are subscribed to.

  • CertifyForMarketplace (boolean) --

    Whether to certify the model package for listing on AWS Marketplace.

    This parameter is optional for unversioned models, and does not apply to versioned models.

  • Tags (list) --

    A list of key value pairs associated with the model. For more information, see Tagging AWS resources in the AWS General Reference Guide .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

  • ModelApprovalStatus (string) --

    Whether the model is approved for deployment.

    This parameter is optional for versioned models, and does not apply to unversioned models.

    For versioned models, the value of this parameter must be set to Approved to deploy the model.

  • MetadataProperties (dict) --

    Metadata properties of the tracking entity, trial, or trial component.

    • CommitId (string) --

      The commit ID.

    • Repository (string) --

      The repository.

    • GeneratedBy (string) --

      The entity this entity was generated by.

    • ProjectId (string) --

      The project ID.

  • ModelMetrics (dict) --

    A structure that contains model metrics reports.

    • ModelQuality (dict) --

      Metrics that measure the quality of a model.

      • Statistics (dict) --

        Model quality statistics.

        • ContentType (string) -- [REQUIRED]
        • ContentDigest (string) --
        • S3Uri (string) -- [REQUIRED]
      • Constraints (dict) --

        Model quality constraints.

        • ContentType (string) -- [REQUIRED]
        • ContentDigest (string) --
        • S3Uri (string) -- [REQUIRED]
    • ModelDataQuality (dict) --

      Metrics that measure the quality of the input data for a model.

      • Statistics (dict) --

        Data quality statistics for a model.

        • ContentType (string) -- [REQUIRED]
        • ContentDigest (string) --
        • S3Uri (string) -- [REQUIRED]
      • Constraints (dict) --

        Data quality constraints for a model.

        • ContentType (string) -- [REQUIRED]
        • ContentDigest (string) --
        • S3Uri (string) -- [REQUIRED]
    • Bias (dict) --

      Metrics that measure bais in a model.

      • Report (dict) --

        The bias report for a model

        • ContentType (string) -- [REQUIRED]
        • ContentDigest (string) --
        • S3Uri (string) -- [REQUIRED]
    • Explainability (dict) --

      Metrics that help explain a model.

      • Report (dict) --

        The explainability report for a model.

        • ContentType (string) -- [REQUIRED]
        • ContentDigest (string) --
        • S3Uri (string) -- [REQUIRED]
  • ClientToken (string) --

    A unique token that guarantees that the call to this API is idempotent.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'ModelPackageArn': 'string'
}

Response Structure

  • (dict) --

    • ModelPackageArn (string) --

      The Amazon Resource Name (ARN) of the new model package.

Exceptions

  • SageMaker.Client.exceptions.ConflictException
  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_model_package_group(**kwargs)

Creates a model group. A model group contains a group of model versions.

See also: AWS API Documentation

Request Syntax

response = client.create_model_package_group(
    ModelPackageGroupName='string',
    ModelPackageGroupDescription='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ModelPackageGroupName (string) --

    [REQUIRED]

    The name of the model group.

  • ModelPackageGroupDescription (string) -- A description for the model group.
  • Tags (list) --

    A list of key value pairs associated with the model group. For more information, see Tagging AWS resources in the AWS General Reference Guide .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'ModelPackageGroupArn': 'string'
}

Response Structure

  • (dict) --

    • ModelPackageGroupArn (string) --

      The Amazon Resource Name (ARN) of the model group.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_monitoring_schedule(**kwargs)

Creates a schedule that regularly starts Amazon SageMaker Processing Jobs to monitor the data captured for an Amazon SageMaker Endoint.

See also: AWS API Documentation

Request Syntax

response = client.create_monitoring_schedule(
    MonitoringScheduleName='string',
    MonitoringScheduleConfig={
        'ScheduleConfig': {
            'ScheduleExpression': 'string'
        },
        'MonitoringJobDefinition': {
            'BaselineConfig': {
                'ConstraintsResource': {
                    'S3Uri': 'string'
                },
                'StatisticsResource': {
                    'S3Uri': 'string'
                }
            },
            'MonitoringInputs': [
                {
                    'EndpointInput': {
                        'EndpointName': 'string',
                        'LocalPath': 'string',
                        'S3InputMode': 'Pipe'|'File',
                        'S3DataDistributionType': 'FullyReplicated'|'ShardedByS3Key'
                    }
                },
            ],
            'MonitoringOutputConfig': {
                'MonitoringOutputs': [
                    {
                        'S3Output': {
                            'S3Uri': 'string',
                            'LocalPath': 'string',
                            'S3UploadMode': 'Continuous'|'EndOfJob'
                        }
                    },
                ],
                'KmsKeyId': 'string'
            },
            'MonitoringResources': {
                'ClusterConfig': {
                    'InstanceCount': 123,
                    'InstanceType': 'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.8xlarge'|'ml.r5.12xlarge'|'ml.r5.16xlarge'|'ml.r5.24xlarge',
                    'VolumeSizeInGB': 123,
                    'VolumeKmsKeyId': 'string'
                }
            },
            'MonitoringAppSpecification': {
                'ImageUri': 'string',
                'ContainerEntrypoint': [
                    'string',
                ],
                'ContainerArguments': [
                    'string',
                ],
                'RecordPreprocessorSourceUri': 'string',
                'PostAnalyticsProcessorSourceUri': 'string'
            },
            'StoppingCondition': {
                'MaxRuntimeInSeconds': 123
            },
            'Environment': {
                'string': 'string'
            },
            'NetworkConfig': {
                'EnableInterContainerTrafficEncryption': True|False,
                'EnableNetworkIsolation': True|False,
                'VpcConfig': {
                    'SecurityGroupIds': [
                        'string',
                    ],
                    'Subnets': [
                        'string',
                    ]
                }
            },
            'RoleArn': 'string'
        }
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • MonitoringScheduleName (string) --

    [REQUIRED]

    The name of the monitoring schedule. The name must be unique within an AWS Region within an AWS account.

  • MonitoringScheduleConfig (dict) --

    [REQUIRED]

    The configuration object that specifies the monitoring schedule and defines the monitoring job.

    • ScheduleConfig (dict) --

      Configures the monitoring schedule.

      • ScheduleExpression (string) -- [REQUIRED]

        A cron expression that describes details about the monitoring schedule.

        Currently the only supported cron expressions are:

        • If you want to set the job to start every hour, please use the following: Hourly: cron(0 * ? * * *)
        • If you want to start the job daily: cron(0 [00-23] ? * * *)

        For example, the following are valid cron expressions:

        • Daily at noon UTC: cron(0 12 ? * * *)
        • Daily at midnight UTC: cron(0 0 ? * * *)

        To support running every 6, 12 hours, the following are also supported:

        cron(0 [00-23]/[01-24] ? * * *)

        For example, the following are valid cron expressions:

        • Every 12 hours, starting at 5pm UTC: cron(0 17/12 ? * * *)
        • Every two hours starting at midnight: cron(0 0/2 ? * * *)

        Note

        • Even though the cron expression is set to start at 5PM UTC, note that there could be a delay of 0-20 minutes from the actual requested time to run the execution.
        • We recommend that if you would like a daily schedule, you do not provide this parameter. Amazon SageMaker will pick a time for running every day.
    • MonitoringJobDefinition (dict) --

      Defines the monitoring job.

      • BaselineConfig (dict) --

        Baseline configuration used to validate that the data conforms to the specified constraints and statistics

        • ConstraintsResource (dict) --

          The baseline constraint file in Amazon S3 that the current monitoring job should validated against.

          • S3Uri (string) --

            The Amazon S3 URI for the constraints resource.

        • StatisticsResource (dict) --

          The baseline statistics file in Amazon S3 that the current monitoring job should be validated against.

          • S3Uri (string) --

            The Amazon S3 URI for the statistics resource.

      • MonitoringInputs (list) -- [REQUIRED]

        The array of inputs for the monitoring job. Currently we support monitoring an Amazon SageMaker Endpoint.

        • (dict) --

          The inputs for a monitoring job.

          • EndpointInput (dict) -- [REQUIRED]

            The endpoint for a monitoring job.

            • EndpointName (string) -- [REQUIRED]

              An endpoint in customer's account which has enabled DataCaptureConfig enabled.

            • LocalPath (string) -- [REQUIRED]

              Path to the filesystem where the endpoint data is available to the container.

            • S3InputMode (string) --

              Whether the Pipe or File is used as the input mode for transfering data for the monitoring job. Pipe mode is recommended for large datasets. File mode is useful for small files that fit in memory. Defaults to File .

            • S3DataDistributionType (string) --

              Whether input data distributed in Amazon S3 is fully replicated or sharded by an S3 key. Defauts to FullyReplicated

      • MonitoringOutputConfig (dict) -- [REQUIRED]

        The array of outputs from the monitoring job to be uploaded to Amazon Simple Storage Service (Amazon S3).

        • MonitoringOutputs (list) -- [REQUIRED]

          Monitoring outputs for monitoring jobs. This is where the output of the periodic monitoring jobs is uploaded.

          • (dict) --

            The output object for a monitoring job.

            • S3Output (dict) -- [REQUIRED]

              The Amazon S3 storage location where the results of a monitoring job are saved.

              • S3Uri (string) -- [REQUIRED]

                A URI that identifies the Amazon S3 storage location where Amazon SageMaker saves the results of a monitoring job.

              • LocalPath (string) -- [REQUIRED]

                The local path to the Amazon S3 storage location where Amazon SageMaker saves the results of a monitoring job. LocalPath is an absolute path for the output data.

              • S3UploadMode (string) --

                Whether to upload the results of the monitoring job continuously or after the job completes.

        • KmsKeyId (string) --

          The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.

      • MonitoringResources (dict) -- [REQUIRED]

        Identifies the resources, ML compute instances, and ML storage volumes to deploy for a monitoring job. In distributed processing, you specify more than one instance.

        • ClusterConfig (dict) -- [REQUIRED]

          The configuration for the cluster resources used to run the processing job.

          • InstanceCount (integer) -- [REQUIRED]

            The number of ML compute instances to use in the model monitoring job. For distributed processing jobs, specify a value greater than 1. The default value is 1.

          • InstanceType (string) -- [REQUIRED]

            The ML compute instance type for the processing job.

          • VolumeSizeInGB (integer) -- [REQUIRED]

            The size of the ML storage volume, in gigabytes, that you want to provision. You must specify sufficient ML storage for your scenario.

          • VolumeKmsKeyId (string) --

            The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the model monitoring job.

      • MonitoringAppSpecification (dict) -- [REQUIRED]

        Configures the monitoring job to run a specified Docker container image.

        • ImageUri (string) -- [REQUIRED]

          The container image to be run by the monitoring job.

        • ContainerEntrypoint (list) --

          Specifies the entrypoint for a container used to run the monitoring job.

          • (string) --
        • ContainerArguments (list) --

          An array of arguments for the container used to run the monitoring job.

          • (string) --
        • RecordPreprocessorSourceUri (string) --

          An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flatted json so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers.

        • PostAnalyticsProcessorSourceUri (string) --

          An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers.

      • StoppingCondition (dict) --

        Specifies a time limit for how long the monitoring job is allowed to run.

        • MaxRuntimeInSeconds (integer) -- [REQUIRED]

          The maximum runtime allowed in seconds.

      • Environment (dict) --

        Sets the environment variables in the Docker container.

        • (string) --
          • (string) --
      • NetworkConfig (dict) --

        Specifies networking options for an monitoring job.

        • EnableInterContainerTrafficEncryption (boolean) --

          Whether to encrypt all communications between distributed processing jobs. Choose True to encrypt communications. Encryption provides greater security for distributed processing jobs, but the processing might take longer.

        • EnableNetworkIsolation (boolean) --

          Whether to allow inbound and outbound network calls to and from the containers used for the processing job.

        • VpcConfig (dict) --

          Specifies a VPC that your training jobs and hosted models have access to. Control access to and from your training and model containers by configuring the VPC. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud and Protect Training Jobs by Using an Amazon Virtual Private Cloud .

          • SecurityGroupIds (list) -- [REQUIRED]

            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) -- [REQUIRED]

            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) --
      • RoleArn (string) -- [REQUIRED]

        The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.

  • Tags (list) --

    (Optional) An array of key-value pairs. For more information, see `Using Cost Allocation Tags < https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL>`__ in the AWS Billing and Cost Management User Guide .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'MonitoringScheduleArn': 'string'
}

Response Structure

  • (dict) --

    • MonitoringScheduleArn (string) --

      The Amazon Resource Name (ARN) of the monitoring schedule.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
  • SageMaker.Client.exceptions.ResourceInUse
create_notebook_instance(**kwargs)

Creates an Amazon SageMaker notebook instance. A notebook instance is a machine learning (ML) compute instance running on a Jupyter notebook.

In a CreateNotebookInstance request, specify the type of ML compute instance that you want to run. Amazon SageMaker launches the instance, installs common libraries that you can use to explore datasets for model training, and attaches an ML storage volume to the notebook instance.

Amazon SageMaker also provides a set of example notebooks. Each notebook demonstrates how to use Amazon SageMaker with a specific algorithm or with a machine learning framework.

After receiving the request, Amazon SageMaker does the following:

  • Creates a network interface in the Amazon SageMaker VPC.
  • (Option) If you specified SubnetId , Amazon SageMaker creates a network interface in your own VPC, which is inferred from the subnet ID that you provide in the input. When creating this network interface, Amazon SageMaker attaches the security group that you specified in the request to the network interface that it creates in your VPC.
  • Launches an EC2 instance of the type specified in the request in the Amazon SageMaker VPC. If you specified SubnetId of your VPC, Amazon SageMaker specifies both network interfaces when launching this instance. This enables inbound traffic from your own VPC to the notebook instance, assuming that the security groups allow it.

After creating the notebook instance, Amazon SageMaker returns its Amazon Resource Name (ARN). You can't change the name of a notebook instance after you create it.

After Amazon SageMaker creates the notebook instance, you can connect to the Jupyter server and work in Jupyter notebooks. For example, you can write code to explore a dataset that you can use for model training, train a model, host models by creating Amazon SageMaker endpoints, and validate hosted models.

For more information, see How It Works .

See also: AWS API Documentation

Request Syntax

response = client.create_notebook_instance(
    NotebookInstanceName='string',
    InstanceType='ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge',
    SubnetId='string',
    SecurityGroupIds=[
        'string',
    ],
    RoleArn='string',
    KmsKeyId='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    LifecycleConfigName='string',
    DirectInternetAccess='Enabled'|'Disabled',
    VolumeSizeInGB=123,
    AcceleratorTypes=[
        'ml.eia1.medium'|'ml.eia1.large'|'ml.eia1.xlarge'|'ml.eia2.medium'|'ml.eia2.large'|'ml.eia2.xlarge',
    ],
    DefaultCodeRepository='string',
    AdditionalCodeRepositories=[
        'string',
    ],
    RootAccess='Enabled'|'Disabled'
)
Parameters
  • NotebookInstanceName (string) --

    [REQUIRED]

    The name of the new notebook instance.

  • InstanceType (string) --

    [REQUIRED]

    The type of ML compute instance to launch for the notebook instance.

  • SubnetId (string) -- The ID of the subnet in a VPC to which you would like to have a connectivity from your ML compute instance.
  • SecurityGroupIds (list) --

    The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.

    • (string) --
  • RoleArn (string) --

    [REQUIRED]

    When you send any requests to AWS resources from the notebook instance, Amazon SageMaker assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so Amazon SageMaker can perform these tasks. The policy must allow the Amazon SageMaker service principal (sagemaker.amazonaws.com) permissions to assume this role. For more information, see Amazon SageMaker Roles .

    Note

    To be able to pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission.

  • KmsKeyId (string) -- The Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled. For information, see Enabling and Disabling Keys in the AWS Key Management Service Developer Guide .
  • Tags (list) --

    An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging AWS Resources .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

  • LifecycleConfigName (string) -- The name of a lifecycle configuration to associate with the notebook instance. For information about lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance .
  • DirectInternetAccess (string) --

    Sets whether Amazon SageMaker provides internet access to the notebook instance. If you set this to Disabled this notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.

    For more information, see Notebook Instances Are Internet-Enabled by Default . You can set the value of this parameter to Disabled only if you set a value for the SubnetId parameter.

  • VolumeSizeInGB (integer) -- The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB.
  • AcceleratorTypes (list) --

    A list of Elastic Inference (EI) instance types to associate with this notebook instance. Currently, only one instance type can be associated with a notebook instance. For more information, see Using Elastic Inference in Amazon SageMaker .

    • (string) --
  • DefaultCodeRepository (string) -- A Git repository to associate with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in AWS CodeCommit or in any other Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For more information, see Associating Git Repositories with Amazon SageMaker Notebook Instances .
  • AdditionalCodeRepositories (list) --

    An array of up to three Git repositories to associate with the notebook instance. These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in AWS CodeCommit or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. For more information, see Associating Git Repositories with Amazon SageMaker Notebook Instances .

    • (string) --
  • RootAccess (string) --

    Whether root access is enabled or disabled for users of the notebook instance. The default value is Enabled .

    Note

    Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.

Return type

dict

Returns

Response Syntax

{
    'NotebookInstanceArn': 'string'
}

Response Structure

  • (dict) --

    • NotebookInstanceArn (string) --

      The Amazon Resource Name (ARN) of the notebook instance.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_notebook_instance_lifecycle_config(**kwargs)

Creates a lifecycle configuration that you can associate with a notebook instance. A lifecycle configuration is a collection of shell scripts that run when you create or start a notebook instance.

Each lifecycle configuration script has a limit of 16384 characters.

The value of the $PATH environment variable that is available to both scripts is /sbin:bin:/usr/sbin:/usr/bin .

View CloudWatch Logs for notebook instance lifecycle configurations in log group /aws/sagemaker/NotebookInstances in log stream [notebook-instance-name]/[LifecycleConfigHook] .

Lifecycle configuration scripts cannot run for longer than 5 minutes. If a script runs for longer than 5 minutes, it fails and the notebook instance is not created or started.

For information about notebook instance lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance .

See also: AWS API Documentation

Request Syntax

response = client.create_notebook_instance_lifecycle_config(
    NotebookInstanceLifecycleConfigName='string',
    OnCreate=[
        {
            'Content': 'string'
        },
    ],
    OnStart=[
        {
            'Content': 'string'
        },
    ]
)
Parameters
  • NotebookInstanceLifecycleConfigName (string) --

    [REQUIRED]

    The name of the lifecycle configuration.

  • OnCreate (list) --

    A shell script that runs only once, when you create a notebook instance. The shell script must be a base64-encoded string.

    • (dict) --

      Contains the notebook instance lifecycle configuration script.

      Each lifecycle configuration script has a limit of 16384 characters.

      The value of the $PATH environment variable that is available to both scripts is /sbin:bin:/usr/sbin:/usr/bin .

      View CloudWatch Logs for notebook instance lifecycle configurations in log group /aws/sagemaker/NotebookInstances in log stream [notebook-instance-name]/[LifecycleConfigHook] .

      Lifecycle configuration scripts cannot run for longer than 5 minutes. If a script runs for longer than 5 minutes, it fails and the notebook instance is not created or started.

      For information about notebook instance lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance .

      • Content (string) --

        A base64-encoded string that contains a shell script for a notebook instance lifecycle configuration.

  • OnStart (list) --

    A shell script that runs every time you start a notebook instance, including when you create the notebook instance. The shell script must be a base64-encoded string.

    • (dict) --

      Contains the notebook instance lifecycle configuration script.

      Each lifecycle configuration script has a limit of 16384 characters.

      The value of the $PATH environment variable that is available to both scripts is /sbin:bin:/usr/sbin:/usr/bin .

      View CloudWatch Logs for notebook instance lifecycle configurations in log group /aws/sagemaker/NotebookInstances in log stream [notebook-instance-name]/[LifecycleConfigHook] .

      Lifecycle configuration scripts cannot run for longer than 5 minutes. If a script runs for longer than 5 minutes, it fails and the notebook instance is not created or started.

      For information about notebook instance lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance .

      • Content (string) --

        A base64-encoded string that contains a shell script for a notebook instance lifecycle configuration.

Return type

dict

Returns

Response Syntax

{
    'NotebookInstanceLifecycleConfigArn': 'string'
}

Response Structure

  • (dict) --

    • NotebookInstanceLifecycleConfigArn (string) --

      The Amazon Resource Name (ARN) of the lifecycle configuration.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_pipeline(**kwargs)

Creates a pipeline using a JSON pipeline definition.

See also: AWS API Documentation

Request Syntax

response = client.create_pipeline(
    PipelineName='string',
    PipelineDisplayName='string',
    PipelineDefinition='string',
    PipelineDescription='string',
    ClientRequestToken='string',
    RoleArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • PipelineName (string) --

    [REQUIRED]

    The name of the pipeline.

  • PipelineDisplayName (string) -- The display name of the pipeline.
  • PipelineDefinition (string) --

    [REQUIRED]

    The JSON pipeline definition of the pipeline.

  • PipelineDescription (string) -- A description of the pipeline.
  • ClientRequestToken (string) --

    [REQUIRED]

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time.

    This field is autopopulated if not provided.

  • RoleArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the role used by the pipeline to access and create resources.

  • Tags (list) --

    A list of tags to apply to the created pipeline.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'PipelineArn': 'string'
}

Response Structure

  • (dict) --

    • PipelineArn (string) --

      The Amazon Resource Name (ARN) of the created pipeline.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_presigned_domain_url(**kwargs)

Creates a URL for a specified UserProfile in a Domain. When accessed in a web browser, the user will be automatically signed in to Amazon SageMaker Studio, and granted access to all of the Apps and files associated with the Domain's Amazon Elastic File System (EFS) volume. This operation can only be called when the authentication mode equals IAM.

Note

The URL that you get from a call to CreatePresignedDomainUrl is valid only for 5 minutes. If you try to use the URL after the 5-minute limit expires, you are directed to the AWS console sign-in page.

See also: AWS API Documentation

Request Syntax

response = client.create_presigned_domain_url(
    DomainId='string',
    UserProfileName='string',
    SessionExpirationDurationInSeconds=123
)
Parameters
  • DomainId (string) --

    [REQUIRED]

    The domain ID.

  • UserProfileName (string) --

    [REQUIRED]

    The name of the UserProfile to sign-in as.

  • SessionExpirationDurationInSeconds (integer) -- The session expiration duration in seconds.
Return type

dict

Returns

Response Syntax

{
    'AuthorizedUrl': 'string'
}

Response Structure

  • (dict) --

    • AuthorizedUrl (string) --

      The presigned URL.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
create_presigned_notebook_instance_url(**kwargs)

Returns a URL that you can use to connect to the Jupyter server from a notebook instance. In the Amazon SageMaker console, when you choose Open next to a notebook instance, Amazon SageMaker opens a new tab showing the Jupyter server home page from the notebook instance. The console uses this API to get the URL and show the page.

The IAM role or user used to call this API defines the permissions to access the notebook instance. Once the presigned URL is created, no additional permission is required to access this URL. IAM authorization policies for this API are also enforced for every HTTP request and WebSocket frame that attempts to connect to the notebook instance.

You can restrict access to this API and to the URL that it returns to a list of IP addresses that you specify. Use the NotIpAddress condition operator and the aws:SourceIP condition context key to specify the list of IP addresses that you want to have access to the notebook instance. For more information, see Limit Access to a Notebook Instance by IP Address .

Note

The URL that you get from a call to CreatePresignedNotebookInstanceUrl is valid only for 5 minutes. If you try to use the URL after the 5-minute limit expires, you are directed to the AWS console sign-in page.

See also: AWS API Documentation

Request Syntax

response = client.create_presigned_notebook_instance_url(
    NotebookInstanceName='string',
    SessionExpirationDurationInSeconds=123
)
Parameters
  • NotebookInstanceName (string) --

    [REQUIRED]

    The name of the notebook instance.

  • SessionExpirationDurationInSeconds (integer) -- The duration of the session, in seconds. The default is 12 hours.
Return type

dict

Returns

Response Syntax

{
    'AuthorizedUrl': 'string'
}

Response Structure

  • (dict) --

    • AuthorizedUrl (string) --

      A JSON object that contains the URL string.

create_processing_job(**kwargs)

Creates a processing job.

See also: AWS API Documentation

Request Syntax

response = client.create_processing_job(
    ProcessingInputs=[
        {
            'InputName': 'string',
            'AppManaged': True|False,
            'S3Input': {
                'S3Uri': 'string',
                'LocalPath': 'string',
                'S3DataType': 'ManifestFile'|'S3Prefix',
                'S3InputMode': 'Pipe'|'File',
                'S3DataDistributionType': 'FullyReplicated'|'ShardedByS3Key',
                'S3CompressionType': 'None'|'Gzip'
            },
            'DatasetDefinition': {
                'AthenaDatasetDefinition': {
                    'Catalog': 'string',
                    'Database': 'string',
                    'QueryString': 'string',
                    'WorkGroup': 'string',
                    'OutputS3Uri': 'string',
                    'KmsKeyId': 'string',
                    'OutputFormat': 'PARQUET'|'ORC'|'AVRO'|'JSON'|'TEXTFILE',
                    'OutputCompression': 'GZIP'|'SNAPPY'|'ZLIB'
                },
                'RedshiftDatasetDefinition': {
                    'ClusterId': 'string',
                    'Database': 'string',
                    'DbUser': 'string',
                    'QueryString': 'string',
                    'ClusterRoleArn': 'string',
                    'OutputS3Uri': 'string',
                    'KmsKeyId': 'string',
                    'OutputFormat': 'PARQUET'|'CSV',
                    'OutputCompression': 'None'|'GZIP'|'BZIP2'|'ZSTD'|'SNAPPY'
                },
                'LocalPath': 'string',
                'DataDistributionType': 'FullyReplicated'|'ShardedByS3Key',
                'InputMode': 'Pipe'|'File'
            }
        },
    ],
    ProcessingOutputConfig={
        'Outputs': [
            {
                'OutputName': 'string',
                'S3Output': {
                    'S3Uri': 'string',
                    'LocalPath': 'string',
                    'S3UploadMode': 'Continuous'|'EndOfJob'
                },
                'FeatureStoreOutput': {
                    'FeatureGroupName': 'string'
                },
                'AppManaged': True|False
            },
        ],
        'KmsKeyId': 'string'
    },
    ProcessingJobName='string',
    ProcessingResources={
        'ClusterConfig': {
            'InstanceCount': 123,
            'InstanceType': 'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.8xlarge'|'ml.r5.12xlarge'|'ml.r5.16xlarge'|'ml.r5.24xlarge',
            'VolumeSizeInGB': 123,
            'VolumeKmsKeyId': 'string'
        }
    },
    StoppingCondition={
        'MaxRuntimeInSeconds': 123
    },
    AppSpecification={
        'ImageUri': 'string',
        'ContainerEntrypoint': [
            'string',
        ],
        'ContainerArguments': [
            'string',
        ]
    },
    Environment={
        'string': 'string'
    },
    NetworkConfig={
        'EnableInterContainerTrafficEncryption': True|False,
        'EnableNetworkIsolation': True|False,
        'VpcConfig': {
            'SecurityGroupIds': [
                'string',
            ],
            'Subnets': [
                'string',
            ]
        }
    },
    RoleArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    ExperimentConfig={
        'ExperimentName': 'string',
        'TrialName': 'string',
        'TrialComponentDisplayName': 'string'
    }
)
Parameters
  • ProcessingInputs (list) --

    List of input configurations for the processing job.

    • (dict) --

      The inputs for a processing job. The processing input must specify exactly one of either S3Input or DatasetDefinition types.

      • InputName (string) -- [REQUIRED]

        The name of the inputs for the processing job.

      • AppManaged (boolean) --

        When True , input operations such as data download are managed natively by the processing job application. When False (default), input operations are managed by Amazon SageMaker.

      • S3Input (dict) --

        Configuration for processing job inputs in Amazon S3.

        • S3Uri (string) -- [REQUIRED]

          The URI for the Amazon S3 storage where you want Amazon SageMaker to download the artifacts needed to run a processing job.

        • LocalPath (string) --

          The local path to the Amazon S3 bucket where you want Amazon SageMaker to download the inputs to run a processing job. LocalPath is an absolute path to the input data. This is a required parameter when AppManaged is False (default).

        • S3DataType (string) -- [REQUIRED]

          Whether you use an S3Prefix or a ManifestFile for the data type. If you choose S3Prefix , S3Uri identifies a key name prefix. Amazon SageMaker uses all objects with the specified key name prefix for the processing job. If you choose ManifestFile , S3Uri identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for the processing job.

        • S3InputMode (string) --

          Whether to use File or Pipe input mode. In File mode, Amazon SageMaker copies the data from the input source onto the local Amazon Elastic Block Store (Amazon EBS) volumes before starting your training algorithm. This is the most commonly used input mode. In Pipe mode, Amazon SageMaker streams input data from the source directly to your algorithm without using the EBS volume.This is a required parameter when AppManaged is False (default).

        • S3DataDistributionType (string) --

          Whether the data stored in Amazon S3 is FullyReplicated or ShardedByS3Key .

        • S3CompressionType (string) --

          Whether to use Gzip compression for Amazon S3 storage.

      • DatasetDefinition (dict) --

        Configuration for a Dataset Definition input.

        • AthenaDatasetDefinition (dict) --

          Configuration for Athena Dataset Definition input.

          • Catalog (string) -- [REQUIRED]

            The name of the data catalog used in Athena query execution.

          • Database (string) -- [REQUIRED]

            The name of the database used in the Athena query execution.

          • QueryString (string) -- [REQUIRED]

            The SQL query statements, to be executed.

          • WorkGroup (string) --

            The name of the workgroup in which the Athena query is being started.

          • OutputS3Uri (string) -- [REQUIRED]

            The location in Amazon S3 where Athena query results are stored.

          • KmsKeyId (string) --

            The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data generated from an Athena query execution.

          • OutputFormat (string) -- [REQUIRED]

            The data storage format for Athena query results.

          • OutputCompression (string) --

            The compression used for Athena query results.

        • RedshiftDatasetDefinition (dict) --

          Configuration for Redshift Dataset Definition input.

          • ClusterId (string) -- [REQUIRED]

            The Redshift cluster Identifier.

          • Database (string) -- [REQUIRED]

            The name of the Redshift database used in Redshift query execution.

          • DbUser (string) -- [REQUIRED]

            The database user name used in Redshift query execution.

          • QueryString (string) -- [REQUIRED]

            The SQL query statements to be executed.

          • ClusterRoleArn (string) -- [REQUIRED]

            The IAM role attached to your Redshift cluster that Amazon SageMaker uses to generate datasets.

          • OutputS3Uri (string) -- [REQUIRED]

            The location in Amazon S3 where the Redshift query results are stored.

          • KmsKeyId (string) --

            The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data from a Redshift execution.

          • OutputFormat (string) -- [REQUIRED]

            The data storage format for Redshift query results.

          • OutputCompression (string) --

            The compression used for Redshift query results.

        • LocalPath (string) --

          The local path where you want Amazon SageMaker to download the Dataset Definition inputs to run a processing job. LocalPath is an absolute path to the input data. This is a required parameter when AppManaged is False (default).

        • DataDistributionType (string) --

          Whether the generated dataset is FullyReplicated or ShardedByS3Key (default).

        • InputMode (string) --

          Whether to use File or Pipe input mode. In File (default) mode, Amazon SageMaker copies the data from the input source onto the local Amazon Elastic Block Store (Amazon EBS) volumes before starting your training algorithm. This is the most commonly used input mode. In Pipe mode, Amazon SageMaker streams input data from the source directly to your algorithm without using the EBS volume.

  • ProcessingOutputConfig (dict) --

    Output configuration for the processing job.

    • Outputs (list) -- [REQUIRED]

      List of output configurations for the processing job.

      • (dict) --

        Describes the results of a processing job. The processing output must specify exactly one of either S3Output or FeatureStoreOutput types.

        • OutputName (string) -- [REQUIRED]

          The name for the processing job output.

        • S3Output (dict) --

          Configuration for processing job outputs in Amazon S3.

          • S3Uri (string) -- [REQUIRED]

            A URI that identifies the Amazon S3 bucket where you want Amazon SageMaker to save the results of a processing job.

          • LocalPath (string) -- [REQUIRED]

            The local path to the Amazon S3 bucket where you want Amazon SageMaker to save the results of an processing job. LocalPath is an absolute path to the input data.

          • S3UploadMode (string) -- [REQUIRED]

            Whether to upload the results of the processing job continuously or after the job completes.

        • FeatureStoreOutput (dict) --

          Configuration for processing job outputs in Amazon SageMaker Feature Store. This processing output type is only supported when AppManaged is specified.

          • FeatureGroupName (string) -- [REQUIRED]

            The name of the Amazon SageMaker FeatureGroup to use as the destination for processing job output.

        • AppManaged (boolean) --

          When True , output operations such as data upload are managed natively by the processing job application. When False (default), output operations are managed by Amazon SageMaker.

    • KmsKeyId (string) --

      The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the processing job output. KmsKeyId can be an ID of a KMS key, ARN of a KMS key, alias of a KMS key, or alias of a KMS key. The KmsKeyId is applied to all outputs.

  • ProcessingJobName (string) --

    [REQUIRED]

    The name of the processing job. The name must be unique within an AWS Region in the AWS account.

  • ProcessingResources (dict) --

    [REQUIRED]

    Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In distributed training, you specify more than one instance.

    • ClusterConfig (dict) -- [REQUIRED]

      The configuration for the resources in a cluster used to run the processing job.

      • InstanceCount (integer) -- [REQUIRED]

        The number of ML compute instances to use in the processing job. For distributed processing jobs, specify a value greater than 1. The default value is 1.

      • InstanceType (string) -- [REQUIRED]

        The ML compute instance type for the processing job.

      • VolumeSizeInGB (integer) -- [REQUIRED]

        The size of the ML storage volume in gigabytes that you want to provision. You must specify sufficient ML storage for your scenario.

      • VolumeKmsKeyId (string) --

        The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the processing job.

  • StoppingCondition (dict) --

    The time limit for how long the processing job is allowed to run.

    • MaxRuntimeInSeconds (integer) -- [REQUIRED]

      Specifies the maximum runtime in seconds.

  • AppSpecification (dict) --

    [REQUIRED]

    Configures the processing job to run a specified Docker container image.

    • ImageUri (string) -- [REQUIRED]

      The container image to be run by the processing job.

    • ContainerEntrypoint (list) --

      The entrypoint for a container used to run a processing job.

      • (string) --
    • ContainerArguments (list) --

      The arguments for a container used to run a processing job.

      • (string) --
  • Environment (dict) --

    Sets the environment variables in the Docker container.

    • (string) --
      • (string) --
  • NetworkConfig (dict) --

    Networking options for a processing job.

    • EnableInterContainerTrafficEncryption (boolean) --

      Whether to encrypt all communications between distributed processing jobs. Choose True to encrypt communications. Encryption provides greater security for distributed processing jobs, but the processing might take longer.

    • EnableNetworkIsolation (boolean) --

      Whether to allow inbound and outbound network calls to and from the containers used for the processing job.

    • VpcConfig (dict) --

      Specifies a VPC that your training jobs and hosted models have access to. Control access to and from your training and model containers by configuring the VPC. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud and Protect Training Jobs by Using an Amazon Virtual Private Cloud .

      • SecurityGroupIds (list) -- [REQUIRED]

        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) -- [REQUIRED]

        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) --
  • RoleArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.

  • Tags (list) --

    (Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

  • ExperimentConfig (dict) --

    Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:

    • CreateProcessingJob
    • CreateTrainingJob
    • CreateTransformJob
    • ExperimentName (string) --

      The name of an existing experiment to associate the trial component with.

    • TrialName (string) --

      The name of an existing trial to associate the trial component with. If not specified, a new trial is created.

    • TrialComponentDisplayName (string) --

      The display name for the trial component. If this key isn't specified, the display name is the trial component name.

Return type

dict

Returns

Response Syntax

{
    'ProcessingJobArn': 'string'
}

Response Structure

  • (dict) --

    • ProcessingJobArn (string) --

      The Amazon Resource Name (ARN) of the processing job.

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceLimitExceeded
  • SageMaker.Client.exceptions.ResourceNotFound
create_project(**kwargs)

Creates a machine learning (ML) project that can contain one or more templates that set up an ML pipeline from training to deploying an approved model.

See also: AWS API Documentation

Request Syntax

response = client.create_project(
    ProjectName='string',
    ProjectDescription='string',
    ServiceCatalogProvisioningDetails={
        'ProductId': 'string',
        'ProvisioningArtifactId': 'string',
        'PathId': 'string',
        'ProvisioningParameters': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ProjectName (string) --

    [REQUIRED]

    The name of the project.

  • ProjectDescription (string) -- A description for the project.
  • ServiceCatalogProvisioningDetails (dict) --

    [REQUIRED]

    The product ID and provisioning artifact ID to provision a service catalog. For information, see What is AWS Service Catalog .

    • ProductId (string) -- [REQUIRED]

      The ID of the product to provision.

    • ProvisioningArtifactId (string) -- [REQUIRED]

      The ID of the provisioning artifact.

    • PathId (string) --

      The path identifier of the product. This value is optional if the product has a default path, and required if the product has more than one path.

    • ProvisioningParameters (list) --

      A list of key value pairs that you specify when you provision a product.

      • (dict) --

        A key value pair used when you provision a project as a service catalog product. For information, see What is AWS Service Catalog .

        • Key (string) --

          The key that identifies a provisioning parameter.

        • Value (string) --

          The value of the provisioning parameter.

  • Tags (list) --

    An array of key-value pairs that you want to use to organize and track your AWS resource costs. For more information, see Tagging AWS resources in the AWS General Reference Guide .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'ProjectArn': 'string',
    'ProjectId': 'string'
}

Response Structure

  • (dict) --

    • ProjectArn (string) --

      The Amazon Resource Name (ARN) of the project.

    • ProjectId (string) --

      The ID of the new project.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_training_job(**kwargs)

Starts a model training job. After training completes, Amazon SageMaker saves the resulting model artifacts to an Amazon S3 location that you specify.

If you choose to host your model using Amazon SageMaker hosting services, you can use the resulting model artifacts as part of the model. You can also use the artifacts in a machine learning service other than Amazon SageMaker, provided that you know how to use them for inference.

In the request body, you provide the following:

  • AlgorithmSpecification - Identifies the training algorithm to use.
  • HyperParameters - Specify these algorithm-specific parameters to enable the estimation of model parameters during training. Hyperparameters can be tuned to optimize this learning process. For a list of hyperparameters for each training algorithm provided by Amazon SageMaker, see Algorithms .
  • InputDataConfig - Describes the training dataset and the Amazon S3, EFS, or FSx location where it is stored.
  • OutputDataConfig - Identifies the Amazon S3 bucket where you want Amazon SageMaker to save the results of model training.
  • ResourceConfig - Identifies the resources, ML compute instances, and ML storage volumes to deploy for model training. In distributed training, you specify more than one instance.
  • EnableManagedSpotTraining - Optimize the cost of training machine learning models by up to 80% by using Amazon EC2 Spot instances. For more information, see Managed Spot Training .
  • RoleArn - The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during model training. You must grant this role the necessary permissions so that Amazon SageMaker can successfully complete model training.
  • StoppingCondition - To help cap training costs, use MaxRuntimeInSeconds to set a time limit for training. Use MaxWaitTimeInSeconds to specify how long you are willing to wait for a managed spot training job to complete.

For more information about Amazon SageMaker, see How It Works .

See also: AWS API Documentation

Request Syntax

response = client.create_training_job(
    TrainingJobName='string',
    HyperParameters={
        'string': 'string'
    },
    AlgorithmSpecification={
        'TrainingImage': 'string',
        'AlgorithmName': 'string',
        'TrainingInputMode': 'Pipe'|'File',
        'MetricDefinitions': [
            {
                'Name': 'string',
                'Regex': 'string'
            },
        ],
        'EnableSageMakerMetricsTimeSeries': True|False
    },
    RoleArn='string',
    InputDataConfig=[
        {
            'ChannelName': 'string',
            'DataSource': {
                'S3DataSource': {
                    'S3DataType': 'ManifestFile'|'S3Prefix'|'AugmentedManifestFile',
                    'S3Uri': 'string',
                    'S3DataDistributionType': 'FullyReplicated'|'ShardedByS3Key',
                    'AttributeNames': [
                        'string',
                    ]
                },
                'FileSystemDataSource': {
                    'FileSystemId': 'string',
                    'FileSystemAccessMode': 'rw'|'ro',
                    'FileSystemType': 'EFS'|'FSxLustre',
                    'DirectoryPath': 'string'
                }
            },
            'ContentType': 'string',
            'CompressionType': 'None'|'Gzip',
            'RecordWrapperType': 'None'|'RecordIO',
            'InputMode': 'Pipe'|'File',
            'ShuffleConfig': {
                'Seed': 123
            }
        },
    ],
    OutputDataConfig={
        'KmsKeyId': 'string',
        'S3OutputPath': 'string'
    },
    ResourceConfig={
        'InstanceType': 'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.p4d.24xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5n.xlarge'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge',
        'InstanceCount': 123,
        'VolumeSizeInGB': 123,
        'VolumeKmsKeyId': 'string'
    },
    VpcConfig={
        'SecurityGroupIds': [
            'string',
        ],
        'Subnets': [
            'string',
        ]
    },
    StoppingCondition={
        'MaxRuntimeInSeconds': 123,
        'MaxWaitTimeInSeconds': 123
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    EnableNetworkIsolation=True|False,
    EnableInterContainerTrafficEncryption=True|False,
    EnableManagedSpotTraining=True|False,
    CheckpointConfig={
        'S3Uri': 'string',
        'LocalPath': 'string'
    },
    DebugHookConfig={
        'LocalPath': 'string',
        'S3OutputPath': 'string',
        'HookParameters': {
            'string': 'string'
        },
        'CollectionConfigurations': [
            {
                'CollectionName': 'string',
                'CollectionParameters': {
                    'string': 'string'
                }
            },
        ]
    },
    DebugRuleConfigurations=[
        {
            'RuleConfigurationName': 'string',
            'LocalPath': 'string',
            'S3OutputPath': 'string',
            'RuleEvaluatorImage': 'string',
            'InstanceType': 'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.8xlarge'|'ml.r5.12xlarge'|'ml.r5.16xlarge'|'ml.r5.24xlarge',
            'VolumeSizeInGB': 123,
            'RuleParameters': {
                'string': 'string'
            }
        },
    ],
    TensorBoardOutputConfig={
        'LocalPath': 'string',
        'S3OutputPath': 'string'
    },
    ExperimentConfig={
        'ExperimentName': 'string',
        'TrialName': 'string',
        'TrialComponentDisplayName': 'string'
    }
)
Parameters
  • TrainingJobName (string) --

    [REQUIRED]

    The name of the training job. The name must be unique within an AWS Region in an AWS account.

  • HyperParameters (dict) --

    Algorithm-specific parameters that influence the quality of the model. You set hyperparameters before you start the learning process. For a list of hyperparameters for each training algorithm provided by Amazon SageMaker, see Algorithms .

    You can specify a maximum of 100 hyperparameters. Each hyperparameter is a key-value pair. Each key and value is limited to 256 characters, as specified by the Length Constraint .

    • (string) --
      • (string) --
  • AlgorithmSpecification (dict) --

    [REQUIRED]

    The registry path of the Docker image that contains the training algorithm and algorithm-specific metadata, including the input mode. For more information about algorithms provided by Amazon SageMaker, see Algorithms . For information about providing your own algorithms, see Using Your Own Algorithms with Amazon SageMaker .

    • TrainingImage (string) --

      The registry path of the Docker image that contains the training algorithm. For information about docker registry paths for built-in algorithms, see Algorithms Provided by Amazon SageMaker: Common Parameters . Amazon SageMaker supports both registry/repository[:tag] and registry/repository[@digest] image path formats. For more information, see Using Your Own Algorithms with Amazon SageMaker .

    • AlgorithmName (string) --

      The name of the algorithm resource to use for the training job. This must be an algorithm resource that you created or subscribe to on AWS Marketplace. If you specify a value for this parameter, you can't specify a value for TrainingImage .

    • TrainingInputMode (string) -- [REQUIRED]

      The input mode that the algorithm supports. For the input modes that Amazon SageMaker algorithms support, see Algorithms . If an algorithm supports the File input mode, Amazon SageMaker downloads the training data from S3 to the provisioned ML storage Volume, and mounts the directory to docker volume for training container. If an algorithm supports the Pipe input mode, Amazon SageMaker streams data directly from S3 to the container.

      In File mode, make sure you provision ML storage volume with sufficient capacity to accommodate the data download from S3. In addition to the training data, the ML storage volume also stores the output model. The algorithm container use ML storage volume to also store intermediate information, if any.

      For distributed algorithms using File mode, training data is distributed uniformly, and your training duration is predictable if the input data objects size is approximately same. Amazon SageMaker does not split the files any further for model training. If the object sizes are skewed, training won't be optimal as the data distribution is also skewed where one host in a training cluster is overloaded, thus becoming bottleneck in training.

    • MetricDefinitions (list) --

      A list of metric definition objects. Each object specifies the metric name and regular expressions used to parse algorithm logs. Amazon SageMaker publishes each metric to Amazon CloudWatch.

      • (dict) --

        Specifies a metric that the training algorithm writes to stderr or stdout . Amazon SageMakerhyperparameter tuning captures all defined metrics. You specify one metric that a hyperparameter tuning job uses as its objective metric to choose the best training job.

        • Name (string) -- [REQUIRED]

          The name of the metric.

        • Regex (string) -- [REQUIRED]

          A regular expression that searches the output of a training job and gets the value of the metric. For more information about using regular expressions to define metrics, see Defining Objective Metrics .

    • EnableSageMakerMetricsTimeSeries (boolean) --

      To generate and save time-series metrics during training, set to true . The default is false and time-series metrics aren't generated except in the following cases:

      • You use one of the Amazon SageMaker built-in algorithms
      • You use one of the following Prebuilt Amazon SageMaker Docker Images :
        • Tensorflow (version >= 1.15)
        • MXNet (version >= 1.6)
        • PyTorch (version >= 1.3)
      • You specify at least one MetricDefinition
  • RoleArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.

    During model training, Amazon SageMaker needs your permission to read input data from an S3 bucket, download a Docker image that contains training code, write model artifacts to an S3 bucket, write logs to Amazon CloudWatch Logs, and publish metrics to Amazon CloudWatch. You grant permissions for all of these tasks to an IAM role. For more information, see Amazon SageMaker Roles .

    Note

    To be able to pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission.

  • InputDataConfig (list) --

    An array of Channel objects. Each channel is a named input source. InputDataConfig describes the input data and its location.

    Algorithms can accept input data from one or more channels. For example, an algorithm might have two channels of input data, training_data and validation_data . The configuration for each channel provides the S3, EFS, or FSx location where the input data is stored. It also provides information about the stored data: the MIME type, compression method, and whether the data is wrapped in RecordIO format.

    Depending on the input mode that the algorithm supports, Amazon SageMaker either copies input data files from an S3 bucket to a local directory in the Docker container, or makes it available as input streams. For example, if you specify an EFS location, input data files will be made available as input streams. They do not need to be downloaded.

    • (dict) --

      A channel is a named input source that training algorithms can consume.

      • ChannelName (string) -- [REQUIRED]

        The name of the channel.

      • DataSource (dict) -- [REQUIRED]

        The location of the channel data.

        • S3DataSource (dict) --

          The S3 location of the data source that is associated with a channel.

          • S3DataType (string) -- [REQUIRED]

            If you choose S3Prefix , S3Uri identifies a key name prefix. Amazon SageMaker uses all objects that match the specified key name prefix for model training.

            If you choose ManifestFile , S3Uri identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for model training.

            If you choose AugmentedManifestFile , S3Uri identifies an object that is an augmented manifest file in JSON lines format. This file contains the data you want to use for model training. AugmentedManifestFile can only be used if the Channel's input mode is Pipe .

          • S3Uri (string) -- [REQUIRED]

            Depending on the value specified for the S3DataType , identifies either a key name prefix or a manifest. For example:

            • A key name prefix might look like this: s3://bucketname/exampleprefix
            • A manifest might look like this: s3://bucketname/example.manifest A manifest is an S3 object which is a JSON file consisting of an array of elements. The first element is a prefix which is followed by one or more suffixes. SageMaker appends the suffix elements to the prefix to get a full set of S3Uri . Note that the prefix must be a valid non-empty S3Uri that precludes users from specifying a manifest whose individual S3Uri is sourced from different S3 buckets. The following code example shows a valid manifest format: [ {"prefix": "s3://customer_bucket/some/prefix/"}, "relative/path/to/custdata-1", "relative/path/custdata-2", ... "relative/path/custdata-N" ] This JSON is equivalent to the following S3Uri list: s3://customer_bucket/some/prefix/relative/path/to/custdata-1 s3://customer_bucket/some/prefix/relative/path/custdata-2 ... s3://customer_bucket/some/prefix/relative/path/custdata-N The complete set of S3Uri in this manifest is the input data for the channel for this data source. The object that each S3Uri points to must be readable by the IAM role that Amazon SageMaker uses to perform tasks on your behalf.
          • S3DataDistributionType (string) --

            If you want Amazon SageMaker to replicate the entire dataset on each ML compute instance that is launched for model training, specify FullyReplicated .

            If you want Amazon SageMaker to replicate a subset of data on each ML compute instance that is launched for model training, specify ShardedByS3Key . If there are n ML compute instances launched for a training job, each instance gets approximately 1/n of the number of S3 objects. In this case, model training on each machine uses only the subset of training data.

            Don't choose more ML compute instances for training than available S3 objects. If you do, some nodes won't get any data and you will pay for nodes that aren't getting any training data. This applies in both File and Pipe modes. Keep this in mind when developing algorithms.

            In distributed training, where you use multiple ML compute EC2 instances, you might choose ShardedByS3Key . If the algorithm requires copying training data to the ML storage volume (when TrainingInputMode is set to File ), this copies 1/n of the number of objects.

          • AttributeNames (list) --

            A list of one or more attribute names to use that are found in a specified augmented manifest file.

            • (string) --
        • FileSystemDataSource (dict) --

          The file system that is associated with a channel.

          • FileSystemId (string) -- [REQUIRED]

            The file system id.

          • FileSystemAccessMode (string) -- [REQUIRED]

            The access mode of the mount of the directory associated with the channel. A directory can be mounted either in ro (read-only) or rw (read-write) mode.

          • FileSystemType (string) -- [REQUIRED]

            The file system type.

          • DirectoryPath (string) -- [REQUIRED]

            The full path to the directory to associate with the channel.

      • ContentType (string) --

        The MIME type of the data.

      • CompressionType (string) --

        If training data is compressed, the compression type. The default value is None . CompressionType is used only in Pipe input mode. In File mode, leave this field unset or set it to None.

      • RecordWrapperType (string) --

        Specify RecordIO as the value when input data is in raw format but the training algorithm requires the RecordIO format. In this case, Amazon SageMaker wraps each individual S3 object in a RecordIO record. If the input data is already in RecordIO format, you don't need to set this attribute. For more information, see Create a Dataset Using RecordIO .

        In File mode, leave this field unset or set it to None.

      • InputMode (string) --

        (Optional) The input mode to use for the data channel in a training job. If you don't set a value for InputMode , Amazon SageMaker uses the value set for TrainingInputMode . Use this parameter to override the TrainingInputMode setting in a AlgorithmSpecification request when you have a channel that needs a different input mode from the training job's general setting. To download the data from Amazon Simple Storage Service (Amazon S3) to the provisioned ML storage volume, and mount the directory to a Docker volume, use File input mode. To stream data directly from Amazon S3 to the container, choose Pipe input mode.

        To use a model for incremental training, choose File input model.

      • ShuffleConfig (dict) --

        A configuration for a shuffle option for input data in a channel. If you use S3Prefix for S3DataType , this shuffles the results of the S3 key prefix matches. If you use ManifestFile , the order of the S3 object references in the ManifestFile is shuffled. If you use AugmentedManifestFile , the order of the JSON lines in the AugmentedManifestFile is shuffled. The shuffling order is determined using the Seed value.

        For Pipe input mode, shuffling is done at the start of every epoch. With large datasets this ensures that the order of the training data is different for each epoch, it helps reduce bias and possible overfitting. In a multi-node training job when ShuffleConfig is combined with S3DataDistributionType of ShardedByS3Key , the data is shuffled across nodes so that the content sent to a particular node on the first epoch might be sent to a different node on the second epoch.

        • Seed (integer) -- [REQUIRED]

          Determines the shuffling order in ShuffleConfig value.

  • OutputDataConfig (dict) --

    [REQUIRED]

    Specifies the path to the S3 location where you want to store model artifacts. Amazon SageMaker creates subfolders for the artifacts.

    • KmsKeyId (string) --

      The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats:

      • // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab"
      • // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
      • // KMS Key Alias "alias/ExampleAlias"
      • // Amazon Resource Name (ARN) of a KMS Key Alias "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias"

      If you use a KMS key ID or an alias of your master key, the Amazon SageMaker execution role must include permissions to call kms:Encrypt . If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with KMS-managed keys for OutputDataConfig . If you use a bucket policy with an s3:PutObject permission that only allows objects with server-side encryption, set the condition key of s3:x-amz-server-side-encryption to "aws:kms" . For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.

      The KMS key policy must grant permission to the IAM role that you specify in your CreateTrainingJob , CreateTransformJob , or CreateHyperParameterTuningJob requests. For more information, see Using Key Policies in AWS KMS in the AWS Key Management Service Developer Guide .

    • S3OutputPath (string) -- [REQUIRED]

      Identifies the S3 path where you want Amazon SageMaker to store the model artifacts. For example, s3://bucket-name/key-name-prefix .

  • ResourceConfig (dict) --

    [REQUIRED]

    The resources, including the ML compute instances and ML storage volumes, to use for model training.

    ML storage volumes store model artifacts and incremental states. Training algorithms might also use ML storage volumes for scratch space. If you want Amazon SageMaker to use the ML storage volume to store the training data, choose File as the TrainingInputMode in the algorithm specification. For distributed training algorithms, specify an instance count greater than 1.

    • InstanceType (string) -- [REQUIRED]

      The ML compute instance type.

    • InstanceCount (integer) -- [REQUIRED]

      The number of ML compute instances to use. For distributed training, provide a value greater than 1.

    • VolumeSizeInGB (integer) -- [REQUIRED]

      The size of the ML storage volume that you want to provision.

      ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML storage volume for scratch space. If you want to store the training data in the ML storage volume, choose File as the TrainingInputMode in the algorithm specification.

      You must specify sufficient ML storage for your scenario.

      Note

      Amazon SageMaker supports only the General Purpose SSD (gp2) ML storage volume type.

      Note

      Certain Nitro-based instances include local storage with a fixed total size, dependent on the instance type. When using these instances for training, Amazon SageMaker mounts the local instance storage instead of Amazon EBS gp2 storage. You can't request a VolumeSizeInGB greater than the total size of the local instance storage.

      For a list of instance types that support local instance storage, including the total size per instance type, see Instance Store Volumes .

    • VolumeKmsKeyId (string) --

      The AWS KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the training job.

      Note

      Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a VolumeKmsKeyId when using an instance type with local storage.

      For a list of instance types that support local instance storage, see Instance Store Volumes .

      For more information about local instance storage encryption, see SSD Instance Store Volumes .

      The VolumeKmsKeyId can be in any of the following formats:

      • // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab"
      • // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
  • VpcConfig (dict) --

    A VpcConfig object that specifies the VPC that you want your training job to connect to. Control access to and from your training container by configuring the VPC. For more information, see Protect Training Jobs by Using an Amazon Virtual Private Cloud .

    • SecurityGroupIds (list) -- [REQUIRED]

      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) -- [REQUIRED]

      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) --
  • StoppingCondition (dict) --

    [REQUIRED]

    Specifies a limit to how long a model training job can run. When the job reaches the time limit, Amazon SageMaker ends the training job. Use this API to cap model training costs.

    To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts, so the results of training are not lost.

    • MaxRuntimeInSeconds (integer) --

      The maximum length of time, in seconds, that the training or compilation job can run. If job does not complete during this time, Amazon SageMaker ends the job. If value is not specified, default value is 1 day. The maximum value is 28 days.

    • MaxWaitTimeInSeconds (integer) --

      The maximum length of time, in seconds, how long you are willing to wait for a managed spot training job to complete. It is the amount of time spent waiting for Spot capacity plus the amount of time the training job runs. It must be equal to or greater than MaxRuntimeInSeconds .

  • Tags (list) --

    An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging AWS Resources .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

  • EnableNetworkIsolation (boolean) -- Isolates the training container. No inbound or outbound network calls can be made, except for calls between peers within a training cluster for distributed training. If you enable network isolation for training jobs that are configured to use a VPC, Amazon SageMaker downloads and uploads customer data and model artifacts through the specified VPC, but the training container does not have network access.
  • EnableInterContainerTrafficEncryption (boolean) -- To encrypt all communications between ML compute instances in distributed training, choose True . Encryption provides greater security for distributed training, but training might take longer. How long it takes depends on the amount of communication between compute instances, especially if you use a deep learning algorithm in distributed training. For more information, see Protect Communications Between ML Compute Instances in a Distributed Training Job .
  • EnableManagedSpotTraining (boolean) --

    To train models using managed spot training, choose True . Managed spot training provides a fully managed and scalable infrastructure for training machine learning models. this option is useful when training jobs can be interrupted and when there is flexibility when the training job is run.

    The complete and intermediate results of jobs are stored in an Amazon S3 bucket, and can be used as a starting point to train models incrementally. Amazon SageMaker provides metrics and logs in CloudWatch. They can be used to see when managed spot training jobs are running, interrupted, resumed, or completed.

  • CheckpointConfig (dict) --

    Contains information about the output location for managed spot training checkpoint data.

    • S3Uri (string) -- [REQUIRED]

      Identifies the S3 path where you want Amazon SageMaker to store checkpoints. For example, s3://bucket-name/key-name-prefix .

    • LocalPath (string) --

      (Optional) The local directory where checkpoints are written. The default directory is /opt/ml/checkpoints/ .

  • DebugHookConfig (dict) --

    Configuration information for the debug hook parameters, collection configuration, and storage paths.

    • LocalPath (string) --

      Path to local storage location for tensors. Defaults to /opt/ml/output/tensors/ .

    • S3OutputPath (string) -- [REQUIRED]

      Path to Amazon S3 storage location for tensors.

    • HookParameters (dict) --

      Configuration information for the debug hook parameters.

      • (string) --
        • (string) --
    • CollectionConfigurations (list) --

      Configuration information for tensor collections.

      • (dict) --

        Configuration information for tensor collections.

        • CollectionName (string) --

          The name of the tensor collection. The name must be unique relative to other rule configuration names.

        • CollectionParameters (dict) --

          Parameter values for the tensor collection. The allowed parameters are "name" , "include_regex" , "reduction_config" , "save_config" , "tensor_names" , and "save_histogram" .

          • (string) --
            • (string) --
  • DebugRuleConfigurations (list) --

    Configuration information for debugging rules.

    • (dict) --

      Configuration information for debugging rules.

      • RuleConfigurationName (string) -- [REQUIRED]

        The name of the rule configuration. It must be unique relative to other rule configuration names.

      • LocalPath (string) --

        Path to local storage location for output of rules. Defaults to /opt/ml/processing/output/rule/ .

      • S3OutputPath (string) --

        Path to Amazon S3 storage location for rules.

      • RuleEvaluatorImage (string) -- [REQUIRED]

        The Amazon Elastic Container (ECR) Image for the managed rule evaluation.

      • InstanceType (string) --

        The instance type to deploy for a training job.

      • VolumeSizeInGB (integer) --

        The size, in GB, of the ML storage volume attached to the processing instance.

      • RuleParameters (dict) --

        Runtime configuration for rule container.

        • (string) --
          • (string) --
  • TensorBoardOutputConfig (dict) --

    Configuration of storage locations for TensorBoard output.

    • LocalPath (string) --

      Path to local storage location for tensorBoard output. Defaults to /opt/ml/output/tensorboard .

    • S3OutputPath (string) -- [REQUIRED]

      Path to Amazon S3 storage location for TensorBoard output.

  • ExperimentConfig (dict) --

    Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:

    • CreateProcessingJob
    • CreateTrainingJob
    • CreateTransformJob
    • ExperimentName (string) --

      The name of an existing experiment to associate the trial component with.

    • TrialName (string) --

      The name of an existing trial to associate the trial component with. If not specified, a new trial is created.

    • TrialComponentDisplayName (string) --

      The display name for the trial component. If this key isn't specified, the display name is the trial component name.

Return type

dict

Returns

Response Syntax

{
    'TrainingJobArn': 'string'
}

Response Structure

  • (dict) --

    • TrainingJobArn (string) --

      The Amazon Resource Name (ARN) of the training job.

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceLimitExceeded
  • SageMaker.Client.exceptions.ResourceNotFound
create_transform_job(**kwargs)

Starts a transform job. A transform job uses a trained model to get inferences on a dataset and saves these results to an Amazon S3 location that you specify.

To perform batch transformations, you create a transform job and use the data that you have readily available.

In the request body, you provide the following:

  • TransformJobName - Identifies the transform job. The name must be unique within an AWS Region in an AWS account.
  • ModelName - Identifies the model to use. ModelName must be the name of an existing Amazon SageMaker model in the same AWS Region and AWS account. For information on creating a model, see CreateModel .
  • TransformInput - Describes the dataset to be transformed and the Amazon S3 location where it is stored.
  • TransformOutput - Identifies the Amazon S3 location where you want Amazon SageMaker to save the results from the transform job.
  • TransformResources - Identifies the ML compute instances for the transform job.

For more information about how batch transformation works, see Batch Transform .

See also: AWS API Documentation

Request Syntax

response = client.create_transform_job(
    TransformJobName='string',
    ModelName='string',
    MaxConcurrentTransforms=123,
    ModelClientConfig={
        'InvocationsTimeoutInSeconds': 123,
        'InvocationsMaxRetries': 123
    },
    MaxPayloadInMB=123,
    BatchStrategy='MultiRecord'|'SingleRecord',
    Environment={
        'string': 'string'
    },
    TransformInput={
        'DataSource': {
            'S3DataSource': {
                'S3DataType': 'ManifestFile'|'S3Prefix'|'AugmentedManifestFile',
                'S3Uri': 'string'
            }
        },
        'ContentType': 'string',
        'CompressionType': 'None'|'Gzip',
        'SplitType': 'None'|'Line'|'RecordIO'|'TFRecord'
    },
    TransformOutput={
        'S3OutputPath': 'string',
        'Accept': 'string',
        'AssembleWith': 'None'|'Line',
        'KmsKeyId': 'string'
    },
    TransformResources={
        'InstanceType': 'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge',
        'InstanceCount': 123,
        'VolumeKmsKeyId': 'string'
    },
    DataProcessing={
        'InputFilter': 'string',
        'OutputFilter': 'string',
        'JoinSource': 'Input'|'None'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    ExperimentConfig={
        'ExperimentName': 'string',
        'TrialName': 'string',
        'TrialComponentDisplayName': 'string'
    }
)
Parameters
  • TransformJobName (string) --

    [REQUIRED]

    The name of the transform job. The name must be unique within an AWS Region in an AWS account.

  • ModelName (string) --

    [REQUIRED]

    The name of the model that you want to use for the transform job. ModelName must be the name of an existing Amazon SageMaker model within an AWS Region in an AWS account.

  • MaxConcurrentTransforms (integer) -- The maximum number of parallel requests that can be sent to each instance in a transform job. If MaxConcurrentTransforms is set to 0 or left unset, Amazon SageMaker checks the optional execution-parameters to determine the settings for your chosen algorithm. If the execution-parameters endpoint is not enabled, the default value is 1 . For more information on execution-parameters, see How Containers Serve Requests . For built-in algorithms, you don't need to set a value for MaxConcurrentTransforms .
  • ModelClientConfig (dict) --

    Configures the timeout and maximum number of retries for processing a transform job invocation.

    • InvocationsTimeoutInSeconds (integer) --

      The timeout value in seconds for an invocation request.

    • InvocationsMaxRetries (integer) --

      The maximum number of retries when invocation requests are failing.

  • MaxPayloadInMB (integer) --

    The maximum allowed size of the payload, in MB. A payload is the data portion of a record (without metadata). The value in MaxPayloadInMB must be greater than, or equal to, the size of a single record. To estimate the size of a record in MB, divide the size of your dataset by the number of records. To ensure that the records fit within the maximum payload size, we recommend using a slightly larger value. The default value is 6 MB.

    For cases where the payload might be arbitrarily large and is transmitted using HTTP chunked encoding, set the value to 0 . This feature works only in supported algorithms. Currently, Amazon SageMaker built-in algorithms do not support HTTP chunked encoding.

  • BatchStrategy (string) --

    Specifies the number of records to include in a mini-batch for an HTTP inference request. A record is a single unit of input data that inference can be made on. For example, a single line in a CSV file is a record.

    To enable the batch strategy, you must set the SplitType property to Line , RecordIO , or TFRecord .

    To use only one record when making an HTTP invocation request to a container, set BatchStrategy to SingleRecord and SplitType to Line .

    To fit as many records in a mini-batch as can fit within the MaxPayloadInMB limit, set BatchStrategy to MultiRecord and SplitType to Line .

  • Environment (dict) --

    The environment variables to set in the Docker container. We support up to 16 key and values entries in the map.

    • (string) --
      • (string) --
  • TransformInput (dict) --

    [REQUIRED]

    Describes the input source and the way the transform job consumes it.

    • DataSource (dict) -- [REQUIRED]

      Describes the location of the channel data, which is, the S3 location of the input data that the model can consume.

      • S3DataSource (dict) -- [REQUIRED]

        The S3 location of the data source that is associated with a channel.

        • S3DataType (string) -- [REQUIRED]

          If you choose S3Prefix , S3Uri identifies a key name prefix. Amazon SageMaker uses all objects with the specified key name prefix for batch transform.

          If you choose ManifestFile , S3Uri identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for batch transform.

          The following values are compatible: ManifestFile , S3Prefix

          The following value is not compatible: AugmentedManifestFile

        • S3Uri (string) -- [REQUIRED]

          Depending on the value specified for the S3DataType , identifies either a key name prefix or a manifest. For example:

          • A key name prefix might look like this: s3://bucketname/exampleprefix .
          • A manifest might look like this: s3://bucketname/example.manifest The manifest is an S3 object which is a JSON file with the following format: [ {"prefix": "s3://customer_bucket/some/prefix/"}, "relative/path/to/custdata-1", "relative/path/custdata-2", ... "relative/path/custdata-N" ] The preceding JSON matches the following S3Uris : s3://customer_bucket/some/prefix/relative/path/to/custdata-1 s3://customer_bucket/some/prefix/relative/path/custdata-2 ... s3://customer_bucket/some/prefix/relative/path/custdata-N The complete set of S3Uris in this manifest constitutes the input data for the channel for this datasource. The object that each S3Uris points to must be readable by the IAM role that Amazon SageMaker uses to perform tasks on your behalf.
    • ContentType (string) --

      The multipurpose internet mail extension (MIME) type of the data. Amazon SageMaker uses the MIME type with each http call to transfer data to the transform job.

    • CompressionType (string) --

      If your transform data is compressed, specify the compression type. Amazon SageMaker automatically decompresses the data for the transform job accordingly. The default value is None .

    • SplitType (string) --

      The method to use to split the transform job's data files into smaller batches. Splitting is necessary when the total size of each object is too large to fit in a single request. You can also use data splitting to improve performance by processing multiple concurrent mini-batches. The default value for SplitType is None , which indicates that input data files are not split, and request payloads contain the entire contents of an input object. Set the value of this parameter to Line to split records on a newline character boundary. SplitType also supports a number of record-oriented binary data formats. Currently, the supported record formats are:

      • RecordIO
      • TFRecord

      When splitting is enabled, the size of a mini-batch depends on the values of the BatchStrategy and MaxPayloadInMB parameters. When the value of BatchStrategy is MultiRecord , Amazon SageMaker sends the maximum number of records in each request, up to the MaxPayloadInMB limit. If the value of BatchStrategy is SingleRecord , Amazon SageMaker sends individual records in each request.

      Note

      Some data formats represent a record as a binary payload wrapped with extra padding bytes. When splitting is applied to a binary data format, padding is removed if the value of BatchStrategy is set to SingleRecord . Padding is not removed if the value of BatchStrategy is set to MultiRecord .

      For more information about RecordIO , see Create a Dataset Using RecordIO in the MXNet documentation. For more information about TFRecord , see Consuming TFRecord data in the TensorFlow documentation.

  • TransformOutput (dict) --

    [REQUIRED]

    Describes the results of the transform job.

    • S3OutputPath (string) -- [REQUIRED]

      The Amazon S3 path where you want Amazon SageMaker to store the results of the transform job. For example, s3://bucket-name/key-name-prefix .

      For every S3 object used as input for the transform job, batch transform stores the transformed data with an .``out`` suffix in a corresponding subfolder in the location in the output prefix. For example, for the input data stored at s3://bucket-name/input-name-prefix/dataset01/data.csv , batch transform stores the transformed data at s3://bucket-name/output-name-prefix/input-name-prefix/data.csv.out . Batch transform doesn't upload partially processed objects. For an input S3 object that contains multiple records, it creates an .``out`` file only if the transform job succeeds on the entire file. When the input contains multiple S3 objects, the batch transform job processes the listed S3 objects and uploads only the output for successfully processed objects. If any object fails in the transform job batch transform marks the job as failed to prompt investigation.

    • Accept (string) --

      The MIME type used to specify the output data. Amazon SageMaker uses the MIME type with each http call to transfer data from the transform job.

    • AssembleWith (string) --

      Defines how to assemble the results of the transform job as a single S3 object. Choose a format that is most convenient to you. To concatenate the results in binary format, specify None . To add a newline character at the end of every transformed record, specify Line .

    • KmsKeyId (string) --

      The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats:

      • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
      • Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
      • Alias name: alias/ExampleAlias
      • Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias

      If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.

      The KMS key policy must grant permission to the IAM role that you specify in your CreateModel request. For more information, see Using Key Policies in AWS KMS in the AWS Key Management Service Developer Guide .

  • TransformResources (dict) --

    [REQUIRED]

    Describes the resources, including ML instance types and ML instance count, to use for the transform job.

    • InstanceType (string) -- [REQUIRED]

      The ML compute instance type for the transform job. If you are using built-in algorithms to transform moderately sized datasets, we recommend using ml.m4.xlarge or ml.m5.large instance types.

    • InstanceCount (integer) -- [REQUIRED]

      The number of ML compute instances to use in the transform job. For distributed transform jobs, specify a value greater than 1. The default value is 1 .

    • VolumeKmsKeyId (string) --

      The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt model data on the storage volume attached to the ML compute instance(s) that run the batch transform job. The VolumeKmsKeyId can be any of the following formats:

      • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
      • Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
      • Alias name: alias/ExampleAlias
      • Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias
  • DataProcessing (dict) --

    The data structure used to specify the data to be used for inference in a batch transform job and to associate the data that is relevant to the prediction results in the output. The input filter provided allows you to exclude input data that is not needed for inference in a batch transform job. The output filter provided allows you to include input data relevant to interpreting the predictions in the output from the job. For more information, see Associate Prediction Results with their Corresponding Input Records .

    • InputFilter (string) --

      A JSONPath expression used to select a portion of the input data to pass to the algorithm. Use the InputFilter parameter to exclude fields, such as an ID column, from the input. If you want Amazon SageMaker to pass the entire input dataset to the algorithm, accept the default value $ .

      Examples: "$" , "$[1:]" , "$.features"

    • OutputFilter (string) --

      A JSONPath expression used to select a portion of the joined dataset to save in the output file for a batch transform job. If you want Amazon SageMaker to store the entire input dataset in the output file, leave the default value, $ . If you specify indexes that aren't within the dimension size of the joined dataset, you get an error.

      Examples: "$" , "$[0,5:]" , "$['id','SageMakerOutput']"

    • JoinSource (string) --

      Specifies the source of the data to join with the transformed data. The valid values are None and Input . The default value is None , which specifies not to join the input with the transformed data. If you want the batch transform job to join the original input data with the transformed data, set JoinSource to Input .

      For JSON or JSONLines objects, such as a JSON array, Amazon SageMaker adds the transformed data to the input JSON object in an attribute called SageMakerOutput . The joined result for JSON must be a key-value pair object. If the input is not a key-value pair object, Amazon SageMaker creates a new JSON file. In the new JSON file, and the input data is stored under the SageMakerInput key and the results are stored in SageMakerOutput .

      For CSV files, Amazon SageMaker combines the transformed data with the input data at the end of the input data and stores it in the output file. The joined data has the joined input data followed by the transformed data and the output is a CSV file.

  • Tags (list) --

    (Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

  • ExperimentConfig (dict) --

    Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:

    • CreateProcessingJob
    • CreateTrainingJob
    • CreateTransformJob
    • ExperimentName (string) --

      The name of an existing experiment to associate the trial component with.

    • TrialName (string) --

      The name of an existing trial to associate the trial component with. If not specified, a new trial is created.

    • TrialComponentDisplayName (string) --

      The display name for the trial component. If this key isn't specified, the display name is the trial component name.

Return type

dict

Returns

Response Syntax

{
    'TransformJobArn': 'string'
}

Response Structure

  • (dict) --

    • TransformJobArn (string) --

      The Amazon Resource Name (ARN) of the transform job.

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceLimitExceeded
  • SageMaker.Client.exceptions.ResourceNotFound
create_trial(**kwargs)

Creates an Amazon SageMaker trial . A trial is a set of steps called trial components that produce a machine learning model. A trial is part of a single Amazon SageMaker experiment .

When you use Amazon SageMaker Studio or the Amazon SageMaker Python SDK, all experiments, trials, and trial components are automatically tracked, logged, and indexed. When you use the AWS SDK for Python (Boto), you must use the logging APIs provided by the SDK.

You can add tags to a trial and then use the Search API to search for the tags.

To get a list of all your trials, call the ListTrials API. To view a trial's properties, call the DescribeTrial API. To create a trial component, call the CreateTrialComponent API.

See also: AWS API Documentation

Request Syntax

response = client.create_trial(
    TrialName='string',
    DisplayName='string',
    ExperimentName='string',
    MetadataProperties={
        'CommitId': 'string',
        'Repository': 'string',
        'GeneratedBy': 'string',
        'ProjectId': 'string'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • TrialName (string) --

    [REQUIRED]

    The name of the trial. The name must be unique in your AWS account and is not case-sensitive.

  • DisplayName (string) -- The name of the trial as displayed. The name doesn't need to be unique. If DisplayName isn't specified, TrialName is displayed.
  • ExperimentName (string) --

    [REQUIRED]

    The name of the experiment to associate the trial with.

  • MetadataProperties (dict) --

    Metadata properties of the tracking entity, trial, or trial component.

    • CommitId (string) --

      The commit ID.

    • Repository (string) --

      The repository.

    • GeneratedBy (string) --

      The entity this entity was generated by.

    • ProjectId (string) --

      The project ID.

  • Tags (list) --

    A list of tags to associate with the trial. You can use Search API to search on the tags.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'TrialArn': 'string'
}

Response Structure

  • (dict) --

    • TrialArn (string) --

      The Amazon Resource Name (ARN) of the trial.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_trial_component(**kwargs)

Creates a trial component , which is a stage of a machine learning trial . A trial is composed of one or more trial components. A trial component can be used in multiple trials.

Trial components include pre-processing jobs, training jobs, and batch transform jobs.

When you use Amazon SageMaker Studio or the Amazon SageMaker Python SDK, all experiments, trials, and trial components are automatically tracked, logged, and indexed. When you use the AWS SDK for Python (Boto), you must use the logging APIs provided by the SDK.

You can add tags to a trial component and then use the Search API to search for the tags.

Note

CreateTrialComponent can only be invoked from within an Amazon SageMaker managed environment. This includes Amazon SageMaker training jobs, processing jobs, transform jobs, and Amazon SageMaker notebooks. A call to CreateTrialComponent from outside one of these environments results in an error.

See also: AWS API Documentation

Request Syntax

response = client.create_trial_component(
    TrialComponentName='string',
    DisplayName='string',
    Status={
        'PrimaryStatus': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped',
        'Message': 'string'
    },
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    Parameters={
        'string': {
            'StringValue': 'string',
            'NumberValue': 123.0
        }
    },
    InputArtifacts={
        'string': {
            'MediaType': 'string',
            'Value': 'string'
        }
    },
    OutputArtifacts={
        'string': {
            'MediaType': 'string',
            'Value': 'string'
        }
    },
    MetadataProperties={
        'CommitId': 'string',
        'Repository': 'string',
        'GeneratedBy': 'string',
        'ProjectId': 'string'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • TrialComponentName (string) --

    [REQUIRED]

    The name of the component. The name must be unique in your AWS account and is not case-sensitive.

  • DisplayName (string) -- The name of the component as displayed. The name doesn't need to be unique. If DisplayName isn't specified, TrialComponentName is displayed.
  • Status (dict) --

    The status of the component. States include:

    • InProgress
    • Completed
    • Failed
    • PrimaryStatus (string) --

      The status of the trial component.

    • Message (string) --

      If the component failed, a message describing why.

  • StartTime (datetime) -- When the component started.
  • EndTime (datetime) -- When the component ended.
  • Parameters (dict) --

    The hyperparameters for the component.

    • (string) --
      • (dict) --

        The value of a hyperparameter. Only one of NumberValue or StringValue can be specified.

        This object is specified in the CreateTrialComponent request.

        • StringValue (string) --

          The string value of a categorical hyperparameter. If you specify a value for this parameter, you can't specify the NumberValue parameter.

        • NumberValue (float) --

          The numeric value of a numeric hyperparameter. If you specify a value for this parameter, you can't specify the StringValue parameter.

  • InputArtifacts (dict) --

    The input artifacts for the component. Examples of input artifacts are datasets, algorithms, hyperparameters, source code, and instance types.

    • (string) --
      • (dict) --

        Represents an input or output artifact of a trial component. You specify TrialComponentArtifact as part of the InputArtifacts and OutputArtifacts parameters in the CreateTrialComponent request.

        Examples of input artifacts are datasets, algorithms, hyperparameters, source code, and instance types. Examples of output artifacts are metrics, snapshots, logs, and images.

        • MediaType (string) --

          The media type of the artifact, which indicates the type of data in the artifact file. The media type consists of a type and a subtype concatenated with a slash (/) character, for example, text/csv, image/jpeg, and s3/uri. The type specifies the category of the media. The subtype specifies the kind of data.

        • Value (string) -- [REQUIRED]

          The location of the artifact.

  • OutputArtifacts (dict) --

    The output artifacts for the component. Examples of output artifacts are metrics, snapshots, logs, and images.

    • (string) --
      • (dict) --

        Represents an input or output artifact of a trial component. You specify TrialComponentArtifact as part of the InputArtifacts and OutputArtifacts parameters in the CreateTrialComponent request.

        Examples of input artifacts are datasets, algorithms, hyperparameters, source code, and instance types. Examples of output artifacts are metrics, snapshots, logs, and images.

        • MediaType (string) --

          The media type of the artifact, which indicates the type of data in the artifact file. The media type consists of a type and a subtype concatenated with a slash (/) character, for example, text/csv, image/jpeg, and s3/uri. The type specifies the category of the media. The subtype specifies the kind of data.

        • Value (string) -- [REQUIRED]

          The location of the artifact.

  • MetadataProperties (dict) --

    Metadata properties of the tracking entity, trial, or trial component.

    • CommitId (string) --

      The commit ID.

    • Repository (string) --

      The repository.

    • GeneratedBy (string) --

      The entity this entity was generated by.

    • ProjectId (string) --

      The project ID.

  • Tags (list) --

    A list of tags to associate with the component. You can use Search API to search on the tags.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'TrialComponentArn': 'string'
}

Response Structure

  • (dict) --

    • TrialComponentArn (string) --

      The Amazon Resource Name (ARN) of the trial component.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
create_user_profile(**kwargs)

Creates a user profile. A user profile represents a single user within a domain, and is the main way to reference a "person" for the purposes of sharing, reporting, and other user-oriented features. This entity is created when a user onboards to Amazon SageMaker Studio. If an administrator invites a person by email or imports them from SSO, a user profile is automatically created. A user profile is the primary holder of settings for an individual user and has a reference to the user's private Amazon Elastic File System (EFS) home directory.

See also: AWS API Documentation

Request Syntax

response = client.create_user_profile(
    DomainId='string',
    UserProfileName='string',
    SingleSignOnUserIdentifier='string',
    SingleSignOnUserValue='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    UserSettings={
        'ExecutionRole': 'string',
        'SecurityGroups': [
            'string',
        ],
        'SharingSettings': {
            'NotebookOutputOption': 'Allowed'|'Disabled',
            'S3OutputPath': 'string',
            'S3KmsKeyId': 'string'
        },
        'JupyterServerAppSettings': {
            'DefaultResourceSpec': {
                'SageMakerImageArn': 'string',
                'SageMakerImageVersionArn': 'string',
                'InstanceType': 'system'|'ml.t3.micro'|'ml.t3.small'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.8xlarge'|'ml.m5.12xlarge'|'ml.m5.16xlarge'|'ml.m5.24xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.12xlarge'|'ml.c5.18xlarge'|'ml.c5.24xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'
            }
        },
        'KernelGatewayAppSettings': {
            'DefaultResourceSpec': {
                'SageMakerImageArn': 'string',
                'SageMakerImageVersionArn': 'string',
                'InstanceType': 'system'|'ml.t3.micro'|'ml.t3.small'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.8xlarge'|'ml.m5.12xlarge'|'ml.m5.16xlarge'|'ml.m5.24xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.12xlarge'|'ml.c5.18xlarge'|'ml.c5.24xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'
            },
            'CustomImages': [
                {
                    'ImageName': 'string',
                    'ImageVersionNumber': 123,
                    'AppImageConfigName': 'string'
                },
            ]
        },
        'TensorBoardAppSettings': {
            'DefaultResourceSpec': {
                'SageMakerImageArn': 'string',
                'SageMakerImageVersionArn': 'string',
                'InstanceType': 'system'|'ml.t3.micro'|'ml.t3.small'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.8xlarge'|'ml.m5.12xlarge'|'ml.m5.16xlarge'|'ml.m5.24xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.12xlarge'|'ml.c5.18xlarge'|'ml.c5.24xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'
            }
        }
    }
)
Parameters
  • DomainId (string) --

    [REQUIRED]

    The ID of the associated Domain.

  • UserProfileName (string) --

    [REQUIRED]

    A name for the UserProfile.

  • SingleSignOnUserIdentifier (string) -- A specifier for the type of value specified in SingleSignOnUserValue. Currently, the only supported value is "UserName". If the Domain's AuthMode is SSO, this field is required. If the Domain's AuthMode is not SSO, this field cannot be specified.
  • SingleSignOnUserValue (string) -- The username of the associated AWS Single Sign-On User for this UserProfile. If the Domain's AuthMode is SSO, this field is required, and must match a valid username of a user in your directory. If the Domain's AuthMode is not SSO, this field cannot be specified.
  • Tags (list) --

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

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

  • UserSettings (dict) --

    A collection of settings.

    • ExecutionRole (string) --

      The execution role for the user.

    • SecurityGroups (list) --

      The security groups for the Amazon Virtual Private Cloud (VPC) that Studio uses for communication.

      Optional when the CreateDomain.AppNetworkAccessType parameter is set to PublicInternetOnly .

      Required when the CreateDomain.AppNetworkAccessType parameter is set to VpcOnly .

      • (string) --
    • SharingSettings (dict) --

      The sharing settings.

      • NotebookOutputOption (string) --

        Whether to include the notebook cell output when sharing the notebook. The default is Disabled .

      • S3OutputPath (string) --

        When NotebookOutputOption is Allowed , the Amazon S3 bucket used to save the notebook cell output.

      • S3KmsKeyId (string) --

        When NotebookOutputOption is Allowed , the AWS Key Management Service (KMS) encryption key ID used to encrypt the notebook cell output in the Amazon S3 bucket.

    • JupyterServerAppSettings (dict) --

      The Jupyter server's app settings.

      • DefaultResourceSpec (dict) --

        The default instance type and the Amazon Resource Name (ARN) of the default SageMaker image used by the JupyterServer app.

        • SageMakerImageArn (string) --

          The ARN of the SageMaker image that the image version belongs to.

        • SageMakerImageVersionArn (string) --

          The ARN of the image version created on the instance.

        • InstanceType (string) --

          The instance type that the image version runs on.

    • KernelGatewayAppSettings (dict) --

      The kernel gateway app settings.

      • DefaultResourceSpec (dict) --

        The default instance type and the Amazon Resource Name (ARN) of the default SageMaker image used by the KernelGateway app.

        • SageMakerImageArn (string) --

          The ARN of the SageMaker image that the image version belongs to.

        • SageMakerImageVersionArn (string) --

          The ARN of the image version created on the instance.

        • InstanceType (string) --

          The instance type that the image version runs on.

      • CustomImages (list) --

        A list of custom SageMaker images that are configured to run as a KernelGateway app.

        • (dict) --

          A custom SageMaker image. For more information, see Bring your own SageMaker image .

          • ImageName (string) -- [REQUIRED]

            The name of the CustomImage. Must be unique to your account.

          • ImageVersionNumber (integer) --

            The version number of the CustomImage.

          • AppImageConfigName (string) -- [REQUIRED]

            The name of the AppImageConfig.

    • TensorBoardAppSettings (dict) --

      The TensorBoard app settings.

      • DefaultResourceSpec (dict) --

        The default instance type and the Amazon Resource Name (ARN) of the SageMaker image created on the instance.

        • SageMakerImageArn (string) --

          The ARN of the SageMaker image that the image version belongs to.

        • SageMakerImageVersionArn (string) --

          The ARN of the image version created on the instance.

        • InstanceType (string) --

          The instance type that the image version runs on.

Return type

dict

Returns

Response Syntax

{
    'UserProfileArn': 'string'
}

Response Structure

  • (dict) --

    • UserProfileArn (string) --

      The user profile Amazon Resource Name (ARN).

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
  • SageMaker.Client.exceptions.ResourceInUse
create_workforce(**kwargs)

Use this operation to create a workforce. This operation will return an error if a workforce already exists in the AWS Region that you specify. You can only create one workforce in each AWS Region per AWS account.

If you want to create a new workforce in an AWS Region where a workforce already exists, use the API operation to delete the existing workforce and then use CreateWorkforce to create a new workforce.

To create a private workforce using Amazon Cognito, you must specify a Cognito user pool in CognitoConfig . You can also create an Amazon Cognito workforce using the Amazon SageMaker console. For more information, see Create a Private Workforce (Amazon Cognito) .

To create a private workforce using your own OIDC Identity Provider (IdP), specify your IdP configuration in OidcConfig . Your OIDC IdP must support groups because groups are used by Ground Truth and Amazon A2I to create work teams. For more information, see Create a Private Workforce (OIDC IdP) .

See also: AWS API Documentation

Request Syntax

response = client.create_workforce(
    CognitoConfig={
        'UserPool': 'string',
        'ClientId': 'string'
    },
    OidcConfig={
        'ClientId': 'string',
        'ClientSecret': 'string',
        'Issuer': 'string',
        'AuthorizationEndpoint': 'string',
        'TokenEndpoint': 'string',
        'UserInfoEndpoint': 'string',
        'LogoutEndpoint': 'string',
        'JwksUri': 'string'
    },
    SourceIpConfig={
        'Cidrs': [
            'string',
        ]
    },
    WorkforceName='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • CognitoConfig (dict) --

    Use this parameter to configure an Amazon Cognito private workforce. A single Cognito workforce is created using and corresponds to a single Amazon Cognito user pool .

    Do not use OidcConfig if you specify values for CognitoConfig .

    • UserPool (string) -- [REQUIRED]

      A user pool is a user directory in Amazon Cognito. With a user pool, your users can sign in to your web or mobile app through Amazon Cognito. Your users can also sign in through social identity providers like Google, Facebook, Amazon, or Apple, and through SAML identity providers.

    • ClientId (string) -- [REQUIRED]

      The client ID for your Amazon Cognito user pool.

  • OidcConfig (dict) --

    Use this parameter to configure a private workforce using your own OIDC Identity Provider.

    Do not use CognitoConfig if you specify values for OidcConfig .

    • ClientId (string) -- [REQUIRED]

      The OIDC IdP client ID used to configure your private workforce.

    • ClientSecret (string) -- [REQUIRED]

      The OIDC IdP client secret used to configure your private workforce.

    • Issuer (string) -- [REQUIRED]

      The OIDC IdP issuer used to configure your private workforce.

    • AuthorizationEndpoint (string) -- [REQUIRED]

      The OIDC IdP authorization endpoint used to configure your private workforce.

    • TokenEndpoint (string) -- [REQUIRED]

      The OIDC IdP token endpoint used to configure your private workforce.

    • UserInfoEndpoint (string) -- [REQUIRED]

      The OIDC IdP user information endpoint used to configure your private workforce.

    • LogoutEndpoint (string) -- [REQUIRED]

      The OIDC IdP logout endpoint used to configure your private workforce.

    • JwksUri (string) -- [REQUIRED]

      The OIDC IdP JSON Web Key Set (Jwks) URI used to configure your private workforce.

  • SourceIpConfig (dict) --

    A list of IP address ranges (CIDRs ). Used to create an allow list of IP addresses for a private workforce. Workers will only be able to login to their worker portal from an IP address within this range. By default, a workforce isn't restricted to specific IP addresses.

    • Cidrs (list) -- [REQUIRED]

      A list of one to ten Classless Inter-Domain Routing (CIDR) values.

      Maximum: Ten CIDR values

      Note

      The following Length Constraints apply to individual CIDR values in the CIDR value list.

      • (string) --
  • WorkforceName (string) --

    [REQUIRED]

    The name of the private workforce.

  • Tags (list) --

    An array of key-value pairs that contain metadata to help you categorize and organize our workforce. Each tag consists of a key and a value, both of which you define.

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'WorkforceArn': 'string'
}

Response Structure

  • (dict) --

    • WorkforceArn (string) --

      The Amazon Resource Name (ARN) of the workforce.

create_workteam(**kwargs)

Creates a new work team for labeling your data. A work team is defined by one or more Amazon Cognito user pools. You must first create the user pools before you can create a work team.

You cannot create more than 25 work teams in an account and region.

See also: AWS API Documentation

Request Syntax

response = client.create_workteam(
    WorkteamName='string',
    WorkforceName='string',
    MemberDefinitions=[
        {
            'CognitoMemberDefinition': {
                'UserPool': 'string',
                'UserGroup': 'string',
                'ClientId': 'string'
            },
            'OidcMemberDefinition': {
                'Groups': [
                    'string',
                ]
            }
        },
    ],
    Description='string',
    NotificationConfiguration={
        'NotificationTopicArn': 'string'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • WorkteamName (string) --

    [REQUIRED]

    The name of the work team. Use this name to identify the work team.

  • WorkforceName (string) -- The name of the workforce.
  • MemberDefinitions (list) --

    [REQUIRED]

    A list of MemberDefinition objects that contains objects that identify the workers that make up the work team.

    Workforces can be created using Amazon Cognito or your own OIDC Identity Provider (IdP). For private workforces created using Amazon Cognito use CognitoMemberDefinition . For workforces created using your own OIDC identity provider (IdP) use OidcMemberDefinition . Do not provide input for both of these parameters in a single request.

    For workforces created using Amazon Cognito, private work teams correspond to Amazon Cognito user groups within the user pool used to create a workforce. All of the CognitoMemberDefinition objects that make up the member definition must have the same ClientId and UserPool values. To add a Amazon Cognito user group to an existing worker pool, see Adding groups to a User Pool . For more information about user pools, see `Amazon Cognito User Pools .

    For workforces created using your own OIDC IdP, specify the user groups that you want to include in your private work team in OidcMemberDefinition by listing those groups in Groups .

    • (dict) --

      Defines an Amazon Cognito or your own OIDC IdP user group that is part of a work team.

      • CognitoMemberDefinition (dict) --

        The Amazon Cognito user group that is part of the work team.

        • UserPool (string) -- [REQUIRED]

          An identifier for a user pool. The user pool must be in the same region as the service that you are calling.

        • UserGroup (string) -- [REQUIRED]

          An identifier for a user group.

        • ClientId (string) -- [REQUIRED]

          An identifier for an application client. You must create the app client ID using Amazon Cognito.

      • OidcMemberDefinition (dict) --

        A list user groups that exist in your OIDC Identity Provider (IdP). One to ten groups can be used to create a single private work team. When you add a user group to the list of Groups , you can add that user group to one or more private work teams. If you add a user group to a private work team, all workers in that user group are added to the work team.

        • Groups (list) -- [REQUIRED]

          A list of comma seperated strings that identifies user groups in your OIDC IdP. Each user group is made up of a group of private workers.

          • (string) --
  • Description (string) --

    [REQUIRED]

    A description of the work team.

  • NotificationConfiguration (dict) --

    Configures notification of workers regarding available or expiring work items.

    • NotificationTopicArn (string) --

      The ARN for the SNS topic to which notifications should be published.

  • Tags (list) --

    An array of key-value pairs.

    For more information, see Resource Tag and Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .

    • (dict) --

      Describes a tag.

      • Key (string) -- [REQUIRED]

        The tag key.

      • Value (string) -- [REQUIRED]

        The tag value.

Return type

dict

Returns

Response Syntax

{
    'WorkteamArn': 'string'
}

Response Structure

  • (dict) --

    • WorkteamArn (string) --

      The Amazon Resource Name (ARN) of the work team. You can use this ARN to identify the work team.

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceLimitExceeded
delete_action(**kwargs)

Deletes an action.

See also: AWS API Documentation

Request Syntax

response = client.delete_action(
    ActionName='string'
)
Parameters
ActionName (string) --

[REQUIRED]

The name of the action to delete.

Return type
dict
Returns
Response Syntax
{
    'ActionArn': 'string'
}

Response Structure

  • (dict) --
    • ActionArn (string) --

      The Amazon Resource Name (ARN) of the action.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
delete_algorithm(**kwargs)

Removes the specified algorithm from your account.

See also: AWS API Documentation

Request Syntax

response = client.delete_algorithm(
    AlgorithmName='string'
)
Parameters
AlgorithmName (string) --

[REQUIRED]

The name of the algorithm to delete.

Returns
None
delete_app(**kwargs)

Used to stop and delete an app.

See also: AWS API Documentation

Request Syntax

response = client.delete_app(
    DomainId='string',
    UserProfileName='string',
    AppType='JupyterServer'|'KernelGateway'|'TensorBoard',
    AppName='string'
)
Parameters
  • DomainId (string) --

    [REQUIRED]

    The domain ID.

  • UserProfileName (string) --

    [REQUIRED]

    The user profile name.

  • AppType (string) --

    [REQUIRED]

    The type of app.

  • AppName (string) --

    [REQUIRED]

    The name of the app.

Returns

None

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceNotFound
delete_app_image_config(**kwargs)

Deletes an AppImageConfig.

See also: AWS API Documentation

Request Syntax

response = client.delete_app_image_config(
    AppImageConfigName='string'
)
Parameters
AppImageConfigName (string) --

[REQUIRED]

The name of the AppImageConfig to delete.

Returns
None

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
delete_artifact(**kwargs)

Deletes an artifact. Either ArtifactArn or Source must be specified.

See also: AWS API Documentation

Request Syntax

response = client.delete_artifact(
    ArtifactArn='string',
    Source={
        'SourceUri': 'string',
        'SourceTypes': [
            {
                'SourceIdType': 'MD5Hash'|'S3ETag'|'S3Version'|'Custom',
                'Value': 'string'
            },
        ]
    }
)
Parameters
  • ArtifactArn (string) -- The Amazon Resource Name (ARN) of the artifact to delete.
  • Source (dict) --

    The URI of the source.

    • SourceUri (string) -- [REQUIRED]

      The URI of the source.

    • SourceTypes (list) --

      A list of source types.

      • (dict) --

        The ID and ID type of an artifact source.

        • SourceIdType (string) -- [REQUIRED]

          The type of ID.

        • Value (string) -- [REQUIRED]

          The ID.

Return type

dict

Returns

Response Syntax

{
    'ArtifactArn': 'string'
}

Response Structure

  • (dict) --

    • ArtifactArn (string) --

      The Amazon Resource Name (ARN) of the artifact.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
delete_association(**kwargs)

Deletes an association.

See also: AWS API Documentation

Request Syntax

response = client.delete_association(
    SourceArn='string',
    DestinationArn='string'
)
Parameters
  • SourceArn (string) --

    [REQUIRED]

    The ARN of the source.

  • DestinationArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the destination.

Return type

dict

Returns

Response Syntax

{
    'SourceArn': 'string',
    'DestinationArn': 'string'
}

Response Structure

  • (dict) --

    • SourceArn (string) --

      The ARN of the source.

    • DestinationArn (string) --

      The Amazon Resource Name (ARN) of the destination.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
delete_code_repository(**kwargs)

Deletes the specified Git repository from your account.

See also: AWS API Documentation

Request Syntax

response = client.delete_code_repository(
    CodeRepositoryName='string'
)
Parameters
CodeRepositoryName (string) --

[REQUIRED]

The name of the Git repository to delete.

Returns
None
delete_context(**kwargs)

Deletes an context.

See also: AWS API Documentation

Request Syntax

response = client.delete_context(
    ContextName='string'
)
Parameters
ContextName (string) --

[REQUIRED]

The name of the context to delete.

Return type
dict
Returns
Response Syntax
{
    'ContextArn': 'string'
}

Response Structure

  • (dict) --
    • ContextArn (string) --

      The Amazon Resource Name (ARN) of the context.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
delete_domain(**kwargs)

Used to delete a domain. If you onboarded with IAM mode, you will need to delete your domain to onboard again using SSO. Use with caution. All of the members of the domain will lose access to their EFS volume, including data, notebooks, and other artifacts.

See also: AWS API Documentation

Request Syntax

response = client.delete_domain(
    DomainId='string',
    RetentionPolicy={
        'HomeEfsFileSystem': 'Retain'|'Delete'
    }
)
Parameters
  • DomainId (string) --

    [REQUIRED]

    The domain ID.

  • RetentionPolicy (dict) --

    The retention policy for this domain, which specifies whether resources will be retained after the Domain is deleted. By default, all resources are retained (not automatically deleted).

    • HomeEfsFileSystem (string) --

      The default is Retain , which specifies to keep the data stored on the EFS volume.

      Specify Delete to delete the data stored on the EFS volume.

Returns

None

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceNotFound
delete_endpoint(**kwargs)

Deletes an endpoint. Amazon SageMaker frees up all of the resources that were deployed when the endpoint was created.

Amazon SageMaker retires any custom KMS key grants associated with the endpoint, meaning you don't need to use the RevokeGrant API call.

See also: AWS API Documentation

Request Syntax

response = client.delete_endpoint(
    EndpointName='string'
)
Parameters
EndpointName (string) --

[REQUIRED]

The name of the endpoint that you want to delete.

Returns
None
delete_endpoint_config(**kwargs)

Deletes an endpoint configuration. The DeleteEndpointConfig API deletes only the specified configuration. It does not delete endpoints created using the configuration.

You must not delete an EndpointConfig in use by an endpoint that is live or while the UpdateEndpoint or CreateEndpoint operations are being performed on the endpoint. If you delete the EndpointConfig of an endpoint that is active or being created or updated you may lose visibility into the instance type the endpoint is using. The endpoint must be deleted in order to stop incurring charges.

See also: AWS API Documentation

Request Syntax

response = client.delete_endpoint_config(
    EndpointConfigName='string'
)
Parameters
EndpointConfigName (string) --

[REQUIRED]

The name of the endpoint configuration that you want to delete.

Returns
None
delete_experiment(**kwargs)

Deletes an Amazon SageMaker experiment. All trials associated with the experiment must be deleted first. Use the ListTrials API to get a list of the trials associated with the experiment.

See also: AWS API Documentation

Request Syntax

response = client.delete_experiment(
    ExperimentName='string'
)
Parameters
ExperimentName (string) --

[REQUIRED]

The name of the experiment to delete.

Return type
dict
Returns
Response Syntax
{
    'ExperimentArn': 'string'
}

Response Structure

  • (dict) --
    • ExperimentArn (string) --

      The Amazon Resource Name (ARN) of the experiment that is being deleted.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
delete_feature_group(**kwargs)

Delete the FeatureGroup and any data that was written to the OnlineStore of the FeatureGroup . Data cannot be accessed from the OnlineStore immediately after DeleteFeatureGroup is called.

Data written into the OfflineStore will not be deleted. The AWS Glue database and tables that are automatically created for your OfflineStore are not deleted.

See also: AWS API Documentation

Request Syntax

response = client.delete_feature_group(
    FeatureGroupName='string'
)
Parameters
FeatureGroupName (string) --

[REQUIRED]

The name of the FeatureGroup you want to delete. The name must be unique within an AWS Region in an AWS account.

Returns
None

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
delete_flow_definition(**kwargs)

Deletes the specified flow definition.

See also: AWS API Documentation

Request Syntax

response = client.delete_flow_definition(
    FlowDefinitionName='string'
)
Parameters
FlowDefinitionName (string) --

[REQUIRED]

The name of the flow definition you are deleting.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceNotFound
delete_human_task_ui(**kwargs)

Use this operation to delete a human task user interface (worker task template).

To see a list of human task user interfaces (work task templates) in your account, use . When you delete a worker task template, it no longer appears when you call ListHumanTaskUis .

See also: AWS API Documentation

Request Syntax

response = client.delete_human_task_ui(
    HumanTaskUiName='string'
)
Parameters
HumanTaskUiName (string) --

[REQUIRED]

The name of the human task user interface (work task template) you want to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
delete_image(**kwargs)

Deletes a SageMaker image and all versions of the image. The container images aren't deleted.

See also: AWS API Documentation

Request Syntax

response = client.delete_image(
    ImageName='string'
)
Parameters
ImageName (string) --

[REQUIRED]

The name of the image to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceNotFound
delete_image_version(**kwargs)

Deletes a version of a SageMaker image. The container image the version represents isn't deleted.

See also: AWS API Documentation

Request Syntax

response = client.delete_image_version(
    ImageName='string',
    Version=123
)
Parameters
  • ImageName (string) --

    [REQUIRED]

    The name of the image.

  • Version (integer) --

    [REQUIRED]

    The version to delete.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceNotFound
delete_model(**kwargs)

Deletes a model. The DeleteModel API deletes only the model entry that was created in Amazon SageMaker when you called the CreateModel API. It does not delete model artifacts, inference code, or the IAM role that you specified when creating the model.

See also: AWS API Documentation

Request Syntax

response = client.delete_model(
    ModelName='string'
)
Parameters
ModelName (string) --

[REQUIRED]

The name of the model to delete.

Returns
None
delete_model_package(**kwargs)

Deletes a model package.

A model package is used to create Amazon SageMaker models or list on AWS Marketplace. Buyers can subscribe to model packages listed on AWS Marketplace to create models in Amazon SageMaker.

See also: AWS API Documentation

Request Syntax

response = client.delete_model_package(
    ModelPackageName='string'
)
Parameters
ModelPackageName (string) --

[REQUIRED]

The name of the model package. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).

Returns
None

Exceptions

  • SageMaker.Client.exceptions.ConflictException
delete_model_package_group(**kwargs)

Deletes the specified model group.

See also: AWS API Documentation

Request Syntax

response = client.delete_model_package_group(
    ModelPackageGroupName='string'
)
Parameters
ModelPackageGroupName (string) --

[REQUIRED]

The name of the model group to delete.

Returns
None
delete_model_package_group_policy(**kwargs)

Deletes a model group resource policy.

See also: AWS API Documentation

Request Syntax

response = client.delete_model_package_group_policy(
    ModelPackageGroupName='string'
)
Parameters
ModelPackageGroupName (string) --

[REQUIRED]

The name of the model group for which to delete the policy.

Returns
None
delete_monitoring_schedule(**kwargs)

Deletes a monitoring schedule. Also stops the schedule had not already been stopped. This does not delete the job execution history of the monitoring schedule.

See also: AWS API Documentation

Request Syntax

response = client.delete_monitoring_schedule(
    MonitoringScheduleName='string'
)
Parameters
MonitoringScheduleName (string) --

[REQUIRED]

The name of the monitoring schedule to delete.

Returns
None

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
delete_notebook_instance(**kwargs)

Deletes an Amazon SageMaker notebook instance. Before you can delete a notebook instance, you must call the StopNotebookInstance API.

Warning

When you delete a notebook instance, you lose all of your data. Amazon SageMaker removes the ML compute instance, and deletes the ML storage volume and the network interface associated with the notebook instance.

See also: AWS API Documentation

Request Syntax

response = client.delete_notebook_instance(
    NotebookInstanceName='string'
)
Parameters
NotebookInstanceName (string) --

[REQUIRED]

The name of the Amazon SageMaker notebook instance to delete.

Returns
None
delete_notebook_instance_lifecycle_config(**kwargs)

Deletes a notebook instance lifecycle configuration.

See also: AWS API Documentation

Request Syntax

response = client.delete_notebook_instance_lifecycle_config(
    NotebookInstanceLifecycleConfigName='string'
)
Parameters
NotebookInstanceLifecycleConfigName (string) --

[REQUIRED]

The name of the lifecycle configuration to delete.

Returns
None
delete_pipeline(**kwargs)

Deletes a pipeline.

See also: AWS API Documentation

Request Syntax

response = client.delete_pipeline(
    PipelineName='string',
    ClientRequestToken='string'
)
Parameters
  • PipelineName (string) --

    [REQUIRED]

    The name of the pipeline to delete.

  • ClientRequestToken (string) --

    [REQUIRED]

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'PipelineArn': 'string'
}

Response Structure

  • (dict) --

    • PipelineArn (string) --

      The Amazon Resource Name (ARN) of the pipeline to delete.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
delete_project(**kwargs)

Delete the specified project.

See also: AWS API Documentation

Request Syntax

response = client.delete_project(
    ProjectName='string'
)
Parameters
ProjectName (string) --

[REQUIRED]

The name of the project to delete.

Returns
None
delete_tags(**kwargs)

Deletes the specified tags from an Amazon SageMaker resource.

To list a resource's tags, use the ListTags API.

Note

When you call this API to delete tags from a hyperparameter tuning job, the deleted tags are not removed from training jobs that the hyperparameter tuning job launched before you called this API.

See also: AWS API Documentation

Request Syntax

response = client.delete_tags(
    ResourceArn='string',
    TagKeys=[
        'string',
    ]
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource whose tags you want to delete.

  • TagKeys (list) --

    [REQUIRED]

    An array or one or more tag keys to delete.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

delete_trial(**kwargs)

Deletes the specified trial. All trial components that make up the trial must be deleted first. Use the DescribeTrialComponent API to get the list of trial components.

See also: AWS API Documentation

Request Syntax

response = client.delete_trial(
    TrialName='string'
)
Parameters
TrialName (string) --

[REQUIRED]

The name of the trial to delete.

Return type
dict
Returns
Response Syntax
{
    'TrialArn': 'string'
}

Response Structure

  • (dict) --
    • TrialArn (string) --

      The Amazon Resource Name (ARN) of the trial that is being deleted.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
delete_trial_component(**kwargs)

Deletes the specified trial component. A trial component must be disassociated from all trials before the trial component can be deleted. To disassociate a trial component from a trial, call the DisassociateTrialComponent API.

See also: AWS API Documentation

Request Syntax

response = client.delete_trial_component(
    TrialComponentName='string'
)
Parameters
TrialComponentName (string) --

[REQUIRED]

The name of the component to delete.

Return type
dict
Returns
Response Syntax
{
    'TrialComponentArn': 'string'
}

Response Structure

  • (dict) --
    • TrialComponentArn (string) --

      The Amazon Resource Name (ARN) of the component is being deleted.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
delete_user_profile(**kwargs)

Deletes a user profile. When a user profile is deleted, the user loses access to their EFS volume, including data, notebooks, and other artifacts.

See also: AWS API Documentation

Request Syntax

response = client.delete_user_profile(
    DomainId='string',
    UserProfileName='string'
)
Parameters
  • DomainId (string) --

    [REQUIRED]

    The domain ID.

  • UserProfileName (string) --

    [REQUIRED]

    The user profile name.

Returns

None

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse
  • SageMaker.Client.exceptions.ResourceNotFound
delete_workforce(**kwargs)

Use this operation to delete a workforce.

If you want to create a new workforce in an AWS Region where a workforce already exists, use this operation to delete the existing workforce and then use to create a new workforce.

Warning

If a private workforce contains one or more work teams, you must use the operation to delete all work teams before you delete the workforce. If you try to delete a workforce that contains one or more work teams, you will recieve a ResourceInUse error.

See also: AWS API Documentation

Request Syntax

response = client.delete_workforce(
    WorkforceName='string'
)
Parameters
WorkforceName (string) --

[REQUIRED]

The name of the workforce.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --
delete_workteam(**kwargs)

Deletes an existing work team. This operation can't be undone.

See also: AWS API Documentation

Request Syntax

response = client.delete_workteam(
    WorkteamName='string'
)
Parameters
WorkteamName (string) --

[REQUIRED]

The name of the work team to delete.

Return type
dict
Returns
Response Syntax
{
    'Success': True|False
}

Response Structure

  • (dict) --
    • Success (boolean) --

      Returns true if the work team was successfully deleted; otherwise, returns false .

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded
describe_action(**kwargs)

Describes an action.

See also: AWS API Documentation

Request Syntax

response = client.describe_action(
    ActionName='string'
)
Parameters
ActionName (string) --

[REQUIRED]

The name of the action to describe.

Return type
dict
Returns
Response Syntax
{
    'ActionName': 'string',
    'ActionArn': 'string',
    'Source': {
        'SourceUri': 'string',
        'SourceType': 'string',
        'SourceId': 'string'
    },
    'ActionType': 'string',
    'Description': 'string',
    'Status': 'Unknown'|'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped',
    'Properties': {
        'string': 'string'
    },
    'CreationTime': datetime(2015, 1, 1),
    'CreatedBy': {
        'UserProfileArn': 'string',
        'UserProfileName': 'string',
        'DomainId': 'string'
    },
    'LastModifiedTime': datetime(2015, 1, 1),
    'LastModifiedBy': {
        'UserProfileArn': 'string',
        'UserProfileName': 'string',
        'DomainId': 'string'
    },
    'MetadataProperties': {
        'CommitId': 'string',
        'Repository': 'string',
        'GeneratedBy': 'string',
        'ProjectId': 'string'
    }
}

Response Structure

  • (dict) --
    • ActionName (string) --

      The name of the action.

    • ActionArn (string) --

      The Amazon Resource Name (ARN) of the action.

    • Source (dict) --

      The source of the action.

      • SourceUri (string) --

        The URI of the source.

      • SourceType (string) --

        The type of the source.

      • SourceId (string) --

        The ID of the source.

    • ActionType (string) --

      The type of the action.

    • Description (string) --

      The description of the action.

    • Status (string) --

      The status of the action.

    • Properties (dict) --

      A list of the action's properties.

      • (string) --
        • (string) --
    • CreationTime (datetime) --

      When the action was created.

    • CreatedBy (dict) --

      Information about the user who created or modified an experiment, trial, or trial component.

      • UserProfileArn (string) --

        The Amazon Resource Name (ARN) of the user's profile.

      • UserProfileName (string) --

        The name of the user's profile.

      • DomainId (string) --

        The domain associated with the user.

    • LastModifiedTime (datetime) --

      When the action was last modified.

    • LastModifiedBy (dict) --

      Information about the user who created or modified an experiment, trial, or trial component.

      • UserProfileArn (string) --

        The Amazon Resource Name (ARN) of the user's profile.

      • UserProfileName (string) --

        The name of the user's profile.

      • DomainId (string) --

        The domain associated with the user.

    • MetadataProperties (dict) --

      Metadata properties of the tracking entity, trial, or trial component.

      • CommitId (string) --

        The commit ID.

      • Repository (string) --

        The repository.

      • GeneratedBy (string) --

        The entity this entity was generated by.

      • ProjectId (string) --

        The project ID.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound
describe_algorithm(**kwargs)

Returns a description of the specified algorithm that is in your account.

See also: AWS API Documentation

Request Syntax

response = client.describe_algorithm(
    AlgorithmName='string'
)
Parameters
AlgorithmName (string) --

[REQUIRED]

The name of the algorithm to describe.

Return type
dict
Returns
Response Syntax
{
    'AlgorithmName': 'string',
    'AlgorithmArn': 'string',
    'AlgorithmDescription': 'string',
    'CreationTime': datetime(2015, 1, 1),
    'TrainingSpecification': {
        'TrainingImage': 'string',
        'TrainingImageDigest': 'string',
        'SupportedHyperParameters': [
            {
                'Name': 'string',
                'Description': 'string',
                'Type': 'Integer'|'Continuous'|'Categorical'|'FreeText',
                'Range': {
                    'IntegerParameterRangeSpecification': {
                        'MinValue': 'string',
                        'MaxValue': 'string'
                    },
                    'ContinuousParameterRangeSpecification': {
                        'MinValue': 'string',
                        'MaxValue': 'string'
                    },
                    'CategoricalParameterRangeSpecification': {
                        'Values': [
                            'string',
                        ]
                    }
                },
                'IsTunable': True|False,
                'IsRequired': True|False,
                'DefaultValue': 'string'
            },
        ],
        'SupportedTrainingInstanceTypes': [
            'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.p4d.24xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5n.xlarge'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge',
        ],
        'SupportsDistributedTraining': True|False,
        'MetricDefinitions': [
            {
                'Name': 'string',
                'Regex': 'string'
            },
        ],
        'TrainingChannels': [
            {
                'Name': 'string',
                'Description': 'string',
                'IsRequired': True|False,
                'SupportedContentTypes': [
                    'string',
                ],
                'SupportedCompressionTypes': [
                    'None'|'Gzip',
                ],
                'SupportedInputModes': [
                    'Pipe'|'File',
                ]
            },
        ],
        'SupportedTuningJobObjectiveMetrics': [
            {
                'Type': 'Maximize'|'Minimize',
                'MetricName': 'string'
            },
        ]
    },
    'InferenceSpecification': {
        'Containers': [
            {
                'ContainerHostname': 'string',
                'Image': 'string',
                'ImageDigest': 'string',
                'ModelDataUrl': 'string',
                'ProductId': 'string'
            },
        ],
        'SupportedTransformInstanceTypes': [
            'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge',
        ],
        'SupportedRealtimeInferenceInstanceTypes': [
            'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.12xlarge'|'ml.m5d.24xlarge'|'ml.c4.large'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.large'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.12xlarge'|'ml.r5.24xlarge'|'ml.r5d.large'|'ml.r5d.xlarge'|'ml.r5d.2xlarge'|'ml.r5d.4xlarge'|'ml.r5d.12xlarge'|'ml.r5d.24xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge',
        ],
        'SupportedContentTypes': [
            'string',
        ],
        'SupportedResponseMIMETypes': [
            'string',
        ]
    },
    'ValidationSpecification': {
        'ValidationRole': 'string',
        'ValidationProfiles': [
            {
                'ProfileName': 'string',
                'TrainingJobDefinition': {
                    'TrainingInputMode': 'Pipe'|'File',
                    'HyperParameters': {
                        'string': 'string'
                    },
                    'InputDataConfig': [
                        {
                            'ChannelName': 'string',
                            'DataSource': {
                                'S3DataSource': {
                                    'S3DataType': 'ManifestFile'|'S3Prefix'|'AugmentedManifestFile',
                                    'S3Uri': 'string',
                                    'S3DataDistributionType': 'FullyReplicated'|'ShardedByS3Key',
                                    'AttributeNames': [
                                        'string',
                                    ]
                                },
                                'FileSystemDataSource': {
                                    'FileSystemId': 'string',
                                    'FileSystemAccessMode': 'rw'|'ro',
                                    'FileSystemType': 'EFS'|'FSxLustre',
                                    'DirectoryPath': 'string'
                                }
                            },
                            'ContentType': 'string',
                            'CompressionType': 'None'|'Gzip',
                            'RecordWrapperType': 'None'|'RecordIO',
                            'InputMode': 'Pipe'|'File',
                            'ShuffleConfig': {
                                'Seed': 123
                            }
                        },
                    ],
                    'OutputDataConfig': {
                        'KmsKeyId': 'string',
                        'S3OutputPath': 'string'
                    },
                    'ResourceConfig': {
                        'InstanceType': 'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.p4d.24xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5n.xlarge'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge',
                        'InstanceCount': 123,
                        'VolumeSizeInGB': 123,
                        'VolumeKmsKeyId': 'string'
                    },
                    'StoppingCondition': {
                        'MaxRuntimeInSeconds': 123,
                        'MaxWaitTimeInSeconds': 123
                    }
                },
                'TransformJobDefinition': {
                    'MaxConcurrentTransforms': 123,
                    'MaxPayloadInMB': 123,
                    'BatchStrategy': 'MultiRecord'|'SingleRecord',
                    'Environment': {
                        'string': 'string'
                    },
                    'TransformInput': {
                        'DataSource': {
                            'S3DataSource': {
                                'S3DataType': 'ManifestFile'|'S3Prefix'|'AugmentedManifestFile',
                                'S3Uri': 'string'
                            }
                        },
                        'ContentType': 'string',
                        'CompressionType': 'None'|'Gzip',
                        'SplitType': 'None'|'Line'|'RecordIO'|'TFRecord'
                    },
                    'TransformOutput': {
                        'S3OutputPath': 'string',
                        'Accept': 'string',
                        'AssembleWith': 'None'|'Line',
                        'KmsKeyId': 'string'
                    },
                    'TransformResources': {
                        'InstanceType': 'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.c4.xlarge'|