Class: AWSCDK::StepFunctionsTasks::ProductionVariant
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::StepFunctionsTasks::ProductionVariant
- Defined in:
- step_functions_tasks/production_variant.rb
Overview
Identifies a model that you want to host and the resources to deploy for hosting it.
Instance Attribute Summary collapse
-
#accelerator_type ⇒ AWSCDK::StepFunctionsTasks::AcceleratorType?
readonly
The size of the Elastic Inference (EI) instance to use for the production variant.
-
#initial_instance_count ⇒ Numeric?
readonly
Number of instances to launch initially.
-
#initial_variant_weight ⇒ Numeric?
readonly
Determines initial traffic distribution among all of the models that you specify in the endpoint configuration.
-
#instance_type ⇒ AWSCDK::EC2::InstanceType
readonly
The ML compute instance type.
-
#model_name ⇒ String
readonly
The name of the model that you want to host.
-
#variant_name ⇒ String
readonly
The name of the production variant.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(instance_type:, model_name:, variant_name:, accelerator_type: nil, initial_instance_count: nil, initial_variant_weight: nil) ⇒ ProductionVariant
constructor
A new instance of ProductionVariant.
- #to_jsii ⇒ Object
Constructor Details
#initialize(instance_type:, model_name:, variant_name:, accelerator_type: nil, initial_instance_count: nil, initial_variant_weight: nil) ⇒ ProductionVariant
Returns a new instance of ProductionVariant.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'step_functions_tasks/production_variant.rb', line 15 def initialize(instance_type:, model_name:, variant_name:, accelerator_type: nil, initial_instance_count: nil, initial_variant_weight: nil) @instance_type = instance_type Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkluc3RhbmNlVHlwZSJ9")), "instanceType") @model_name = model_name Jsii::Type.check_type(@model_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "modelName") @variant_name = variant_name Jsii::Type.check_type(@variant_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "variantName") @accelerator_type = accelerator_type Jsii::Type.check_type(@accelerator_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5BY2NlbGVyYXRvclR5cGUifQ==")), "acceleratorType") unless @accelerator_type.nil? @initial_instance_count = initial_instance_count Jsii::Type.check_type(@initial_instance_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "initialInstanceCount") unless @initial_instance_count.nil? @initial_variant_weight = initial_variant_weight Jsii::Type.check_type(@initial_variant_weight, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "initialVariantWeight") unless @initial_variant_weight.nil? end |
Instance Attribute Details
#accelerator_type ⇒ AWSCDK::StepFunctionsTasks::AcceleratorType? (readonly)
Default: - None
The size of the Elastic Inference (EI) instance to use for the production variant.
48 49 50 |
# File 'step_functions_tasks/production_variant.rb', line 48 def accelerator_type @accelerator_type end |
#initial_instance_count ⇒ Numeric? (readonly)
Default: - 1
Number of instances to launch initially.
53 54 55 |
# File 'step_functions_tasks/production_variant.rb', line 53 def initial_instance_count @initial_instance_count end |
#initial_variant_weight ⇒ Numeric? (readonly)
Default: - 1.0
Determines initial traffic distribution among all of the models that you specify in the endpoint configuration.
58 59 60 |
# File 'step_functions_tasks/production_variant.rb', line 58 def initial_variant_weight @initial_variant_weight end |
#instance_type ⇒ AWSCDK::EC2::InstanceType (readonly)
The ML compute instance type.
33 34 35 |
# File 'step_functions_tasks/production_variant.rb', line 33 def instance_type @instance_type end |
#model_name ⇒ String (readonly)
The name of the model that you want to host.
This is the name that you specified when creating the model.
39 40 41 |
# File 'step_functions_tasks/production_variant.rb', line 39 def model_name @model_name end |
#variant_name ⇒ String (readonly)
The name of the production variant.
43 44 45 |
# File 'step_functions_tasks/production_variant.rb', line 43 def variant_name @variant_name end |
Class Method Details
.jsii_properties ⇒ Object
60 61 62 63 64 65 66 67 68 69 |
# File 'step_functions_tasks/production_variant.rb', line 60 def self.jsii_properties { :instance_type => "instanceType", :model_name => "modelName", :variant_name => "variantName", :accelerator_type => "acceleratorType", :initial_instance_count => "initialInstanceCount", :initial_variant_weight => "initialVariantWeight", } end |
Instance Method Details
#to_jsii ⇒ Object
71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'step_functions_tasks/production_variant.rb', line 71 def to_jsii result = {} result.merge!({ "instanceType" => @instance_type, "modelName" => @model_name, "variantName" => @variant_name, "acceleratorType" => @accelerator_type, "initialInstanceCount" => @initial_instance_count, "initialVariantWeight" => @initial_variant_weight, }) result.compact end |