Amazon SageMaker Service

2020/05/08 - Amazon SageMaker Service - 6 updated api methods

Changes  Update sagemaker client to latest version

CreateMonitoringSchedule (updated) Link ¶
Changes (request)
{'MonitoringScheduleConfig': {'MonitoringJobDefinition': {'NetworkConfig': {'EnableInterContainerTrafficEncryption': 'boolean'}}}}

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

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'
        },
    ]
)
type MonitoringScheduleName

string

param MonitoringScheduleName

[REQUIRED]

The name of the monitoring schedule. The name must be unique within an AWS Region within an AWS account.

type MonitoringScheduleConfig

dict

param MonitoringScheduleConfig

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

    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.

type Tags

list

param Tags

(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.

rtype

dict

returns

Response Syntax

{
    'MonitoringScheduleArn': 'string'
}

Response Structure

  • (dict) --

    • MonitoringScheduleArn (string) --

      The Amazon Resource Name (ARN) of the monitoring schedule.

CreateProcessingJob (updated) Link ¶
Changes (request)
{'NetworkConfig': {'EnableInterContainerTrafficEncryption': 'boolean'}}

Creates a processing job.

See also: AWS API Documentation

Request Syntax

client.create_processing_job(
    ProcessingInputs=[
        {
            'InputName': 'string',
            'S3Input': {
                'S3Uri': 'string',
                'LocalPath': 'string',
                'S3DataType': 'ManifestFile'|'S3Prefix',
                'S3InputMode': 'Pipe'|'File',
                'S3DataDistributionType': 'FullyReplicated'|'ShardedByS3Key',
                'S3CompressionType': 'None'|'Gzip'
            }
        },
    ],
    ProcessingOutputConfig={
        'Outputs': [
            {
                'OutputName': 'string',
                'S3Output': {
                    'S3Uri': 'string',
                    'LocalPath': 'string',
                    'S3UploadMode': 'Continuous'|'EndOfJob'
                }
            },
        ],
        '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'
    }
)
type ProcessingInputs

list

param ProcessingInputs

For each input, data is downloaded from S3 into the processing container before the processing job begins running if "S3InputMode" is set to File .

  • (dict) --

    The inputs for a processing job.

    • InputName (string) -- [REQUIRED]

      The name of the inputs for the processing job.

    • S3Input (dict) -- [REQUIRED]

      The S3 inputs for the processing job.

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

        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.

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

        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.

      • S3DataDistributionType (string) --

        Whether the data stored in Amazon S3 is FullyReplicated or ShardedByS3Key .

      • S3CompressionType (string) --

        Whether to use Gzip compression for Amazon S3 storage.

type ProcessingOutputConfig

dict

param ProcessingOutputConfig

Output configuration for the processing job.

  • Outputs (list) -- [REQUIRED]

    Output configuration information for a processing job.

    • (dict) --

      Describes the results of a processing job.

      • OutputName (string) -- [REQUIRED]

        The name for the processing job output.

      • S3Output (dict) -- [REQUIRED]

        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.

  • 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.

type ProcessingJobName

string

param ProcessingJobName

[REQUIRED]

The name of the processing job. The name must be unique within an AWS Region in the AWS account.

type ProcessingResources

dict

param ProcessingResources

[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.

type StoppingCondition

dict

param StoppingCondition

The time limit for how long the processing job is allowed to run.

  • MaxRuntimeInSeconds (integer) -- [REQUIRED]

    Specifies the maximum runtime in seconds.

type AppSpecification

dict

param AppSpecification

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

type Environment

dict

param Environment

Sets the environment variables in the Docker container.

  • (string) --

    • (string) --

type NetworkConfig

dict

param NetworkConfig

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

type RoleArn

string

param RoleArn

[REQUIRED]

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

type Tags

list

param Tags

(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.

type ExperimentConfig

dict

param ExperimentConfig

Configuration for the experiment.

  • ExperimentName (string) --

    The name of the experiment.

  • TrialName (string) --

    The name of the trial.

  • TrialComponentDisplayName (string) --

    Display name for the trial component.

rtype

dict

returns

Response Syntax

{
    'ProcessingJobArn': 'string'
}

Response Structure

  • (dict) --

    • ProcessingJobArn (string) --

      The Amazon Resource Name (ARN) of the processing job.

DescribeMonitoringSchedule (updated) Link ¶
Changes (response)
{'MonitoringScheduleConfig': {'MonitoringJobDefinition': {'NetworkConfig': {'EnableInterContainerTrafficEncryption': 'boolean'}}}}

Describes the schedule for a monitoring job.

See also: AWS API Documentation

Request Syntax

client.describe_monitoring_schedule(
    MonitoringScheduleName='string'
)
type MonitoringScheduleName

string

param MonitoringScheduleName

[REQUIRED]

Name of a previously created monitoring schedule.

rtype

dict

returns

Response Syntax

{
    'MonitoringScheduleArn': 'string',
    'MonitoringScheduleName': 'string',
    'MonitoringScheduleStatus': 'Pending'|'Failed'|'Scheduled'|'Stopped',
    'FailureReason': 'string',
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1),
    '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'
        }
    },
    'EndpointName': 'string',
    'LastMonitoringExecutionSummary': {
        'MonitoringScheduleName': 'string',
        'ScheduledTime': datetime(2015, 1, 1),
        'CreationTime': datetime(2015, 1, 1),
        'LastModifiedTime': datetime(2015, 1, 1),
        'MonitoringExecutionStatus': 'Pending'|'Completed'|'CompletedWithViolations'|'InProgress'|'Failed'|'Stopping'|'Stopped',
        'ProcessingJobArn': 'string',
        'EndpointName': 'string',
        'FailureReason': 'string'
    }
}

