DescribeOptimizationJob - Amazon SageMaker

DescribeOptimizationJob

Provides the properties of the specified optimization job.

Request Syntax

{ "OptimizationJobName": "string" }

Request Parameters

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

The request accepts the following data in JSON format.

OptimizationJobName

The name that you assigned to the optimization job.

Type: String

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

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

Required: Yes

Response Syntax

{ "CreationTime": number, "DeploymentInstanceType": "string", "FailureReason": "string", "LastModifiedTime": number, "ModelSource": { "S3": { "ModelAccessConfig": { "AcceptEula": boolean }, "S3Uri": "string" } }, "OptimizationConfigs": [ { ... } ], "OptimizationEndTime": number, "OptimizationEnvironment": { "string" : "string" }, "OptimizationJobArn": "string", "OptimizationJobName": "string", "OptimizationJobStatus": "string", "OptimizationOutput": { "RecommendedInferenceImage": "string" }, "OptimizationStartTime": number, "OutputConfig": { "KmsKeyId": "string", "S3OutputLocation": "string" }, "RoleArn": "string", "StoppingCondition": { "MaxPendingTimeInSeconds": number, "MaxRuntimeInSeconds": number, "MaxWaitTimeInSeconds": number }, "VpcConfig": { "SecurityGroupIds": [ "string" ], "Subnets": [ "string" ] } }

Response Elements

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

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

CreationTime

The time when you created the optimization job.

Type: Timestamp

DeploymentInstanceType

The type of instance that hosts the optimized model that you create with the optimization job.

Type: String

Valid Values: ml.p4d.24xlarge | ml.p4de.24xlarge | ml.p5.48xlarge | ml.g5.xlarge | ml.g5.2xlarge | ml.g5.4xlarge | ml.g5.8xlarge | ml.g5.12xlarge | ml.g5.16xlarge | ml.g5.24xlarge | ml.g5.48xlarge | ml.g6.xlarge | ml.g6.2xlarge | ml.g6.4xlarge | ml.g6.8xlarge | ml.g6.12xlarge | ml.g6.16xlarge | ml.g6.24xlarge | ml.g6.48xlarge | ml.inf2.xlarge | ml.inf2.8xlarge | ml.inf2.24xlarge | ml.inf2.48xlarge | ml.trn1.2xlarge | ml.trn1.32xlarge | ml.trn1n.32xlarge

FailureReason

If the optimization job status is FAILED, the reason for the failure.

Type: String

Length Constraints: Maximum length of 1024.

LastModifiedTime

The time when the optimization job was last updated.

Type: Timestamp

ModelSource

The location of the source model to optimize with an optimization job.

Type: OptimizationJobModelSource object

OptimizationConfigs

Settings for each of the optimization techniques that the job applies.

Type: Array of OptimizationConfig objects

Array Members: Maximum number of 10 items.

OptimizationEndTime

The time when the optimization job finished processing.

Type: Timestamp

OptimizationEnvironment

The environment variables to set in the model container.

Type: String to string map

Map Entries: Maximum number of 25 items.

Key Length Constraints: Maximum length of 256.

Key Pattern: ^(?!\s*$).+

Value Length Constraints: Maximum length of 256.

OptimizationJobArn

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

Type: String

Length Constraints: Maximum length of 256.

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

OptimizationJobName

The name that you assigned to the optimization job.

Type: String

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

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

OptimizationJobStatus

The current status of the optimization job.

Type: String

Valid Values: INPROGRESS | COMPLETED | FAILED | STARTING | STOPPING | STOPPED

OptimizationOutput

Output values produced by an optimization job.

Type: OptimizationOutput object

OptimizationStartTime

The time when the optimization job started.

Type: Timestamp

OutputConfig

Details for where to store the optimized model that you create with the optimization job.

Type: OptimizationJobOutputConfig object

RoleArn

The ARN of the IAM role that you assigned to the optimization job.

Type: String

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

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

StoppingCondition

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

To stop a training job, 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.

The training algorithms provided by SageMaker automatically save the intermediate results of a model training job when possible. This attempt to save artifacts is only a best effort case as model might not be in a state from which it can be saved. For example, if training has just started, the model might not be ready to save. When saved, this intermediate data is a valid model artifact. You can use it to create a model with CreateModel.

Note

The Neural Topic Model (NTM) currently does not support saving intermediate model artifacts. When training NTMs, make sure that the maximum runtime is sufficient for the training job to complete.

Type: StoppingCondition object

VpcConfig

A VPC in Amazon VPC that your optimized model has access to.

Type: OptimizationVpcConfig object

Errors

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

ResourceNotFound

Resource being access is not found.

HTTP Status Code: 400

See Also

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