ProductionVariant
- class aws_cdk.aws_stepfunctions_tasks.ProductionVariant(*, instance_type, model_name, variant_name, accelerator_type=None, initial_instance_count=None, initial_variant_weight=None)
Bases:
object
Identifies a model that you want to host and the resources to deploy for hosting it.
- Parameters:
instance_type (
InstanceType
) – The ML compute instance type.model_name (
str
) – The name of the model that you want to host. This is the name that you specified when creating the model.variant_name (
str
) – The name of the production variant.accelerator_type (
Optional
[AcceleratorType
]) – The size of the Elastic Inference (EI) instance to use for the production variant. Default: - Noneinitial_instance_count (
Union
[int
,float
,None
]) – Number of instances to launch initially. Default: - 1initial_variant_weight (
Union
[int
,float
,None
]) – Determines initial traffic distribution among all of the models that you specify in the endpoint configuration. Default: - 1.0
- See:
https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ProductionVariant.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_ec2 as ec2 from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks # accelerator_type: stepfunctions_tasks.AcceleratorType # instance_type: ec2.InstanceType production_variant = stepfunctions_tasks.ProductionVariant( instance_type=instance_type, model_name="modelName", variant_name="variantName", # the properties below are optional accelerator_type=accelerator_type, initial_instance_count=123, initial_variant_weight=123 )
Attributes
- accelerator_type
The size of the Elastic Inference (EI) instance to use for the production variant.
- Default:
None
- initial_instance_count
Number of instances to launch initially.
- Default:
1
- initial_variant_weight
Determines initial traffic distribution among all of the models that you specify in the endpoint configuration.
- Default:
1.0
- instance_type
The ML compute instance type.
- model_name
The name of the model that you want to host.
This is the name that you specified when creating the model.
- variant_name
The name of the production variant.