StopInferenceExperiment
Stops an inference experiment.
Request Syntax
{
"DesiredModelVariants": [
{
"InfrastructureConfig": {
"InfrastructureType": "string
",
"RealTimeInferenceConfig": {
"InstanceCount": number
,
"InstanceType": "string
"
}
},
"ModelName": "string
",
"VariantName": "string
"
}
],
"DesiredState": "string
",
"ModelVariantActions": {
"string
" : "string
"
},
"Name": "string
",
"Reason": "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.
- DesiredModelVariants
-
An array of
ModelVariantConfig
objects. There is one for each variant that you want to deploy after the inference experiment stops. EachModelVariantConfig
describes the infrastructure configuration for deploying the corresponding variant.Type: Array of ModelVariantConfig objects
Array Members: Minimum number of 1 item. Maximum number of 2 items.
Required: No
- DesiredState
-
The desired state of the experiment after stopping. The possible states are the following:
-
Completed
: The experiment completed successfully -
Cancelled
: The experiment was canceled
Type: String
Valid Values:
Completed | Cancelled
Required: No
-
- ModelVariantActions
-
Array of key-value pairs, with names of variants mapped to actions. The possible actions are the following:
-
Promote
- Promote the shadow variant to a production variant -
Remove
- Delete the variant -
Retain
- Keep the variant as it is
Type: String to string map
Map Entries: Maximum number of 2 items.
Key Length Constraints: Maximum length of 63.
Key Pattern:
^[a-zA-Z0-9]([\-a-zA-Z0-9]*[a-zA-Z0-9])?
Valid Values:
Retain | Remove | Promote
Required: Yes
-
- Name
-
The name of the inference experiment to stop.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 120.
Pattern:
^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,119}
Required: Yes
- Reason
-
The reason for stopping the experiment.
Type: String
Length Constraints: Maximum length of 1024.
Pattern:
.*
Required: No
Response Syntax
{
"InferenceExperimentArn": "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.
- InferenceExperimentArn
-
The ARN of the stopped inference experiment.
Type: String
Length Constraints: Maximum length of 256.
Pattern:
arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]*:[0-9]{12}:inference-experiment/.*
Errors
For information about the errors that are common to all actions, see Common Errors.
- ConflictException
-
There was a conflict when you attempted to modify a SageMaker entity such as an
Experiment
orArtifact
.HTTP Status Code: 400
- 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: