AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::SageMaker::InferenceExperiment

CfnInferenceExperiment

Creates an inference experiment using the configurations specified in the request. Use this API to setup and schedule an experiment to compare model variants on a Amazon SageMaker inference endpoint. For more information about inference experiments, see [Shadow tests](https://docs.aws.amazon.com/sagemaker/latest/dg/shadow-tests.html) . Amazon SageMaker begins your experiment at the scheduled time and routes traffic to your endpoint's model variants based on your specified configuration. While the experiment is in progress or after it has concluded, you can view metrics that compare your model variants. For more information, see [View, monitor, and edit shadow tests](https://docs.aws.amazon.com/sagemaker/latest/dg/shadow-tests-view-monitor-edit.html) .

Import

import { CfnInferenceExperiment } from 'aws-cdk-lib/aws-sagemaker';

Or use the module namespace:

import * as sagemaker from 'aws-cdk-lib/aws-sagemaker';
// sagemaker.CfnInferenceExperiment

Properties

Configuration passed to the constructor as CfnInferenceExperimentProps.

endpointNameRequired
string

The name of the endpoint.

modelVariantsRequired
IResolvable | IResolvable | ModelVariantConfigProperty[]

An array of `ModelVariantConfigSummary` objects. There is one for each variant in the inference experiment. Each `ModelVariantConfigSummary` object in the array describes the infrastructure configuration for deploying the corresponding variant.

nameRequired
string

The name of the inference experiment.

roleArnRequired
string

The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment.

typeRequired
string

The type of the inference experiment.

dataStorageConfigOptional
IResolvable | DataStorageConfigProperty

The Amazon S3 location and configuration for storing inference request and response data.

descriptionOptional
string

The description of the inference experiment.

desiredStateOptional
string

The desired state of the experiment after stopping. The possible states are the following:. - `Completed` : The experiment completed successfully - `Cancelled` : The experiment was canceled

kmsKeyOptional
string

The AWS Key Management Service key that Amazon SageMaker uses to encrypt captured data at rest using Amazon S3 server-side encryption.

scheduleOptional
IResolvable | InferenceExperimentScheduleProperty

The duration for which the inference experiment ran or will run. The maximum duration that you can set for an inference experiment is 30 days.

shadowModeConfigOptional
IResolvable | ShadowModeConfigProperty

The configuration of `ShadowMode` inference experiment type, which shows the production variant that takes all the inference requests, and the shadow variant to which Amazon SageMaker replicates a percentage of the inference requests. For the shadow variant it also shows the percentage of requests that Amazon SageMaker replicates.

statusReasonOptional
string

The error message for the inference experiment status result.

tagsOptional
CfnTag[]

An array of key-value pairs to apply to this resource. For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter