ProductionVariant
¶
Source code in docs_src/capo_sagemaker/types/production_variant.py
accelerator_type
instance-attribute
¶
accelerator_type: NotRequired[ProductionVariantAcceleratorType]
This parameter is no longer supported. Elastic Inference (EI) is no longer available.
This parameter was used to specify the size of the EI instance to use for the production variant.
capacity_reservation_config
instance-attribute
¶
capacity_reservation_config: NotRequired[ProductionVariantCapacityReservationConfig]
Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint.
container_startup_health_check_timeout_in_seconds
instance-attribute
¶
container_startup_health_check_timeout_in_seconds: NotRequired[
ProductionVariantContainerStartupHealthCheckTimeoutInSeconds
]
The timeout value, in seconds, for your inference container to pass health check by SageMaker Hosting. For more information about health check, see How Your Container Should Respond to Health Check (Ping) Requests.
core_dump_config
instance-attribute
¶
core_dump_config: NotRequired[ProductionVariantCoreDumpConfig]
Specifies configuration for a core dump from the model container when the process crashes.
enable_ssm_access
instance-attribute
¶
enable_ssm_access: NotRequired[ProductionVariantSSMAccess]
You can use this parameter to turn on native Amazon Web Services Systems Manager (SSM) access for a production variant behind an endpoint. By default, SSM access is disabled for all production variants behind an endpoint. You can turn on or turn off SSM access for a production variant behind an existing endpoint by creating a new endpoint configuration and calling UpdateEndpoint.
inference_ami_version
instance-attribute
¶
inference_ami_version: NotRequired[ProductionVariantInferenceAmiVersion]
Specifies an option from a collection of preconfigured Amazon Machine Image (AMI) images. Each image is configured by Amazon Web Services with a set of software and driver versions. Amazon Web Services optimizes these configurations for different machine learning workloads.
By selecting an AMI version, you can ensure that your inference environment is compatible with specific software requirements, such as CUDA driver versions, Linux kernel versions, or Amazon Web Services Neuron driver versions.
The AMI version names, and their configurations, are the following:
- al2-ami-sagemaker-inference-gpu-2
-
-
Accelerator: GPU
-
NVIDIA driver version: 535
-
CUDA version: 12.2
-
- al2-ami-sagemaker-inference-gpu-2-1
-
-
Accelerator: GPU
-
NVIDIA driver version: 535
-
CUDA version: 12.2
-
NVIDIA Container Toolkit with disabled CUDA-compat mounting
-
- al2-ami-sagemaker-inference-gpu-3-1
-
-
Accelerator: GPU
-
NVIDIA driver version: 550
-
CUDA version: 12.4
-
NVIDIA Container Toolkit with disabled CUDA-compat mounting
-
- al2023-ami-sagemaker-inference-gpu-4-1
-
-
Accelerator: GPU
-
NVIDIA driver version: 580
-
CUDA version: 13.0
-
NVIDIA Container Toolkit with disabled CUDA-compat mounting
-
- al2-ami-sagemaker-inference-neuron-2
-
-
Accelerator: Inferentia2 and Trainium
-
Neuron driver version: 2.19
-
initial_instance_count
instance-attribute
¶
initial_instance_count: NotRequired[InitialTaskCount]
Number of instances to launch initially.
initial_variant_weight
instance-attribute
¶
initial_variant_weight: NotRequired[VariantWeight]
Determines initial traffic distribution among all of the models that you specify in the endpoint configuration. The traffic to a production variant is determined by the ratio of the VariantWeight to the sum of all VariantWeight values across all ProductionVariants. If unspecified, it defaults to 1.0.
instance_pools
instance-attribute
¶
instance_pools: NotRequired[InstancePoolList]
A list of instance pools for the production variant. Each instance pool specifies an instance type and its priority for provisioning. Use instance pools to configure heterogeneous endpoints that deploy models across multiple instance types.
instance_type
instance-attribute
¶
instance_type: NotRequired[ProductionVariantInstanceType]
The ML compute instance type.
managed_instance_scaling
instance-attribute
¶
managed_instance_scaling: NotRequired[ProductionVariantManagedInstanceScaling]
Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic.
model_data_download_timeout_in_seconds
instance-attribute
¶
model_data_download_timeout_in_seconds: NotRequired[
ProductionVariantModelDataDownloadTimeoutInSeconds
]
The timeout value, in seconds, to download and extract the model that you want to host from Amazon S3 to the individual inference instance associated with this production variant.
model_name
instance-attribute
¶
model_name: NotRequired[ModelName]
The name of the model that you want to host. This is the name that you specified when creating the model.
routing_config
instance-attribute
¶
routing_config: NotRequired[ProductionVariantRoutingConfig]
Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts.
serverless_config
instance-attribute
¶
serverless_config: NotRequired[ProductionVariantServerlessConfig]
The serverless configuration for an endpoint. Specifies a serverless endpoint configuration instead of an instance-based endpoint configuration.
variant_instance_provision_timeout_in_seconds
instance-attribute
¶
variant_instance_provision_timeout_in_seconds: NotRequired[
VariantInstanceProvisionTimeoutInSeconds
]
The timeout value, in seconds, for provisioning instances for the production variant. When SageMaker encounters an insufficient capacity error while provisioning instances, it retries with the next instance pool (if configured) or waits until the timeout expires. This timeout applies only to capacity provisioning and does not include the time for model download or container startup.
Valid values: 300 to 3600.
variant_name
instance-attribute
¶
variant_name: NotRequired[VariantName]
The name of the production variant.
volume_size_in_gb
instance-attribute
¶
volume_size_in_gb: NotRequired[ProductionVariantVolumeSizeInGB]
The size, in GB, of the ML storage volume attached to individual inference instance associated with the production variant. Currently only Amazon EBS gp2 storage volumes are supported.