ProductionVariant

class aws_cdk.aws_stepfunctions_tasks.ProductionVariant(*, accelerator_type=None, initial_instance_count=None, initial_variant_weight=None, instance_type, model_name, variant_name)

Bases: object

Identifies a model that you want to host and the resources to deploy for hosting it.

Parameters
  • accelerator_type (Optional[AcceleratorType]) – The size of the Elastic Inference (EI) instance to use for the production variant. Default: - None

  • initial_instance_count (Union[int, float, None]) – Number of instances to launch initially. Default: - 1

  • initial_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

  • 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.

See

https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ProductionVariant.html

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ec2 as ec2
import aws_cdk.aws_stepfunctions_tasks as stepfunctions_tasks

# accelerator_type is of type AcceleratorType
# instance_type is of type 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

Return type

Optional[AcceleratorType]

initial_instance_count

Number of instances to launch initially.

Default
  • 1

Return type

Union[int, float, None]

initial_variant_weight

Determines initial traffic distribution among all of the models that you specify in the endpoint configuration.

Default
  • 1.0

Return type

Union[int, float, None]

instance_type

The ML compute instance type.

Return type

InstanceType

model_name

The name of the model that you want to host.

This is the name that you specified when creating the model.

Return type

str

variant_name

The name of the production variant.

Return type

str