update_inference_experiment
(**kwargs)¶Updates an inference experiment that you created. The status of the inference experiment has to be either Created
, Running
. For more information on the status of an inference experiment, see DescribeInferenceExperimentResponse$Status.
See also: AWS API Documentation
Request Syntax
response = client.update_inference_experiment(
Name='string',
Schedule={
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1)
},
Description='string',
ModelVariants=[
{
'ModelName': 'string',
'VariantName': 'string',
'InfrastructureConfig': {
'InfrastructureType': 'RealTimeInference',
'RealTimeInferenceConfig': {
'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.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.8xlarge'|'ml.m5d.12xlarge'|'ml.m5d.16xlarge'|'ml.m5d.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'|'ml.p3dn.24xlarge'|'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.8xlarge'|'ml.r5.12xlarge'|'ml.r5.16xlarge'|'ml.r5.24xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.16xlarge'|'ml.g5.12xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge',
'InstanceCount': 123
}
}
},
],
DataStorageConfig={
'Destination': 'string',
'KmsKey': 'string',
'ContentType': {
'CsvContentTypes': [
'string',
],
'JsonContentTypes': [
'string',
]
}
},
ShadowModeConfig={
'SourceModelVariantName': 'string',
'ShadowModelVariants': [
{
'ShadowModelVariantName': 'string',
'SamplingPercentage': 123
},
]
}
)
[REQUIRED]
The name of the inference experiment to be updated.
The duration for which the inference experiment will run. If the status of the inference experiment is Created
, then you can update both the start and end dates. If the status of the inference experiment is Running
, then you can update only the end date.
The timestamp at which the inference experiment started or will start.
The timestamp at which the inference experiment ended or will end.
An array of ModelVariantConfig
objects. There is one for each variant, whose infrastructure configuration you want to update.
Contains information about the deployment options of a model.
The name of the Amazon SageMaker Model entity.
The name of the variant.
The configuration for the infrastructure that the model will be deployed to.
The inference option to which to deploy your model. Possible values are the following:
RealTime
: Deploy to real-time inference.The infrastructure configuration for deploying the model to real-time inference.
The instance type the model is deployed to.
The number of instances of the type specified by InstanceType
.
The Amazon S3 location and configuration for storing inference request and response data.
The Amazon S3 bucket where the inference request and response data is stored.
The Amazon Web Services Key Management Service key that Amazon SageMaker uses to encrypt captured data at rest using Amazon S3 server-side encryption.
Configuration specifying how to treat different headers. If no headers are specified SageMaker will by default base64 encode when capturing the data.
The list of all content type headers that SageMaker will treat as CSV and capture accordingly.
The list of all content type headers that SageMaker will treat as JSON and capture accordingly.
The configuration of ShadowMode
inference experiment type. Use this field to specify a production variant which takes all the inference requests, and a shadow variant to which Amazon SageMaker replicates a percentage of the inference requests. For the shadow variant also specify the percentage of requests that Amazon SageMaker replicates.
The name of the production variant, which takes all the inference requests.
List of shadow variant configurations.
The name and sampling percentage of a shadow variant.
The name of the shadow variant.
The percentage of inference requests that Amazon SageMaker replicates from the production variant to the shadow variant.
dict
Response Syntax
{
'InferenceExperimentArn': 'string'
}
Response Structure
(dict) --
InferenceExperimentArn (string) --
The ARN of the updated inference experiment.
Exceptions
SageMaker.Client.exceptions.ConflictException
SageMaker.Client.exceptions.ResourceNotFound