CreateInferenceRecommendationsJob
Starts a recommendation job. You can create either an instance recommendation or load test job.
Request Syntax
{
"InputConfig": {
"EndpointConfigurations": [
{
"EnvironmentParameterRanges": {
"CategoricalParameterRanges": [
{
"Name": "string
",
"Value": [ "string
" ]
}
]
},
"InferenceSpecificationName": "string
",
"InstanceType": "string
"
}
],
"JobDurationInSeconds": number
,
"ModelPackageVersionArn": "string
",
"ResourceLimit": {
"MaxNumberOfTests": number
,
"MaxParallelOfTests": number
},
"TrafficPattern": {
"Phases": [
{
"DurationInSeconds": number
,
"InitialNumberOfUsers": number
,
"SpawnRate": number
}
],
"TrafficType": "string
"
},
"VolumeKmsKeyId": "string
"
},
"JobDescription": "string
",
"JobName": "string
",
"JobType": "string
",
"OutputConfig": {
"CompiledOutputConfig": {
"S3OutputUri": "string
"
},
"KmsKeyId": "string
"
},
"RoleArn": "string
",
"StoppingConditions": {
"MaxInvocations": number
,
"ModelLatencyThresholds": [
{
"Percentile": "string
",
"ValueInMilliseconds": number
}
]
},
"Tags": [
{
"Key": "string
",
"Value": "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.
- InputConfig
-
Provides information about the versioned model package Amazon Resource Name (ARN), the traffic pattern, and endpoint configurations.
Type: RecommendationJobInputConfig object
Required: Yes
- JobDescription
-
Description of the recommendation job.
Type: String
Length Constraints: Maximum length of 128.
Required: No
- JobName
-
A name for the recommendation job. The name must be unique within the AWS Region and within your AWS account.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,63}
Required: Yes
- JobType
-
Defines the type of recommendation job. Specify
Default
to initiate an instance recommendation andAdvanced
to initiate a load test. If left unspecified, Amazon SageMaker Inference Recommender will run an instance recommendation (DEFAULT
) job.Type: String
Valid Values:
Default | Advanced
Required: Yes
- OutputConfig
-
Provides information about the output artifacts and the KMS key to use for Amazon S3 server-side encryption.
Type: RecommendationJobOutputConfig object
Required: No
- RoleArn
-
The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.
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+=,.@\-_/]+$
Required: Yes
- StoppingConditions
-
A set of conditions for stopping a recommendation job. If any of the conditions are met, the job is automatically stopped.
Type: RecommendationJobStoppingConditions object
Required: No
- Tags
-
The metadata that you apply to AWS resources to help you categorize and organize them. Each tag consists of a key and a value, both of which you define. For more information, see Tagging AWS Resources in the AWS General Reference.
Type: Array of Tag objects
Array Members: Minimum number of 0 items. Maximum number of 50 items.
Required: No
Response Syntax
{
"JobArn": "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.
- JobArn
-
The Amazon Resource Name (ARN) of the recommendation job.
Type: String
Length Constraints: Maximum length of 256.
Pattern:
arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]*:[0-9]{12}:inference-recommendations-job/.*
Errors
For information about the errors that are common to all actions, see Common Errors.
- ResourceInUse
-
Resource being accessed is in use.
HTTP Status Code: 400
- ResourceLimitExceeded
-
You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: