Class CfnEndpointConfig.ProductionVariantProperty
Specifies a model that you want to host and the resources to deploy for hosting it.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Sagemaker
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ProductionVariantProperty : Object, CfnEndpointConfig.IProductionVariantProperty
Syntax (vb)
Public Class ProductionVariantProperty
Inherits Object
Implements CfnEndpointConfig.IProductionVariantProperty
Remarks
If you are deploying multiple models, tell Amazon SageMaker how to distribute traffic among the models by specifying the InitialVariantWeight
objects.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;
var productionVariantProperty = new ProductionVariantProperty {
VariantName = "variantName",
// the properties below are optional
AcceleratorType = "acceleratorType",
ContainerStartupHealthCheckTimeoutInSeconds = 123,
EnableSsmAccess = false,
InitialInstanceCount = 123,
InitialVariantWeight = 123,
InstanceType = "instanceType",
ManagedInstanceScaling = new ManagedInstanceScalingProperty {
MaxInstanceCount = 123,
MinInstanceCount = 123,
Status = "status"
},
ModelDataDownloadTimeoutInSeconds = 123,
ModelName = "modelName",
RoutingConfig = new RoutingConfigProperty {
RoutingStrategy = "routingStrategy"
},
ServerlessConfig = new ServerlessConfigProperty {
MaxConcurrency = 123,
MemorySizeInMb = 123,
// the properties below are optional
ProvisionedConcurrency = 123
},
VolumeSizeInGb = 123
};
Synopsis
Constructors
ProductionVariantProperty() |
Properties
AcceleratorType | The size of the Elastic Inference (EI) instance to use for the production variant. |
ContainerStartupHealthCheckTimeoutInSeconds | The timeout value, in seconds, for your inference container to pass health check by SageMaker Hosting. |
EnableSsmAccess | You can use this parameter to turn on native AWS Systems Manager (SSM) access for a production variant behind an endpoint. |
InitialInstanceCount | Number of instances to launch initially. |
InitialVariantWeight | Determines initial traffic distribution among all of the models that you specify in the endpoint configuration. |
InstanceType | The ML compute instance type. |
ManagedInstanceScaling | |
ModelDataDownloadTimeoutInSeconds | 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. |
ModelName | The name of the model that you want to host. |
RoutingConfig | |
ServerlessConfig | The serverless configuration for an endpoint. |
VariantName | The name of the production variant. |
VolumeSizeInGb | The size, in GB, of the ML storage volume attached to individual inference instance associated with the production variant. |
Constructors
ProductionVariantProperty()
public ProductionVariantProperty()
Properties
AcceleratorType
The size of the Elastic Inference (EI) instance to use for the production variant.
public string AcceleratorType { get; set; }
Property Value
System.String
Remarks
EI instances provide on-demand GPU computing for inference. For more information, see Using Elastic Inference in Amazon SageMaker . For more information, see Using Elastic Inference in Amazon SageMaker .
ContainerStartupHealthCheckTimeoutInSeconds
The timeout value, in seconds, for your inference container to pass health check by SageMaker Hosting.
public Nullable<double> ContainerStartupHealthCheckTimeoutInSeconds { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
For more information about health check, see How Your Container Should Respond to Health Check (Ping) Requests .
EnableSsmAccess
You can use this parameter to turn on native AWS Systems Manager (SSM) access for a production variant behind an endpoint.
public object EnableSsmAccess { get; set; }
Property Value
System.Object
Remarks
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
.
InitialInstanceCount
Number of instances to launch initially.
public Nullable<double> InitialInstanceCount { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
InitialVariantWeight
Determines initial traffic distribution among all of the models that you specify in the endpoint configuration.
public Nullable<double> InitialVariantWeight { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
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.
InstanceType
The ML compute instance type.
public string InstanceType { get; set; }
Property Value
System.String
Remarks
ManagedInstanceScaling
public object ManagedInstanceScaling { get; set; }
Property Value
System.Object
Remarks
ModelDataDownloadTimeoutInSeconds
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.
public Nullable<double> ModelDataDownloadTimeoutInSeconds { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
ModelName
The name of the model that you want to host.
public string ModelName { get; set; }
Property Value
System.String
Remarks
This is the name that you specified when creating the model.
RoutingConfig
public object RoutingConfig { get; set; }
Property Value
System.Object
Remarks
ServerlessConfig
The serverless configuration for an endpoint.
public object ServerlessConfig { get; set; }
Property Value
System.Object
Remarks
Specifies a serverless endpoint configuration instead of an instance-based endpoint configuration.
VariantName
The name of the production variant.
public string VariantName { get; set; }
Property Value
System.String
Remarks
VolumeSizeInGb
The size, in GB, of the ML storage volume attached to individual inference instance associated with the production variant.
public Nullable<double> VolumeSizeInGb { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Currently only Amazon EBS gp2 storage volumes are supported.