Response Structure

  • (dict) --

    • MonitoringScheduleArn (string) --

      The Amazon Resource Name (ARN) of the monitoring schedule.

    • MonitoringScheduleName (string) --

      Name of the monitoring schedule.

    • MonitoringScheduleStatus (string) --

      The status of an monitoring job.

    • FailureReason (string) --

      A string, up to one KB in size, that contains the reason a monitoring job failed, if it failed.

    • CreationTime (datetime) --

      The time at which the monitoring job was created.

    • LastModifiedTime (datetime) --

      The time at which the monitoring job was last modified.

    • MonitoringScheduleConfig (dict) --

      The configuration object that specifies the monitoring schedule and defines the monitoring job.

      • ScheduleConfig (dict) --

        Configures the monitoring schedule.

        • ScheduleExpression (string) --

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

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

              The endpoint for a monitoring job.

              • EndpointName (string) --

                An endpoint in customer's account which has enabled DataCaptureConfig enabled.

              • LocalPath (string) --

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

          The array of outputs from the monitoring job to be uploaded to Amazon Simple Storage Service (Amazon S3).

          • MonitoringOutputs (list) --

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

                The Amazon S3 storage location where the results of a monitoring job are saved.

                • S3Uri (string) --

                  A URI that identifies the Amazon S3 storage location where Amazon SageMaker saves the results of a monitoring job.

                • LocalPath (string) --

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

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

            The configuration for the cluster resources used to run the processing job.

            • InstanceCount (integer) --

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

              The ML compute instance type for the processing job.

            • VolumeSizeInGB (integer) --

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

          Configures the monitoring job to run a specified Docker container image.

          • ImageUri (string) --

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

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

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

              • (string) --

            • Subnets (list) --

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

              • (string) --

        • RoleArn (string) --

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

    • EndpointName (string) --

      The name of the endpoint for the monitoring job.

    • LastMonitoringExecutionSummary (dict) --

      Describes metadata on the last execution to run, if there was one.

      • MonitoringScheduleName (string) --

        The name of the monitoring schedule.

      • ScheduledTime (datetime) --

        The time the monitoring job was scheduled.

      • CreationTime (datetime) --

        The time at which the monitoring job was created.

      • LastModifiedTime (datetime) --

        A timestamp that indicates the last time the monitoring job was modified.

      • MonitoringExecutionStatus (string) --

        The status of the monitoring job.

      • ProcessingJobArn (string) --

        The Amazon Resource Name (ARN) of the monitoring job.

      • EndpointName (string) --

        The name of teh endpoint used to run the monitoring job.

      • FailureReason (string) --

        Contains the reason a monitoring job failed, if it failed.

DescribeProcessingJob (updated) Link ¶
Changes (response)
{'NetworkConfig': {'EnableInterContainerTrafficEncryption': 'boolean'}}

Returns a description of a processing job.

See also: AWS API Documentation

Request Syntax

client.describe_processing_job(
    ProcessingJobName='string'
)
type ProcessingJobName

string

param ProcessingJobName

[REQUIRED]

The name of the processing job. The name must be unique within an AWS Region in the AWS account.

rtype

dict

returns

Response Syntax

