Experimental
@aws-cdk/aws-sagemaker-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
InstanceProductionVariantProps Struct
Construction properties for an instance production variant.
| Stability | Experimental |
|---|---|
| Source | lib/endpoint-config.ts |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as sagemaker_alpha from '@aws-cdk/aws-sagemaker-alpha';
import * as cdk from 'aws-cdk-lib';
declare const acceleratorType: sagemaker_alpha.AcceleratorType;
declare const instanceType: sagemaker_alpha.InstanceType;
declare const model: sagemaker_alpha.Model;
const instanceProductionVariantProps: sagemaker_alpha.InstanceProductionVariantProps = {
model: model,
variantName: 'variantName',
// the properties below are optional
acceleratorType: acceleratorType,
containerStartupHealthCheckTimeout: cdk.Duration.minutes(30),
initialInstanceCount: 123,
initialVariantWeight: 123,
instanceType: instanceType,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker_alpha as sagemaker_alpha
import aws_cdk as cdk
# accelerator_type: sagemaker_alpha.AcceleratorType
# instance_type: sagemaker_alpha.InstanceType
# model: sagemaker_alpha.Model
instance_production_variant_props = sagemaker_alpha.InstanceProductionVariantProps(
model=model,
variant_name="variantName",
# the properties below are optional
accelerator_type=accelerator_type,
container_startup_health_check_timeout=cdk.Duration.minutes(30),
initial_instance_count=123,
initial_variant_weight=123,
instance_type=instance_type
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.alpha.*;
import software.amazon.awscdk.*;
AcceleratorType acceleratorType;
InstanceType instanceType;
Model model;
InstanceProductionVariantProps instanceProductionVariantProps = InstanceProductionVariantProps.builder()
.model(model)
.variantName("variantName")
// the properties below are optional
.acceleratorType(acceleratorType)
.containerStartupHealthCheckTimeout(Duration.minutes(30))
.initialInstanceCount(123)
.initialVariantWeight(123)
.instanceType(instanceType)
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Sagemaker.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker.Alpha;
using Amazon.CDK;
AcceleratorType acceleratorType;
InstanceType instanceType;
Model model;
var instanceProductionVariantProps = new InstanceProductionVariantProps {
Model = model,
VariantName = "variantName",
// the properties below are optional
AcceleratorType = acceleratorType,
ContainerStartupHealthCheckTimeout = Duration.Minutes(30),
InitialInstanceCount = 123,
InitialVariantWeight = 123,
InstanceType = instanceType
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdksagemakeralpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import sagemaker_alpha "github.com/aws/aws-cdk-go/awscdksagemakeralpha"
import cdk "github.com/aws/aws-cdk-go/awscdk"
var acceleratorType AcceleratorType
var instanceType InstanceType
var model Model
instanceProductionVariantProps := &InstanceProductionVariantProps{
Model: model,
VariantName: jsii.String("variantName"),
// the properties below are optional
AcceleratorType: acceleratorType,
ContainerStartupHealthCheckTimeout: cdk.Duration_Minutes(jsii.Number(30)),
InitialInstanceCount: jsii.Number(123),
InitialVariantWeight: jsii.Number(123),
InstanceType: instanceType,
}
Properties
acceleratorTypeoptionalAcceleratorTypeaccelerator_typeoptionalAcceleratorTypeacceleratorTypeoptionalAcceleratorTypeAcceleratorTypeoptionalAcceleratorTypeAcceleratorTypeoptionalAcceleratorType = none #The size of the Elastic Inference (EI) instance to use for the production variant.
EI instances provide on-demand GPU computing for inference.
containerStartupHealthCheckTimeoutoptionalDurationcontainer_startup_health_check_timeoutoptionalDurationcontainerStartupHealthCheckTimeoutoptionalDurationContainerStartupHealthCheckTimeoutoptionalDurationContainerStartupHealthCheckTimeoutoptionalDuration = none #The timeout value, in seconds, for your inference container to pass health check.
Range between 60 and 3600 seconds.
initialInstanceCountoptionalnumberinitial_instance_countoptionalint | floatinitialInstanceCountoptionalNumberInitialInstanceCountoptionaldoubleInitialInstanceCountoptional*float64 = 1 #Number of instances to launch initially.
initialVariantWeightoptionalnumberinitial_variant_weightoptionalint | floatinitialVariantWeightoptionalNumberInitialVariantWeightoptionaldoubleInitialVariantWeightoptional*float64 = 1.0 #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 variant weight to the sum of all variant weight values across all production variants.
instanceTypeoptionalInstanceTypeinstance_typeoptionalInstanceTypeinstanceTypeoptionalInstanceTypeInstanceTypeoptionalInstanceTypeInstanceTypeoptionalInstanceType = InstanceType.T2_MEDIUM #Instance type of the production variant.
Name of the production variant.