Class CfnInferenceExperiment
Creates an inference experiment using the configurations specified in the request.
Inherited Members
Namespace: Amazon.CDK.AWS.Sagemaker
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnInferenceExperiment : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnInferenceExperiment
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
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 .
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 .
CloudformationResource: AWS::SageMaker::InferenceExperiment
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 cfnInferenceExperiment = new CfnInferenceExperiment(this, "MyCfnInferenceExperiment", new CfnInferenceExperimentProps {
EndpointName = "endpointName",
ModelVariants = new [] { new ModelVariantConfigProperty {
InfrastructureConfig = new ModelInfrastructureConfigProperty {
InfrastructureType = "infrastructureType",
RealTimeInferenceConfig = new RealTimeInferenceConfigProperty {
InstanceCount = 123,
InstanceType = "instanceType"
}
},
ModelName = "modelName",
VariantName = "variantName"
} },
Name = "name",
RoleArn = "roleArn",
Type = "type",
// the properties below are optional
DataStorageConfig = new DataStorageConfigProperty {
Destination = "destination",
// the properties below are optional
ContentType = new CaptureContentTypeHeaderProperty {
CsvContentTypes = new [] { "csvContentTypes" },
JsonContentTypes = new [] { "jsonContentTypes" }
},
KmsKey = "kmsKey"
},
Description = "description",
DesiredState = "desiredState",
KmsKey = "kmsKey",
Schedule = new InferenceExperimentScheduleProperty {
EndTime = "endTime",
StartTime = "startTime"
},
ShadowModeConfig = new ShadowModeConfigProperty {
ShadowModelVariants = new [] { new ShadowModelVariantConfigProperty {
SamplingPercentage = 123,
ShadowModelVariantName = "shadowModelVariantName"
} },
SourceModelVariantName = "sourceModelVariantName"
},
StatusReason = "statusReason",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnInferenceExperiment(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnInferenceExperiment(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnInferenceExperiment(Construct, String, ICfnInferenceExperimentProps) |
Properties
AttrArn | The ARN for your inference experiment. |
AttrCreationTime | The timestamp at which the inference experiment was created. |
AttrEndpointMetadata | The metadata of the endpoint on which the inference experiment ran. |
AttrEndpointMetadataEndpointConfigName | |
AttrEndpointMetadataEndpointName | |
AttrEndpointMetadataEndpointStatus | |
AttrLastModifiedTime | The timestamp at which you last modified the inference experiment. |
AttrStatus | The status of the inference experiment. The following are the possible statuses for an inference experiment:. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
DataStorageConfig | The Amazon S3 location and configuration for storing inference request and response data. |
Description | The description of the inference experiment. |
DesiredState | The desired state of the experiment after stopping. |
EndpointName | The name of the endpoint. |
KmsKey | The AWS Key Management Service key that Amazon SageMaker uses to encrypt captured data at rest using Amazon S3 server-side encryption. |
ModelVariants | An array of |
Name | The name of the inference experiment. |
RoleArn | 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. |
Schedule | The duration for which the inference experiment ran or will run. |
ShadowModeConfig | The configuration of |
StatusReason | The error message for the inference experiment status result. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | An array of key-value pairs to apply to this resource. |
Type | The type of the inference experiment. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnInferenceExperiment(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnInferenceExperiment(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnInferenceExperiment(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnInferenceExperiment(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnInferenceExperiment(Construct, String, ICfnInferenceExperimentProps)
public CfnInferenceExperiment(Construct scope, string id, ICfnInferenceExperimentProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnInferenceExperimentProps
Resource properties.
Properties
AttrArn
The ARN for your inference experiment.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrCreationTime
The timestamp at which the inference experiment was created.
public virtual string AttrCreationTime { get; }
Property Value
System.String
Remarks
CloudformationAttribute: CreationTime
AttrEndpointMetadata
The metadata of the endpoint on which the inference experiment ran.
public virtual IResolvable AttrEndpointMetadata { get; }
Property Value
Remarks
CloudformationAttribute: EndpointMetadata
AttrEndpointMetadataEndpointConfigName
public virtual string AttrEndpointMetadataEndpointConfigName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: EndpointMetadata.EndpointConfigName
AttrEndpointMetadataEndpointName
public virtual string AttrEndpointMetadataEndpointName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: EndpointMetadata.EndpointName
AttrEndpointMetadataEndpointStatus
public virtual string AttrEndpointMetadataEndpointStatus { get; }
Property Value
System.String
Remarks
CloudformationAttribute: EndpointMetadata.EndpointStatus
AttrLastModifiedTime
The timestamp at which you last modified the inference experiment.
public virtual string AttrLastModifiedTime { get; }
Property Value
System.String
Remarks
CloudformationAttribute: LastModifiedTime
AttrStatus
The status of the inference experiment. The following are the possible statuses for an inference experiment:.
public virtual string AttrStatus { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Status
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
DataStorageConfig
The Amazon S3 location and configuration for storing inference request and response data.
public virtual object DataStorageConfig { get; set; }
Property Value
System.Object
Description
The description of the inference experiment.
public virtual string Description { get; set; }
Property Value
System.String
DesiredState
The desired state of the experiment after stopping.
public virtual string DesiredState { get; set; }
Property Value
System.String
Remarks
The possible states are the following:.
EndpointName
The name of the endpoint.
public virtual string EndpointName { get; set; }
Property Value
System.String
KmsKey
The AWS Key Management Service key that Amazon SageMaker uses to encrypt captured data at rest using Amazon S3 server-side encryption.
public virtual string KmsKey { get; set; }
Property Value
System.String
ModelVariants
An array of ModelVariantConfigSummary
objects.
public virtual object ModelVariants { get; set; }
Property Value
System.Object
Name
The name of the inference experiment.
public virtual string Name { get; set; }
Property Value
System.String
RoleArn
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.
public virtual string RoleArn { get; set; }
Property Value
System.String
Schedule
The duration for which the inference experiment ran or will run.
public virtual object Schedule { get; set; }
Property Value
System.Object
ShadowModeConfig
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.
public virtual object ShadowModeConfig { get; set; }
Property Value
System.Object
StatusReason
The error message for the inference experiment status result.
public virtual string StatusReason { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
An array of key-value pairs to apply to this resource.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
Type
The type of the inference experiment.
public virtual string Type { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>