Class: AWSCDK::Sagemaker::CfnInferenceExperiment::ShadowModelVariantConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sagemaker/cfn_inference_experiment.rb

Overview

The name and sampling percentage of a shadow variant.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sampling_percentage:, shadow_model_variant_name:) ⇒ ShadowModelVariantConfigProperty

Returns a new instance of ShadowModelVariantConfigProperty.

Parameters:

  • sampling_percentage (Numeric)

    The percentage of inference requests that Amazon SageMaker replicates from the production variant to the shadow variant.

  • shadow_model_variant_name (String)

    The name of the shadow variant.



1158
1159
1160
1161
1162
1163
# File 'sagemaker/cfn_inference_experiment.rb', line 1158

def initialize(sampling_percentage:, shadow_model_variant_name:)
  @sampling_percentage = sampling_percentage
  Jsii::Type.check_type(@sampling_percentage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "samplingPercentage")
  @shadow_model_variant_name = shadow_model_variant_name
  Jsii::Type.check_type(@shadow_model_variant_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "shadowModelVariantName")
end

Instance Attribute Details

#sampling_percentageNumeric (readonly)

The percentage of inference requests that Amazon SageMaker replicates from the production variant to the shadow variant.



1169
1170
1171
# File 'sagemaker/cfn_inference_experiment.rb', line 1169

def sampling_percentage
  @sampling_percentage
end

#shadow_model_variant_nameString (readonly)

The name of the shadow variant.



1174
1175
1176
# File 'sagemaker/cfn_inference_experiment.rb', line 1174

def shadow_model_variant_name
  @shadow_model_variant_name
end

Class Method Details

.jsii_propertiesObject



1176
1177
1178
1179
1180
1181
# File 'sagemaker/cfn_inference_experiment.rb', line 1176

def self.jsii_properties
  {
    :sampling_percentage => "samplingPercentage",
    :shadow_model_variant_name => "shadowModelVariantName",
  }
end

Instance Method Details

#to_jsiiObject



1183
1184
1185
1186
1187
1188
1189
1190
# File 'sagemaker/cfn_inference_experiment.rb', line 1183

def to_jsii
  result = {}
  result.merge!({
    "samplingPercentage" => @sampling_percentage,
    "shadowModelVariantName" => @shadow_model_variant_name,
  })
  result.compact
end