{
    'ProcessingInputs': [
        {
            'InputName': 'string',
            'S3Input': {
                'S3Uri': 'string',
                'LocalPath': 'string',
                'S3DataType': 'ManifestFile'|'S3Prefix',
                'S3InputMode': 'Pipe'|'File',
                'S3DataDistributionType': 'FullyReplicated'|'ShardedByS3Key',
                'S3CompressionType': 'None'|'Gzip'
            }
        },
    ],
    'ProcessingOutputConfig': {
        'Outputs': [
            {
                'OutputName': 'string',
                'S3Output': {
                    'S3Uri': 'string',
                    'LocalPath': 'string',
                    'S3UploadMode': 'Continuous'|'EndOfJob'
                }
            },
        ],
        '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',
    'ExperimentConfig': {
        'ExperimentName': 'string',
        'TrialName': 'string',
        'TrialComponentDisplayName': 'string'
    },
    'ProcessingJobArn': 'string',
    'ProcessingJobStatus': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped',
    'ExitMessage': 'string',
    'FailureReason': 'string',
    'ProcessingEndTime': datetime(2015, 1, 1),
    'ProcessingStartTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1),
    'CreationTime': datetime(2015, 1, 1),
    'MonitoringScheduleArn': 'string',
    'AutoMLJobArn': 'string',
    'TrainingJobArn': 'string'
}

Response Structure

  • (dict) --

    • ProcessingInputs (list) --

      The inputs for a processing job.

      • (dict) --

        The inputs for a processing job.

        • InputName (string) --

          The name of the inputs for the processing job.

        • S3Input (dict) --

          The S3 inputs for the processing job.

          • S3Uri (string) --

            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.

          • S3DataType (string) --

            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.

          • S3DataDistributionType (string) --

            Whether the data stored in Amazon S3 is FullyReplicated or ShardedByS3Key .

          • S3CompressionType (string) --

            Whether to use Gzip compression for Amazon S3 storage.

    • ProcessingOutputConfig (dict) --

      Output configuration for the processing job.

      • Outputs (list) --

        Output configuration information for a processing job.

        • (dict) --

          Describes the results of a processing job.

          • OutputName (string) --

            The name for the processing job output.

          • S3Output (dict) --

            Configuration for processing job outputs in Amazon S3.

            • S3Uri (string) --

              A URI that identifies the Amazon S3 bucket where you want Amazon SageMaker to save the results of a processing job.

            • LocalPath (string) --

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

              Whether to upload the results of the processing job continuously or after the job completes.

      • 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) --

      The name of the processing job. The name must be unique within an AWS Region in the AWS account.

    • ProcessingResources (dict) --

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

        The configuration for the resources in a cluster used to run the processing job.

        • InstanceCount (integer) --

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

          The ML compute instance type for the processing job.

        • VolumeSizeInGB (integer) --

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

        Specifies the maximum runtime in seconds.

    • AppSpecification (dict) --

      Configures the processing job to run a specified container image.

      • ImageUri (string) --

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

      The environment variables set 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) --

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

          • (string) --

        • Subnets (list) --

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

          • (string) --

    • RoleArn (string) --

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

    • ExperimentConfig (dict) --

      The configuration information used to create an experiment.

      • ExperimentName (string) --

        The name of the experiment.

      • TrialName (string) --

        The name of the trial.

      • TrialComponentDisplayName (string) --

        Display name for the trial component.

    • ProcessingJobArn (string) --

      The Amazon Resource Name (ARN) of the processing job.

    • ProcessingJobStatus (string) --

      Provides the status of a processing job.

    • ExitMessage (string) --

      An optional string, up to one KB in size, that contains metadata from the processing container when the processing job exits.

    • FailureReason (string) --

      A string, up to one KB in size, that contains the reason a processing job failed, if it failed.

    • ProcessingEndTime (datetime) --

      The time at which the processing job completed.

    • ProcessingStartTime (datetime) --

      The time at which the processing job started.

    • LastModifiedTime (datetime) --

      The time at which the processing job was last modified.

    • CreationTime (datetime) --

      The time at which the processing job was created.

    • MonitoringScheduleArn (string) --

      The ARN of a monitoring schedule for an endpoint associated with this processing job.

    • AutoMLJobArn (string) --

      The ARN of an AutoML job associated with this processing job.

    • TrainingJobArn (string) --

      The ARN of a training job associated with this processing job.

UpdateMonitoringSchedule (updated) Link ¶
Changes (request)
{'MonitoringScheduleConfig': {'MonitoringJobDefinition': {'NetworkConfig': {'EnableInterContainerTrafficEncryption': 'boolean'}}}}

Updates a previously created schedule.

See also: AWS API Documentation

Request Syntax

client.update_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'
        }
    }
)
type MonitoringScheduleName

string

param MonitoringScheduleName

[REQUIRED]

The name of the monitoring schedule. The name must be unique within an AWS Region within an AWS account.

type MonitoringScheduleConfig

dict

param MonitoringScheduleConfig

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

    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.

rtype

dict

returns

Response Syntax

{
    'MonitoringScheduleArn': 'string'
}

Response Structure

  • (dict) --

    • MonitoringScheduleArn (string) --

      The Amazon Resource Name (ARN) of the monitoring schedule.