Class: AWSCDK::Sagemaker::CfnInferenceComponent::InferenceComponentSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Sagemaker::CfnInferenceComponent::InferenceComponentSpecificationProperty
- Defined in:
- sagemaker/cfn_inference_component.rb
Overview
Details about the resources to deploy with this inference component, including the model, container, and compute resources.
Instance Attribute Summary collapse
-
#base_inference_component_name ⇒ String?
readonly
The name of an existing inference component that is to contain the inference component that you're creating with your request.
-
#compute_resource_requirements ⇒ AWSCDK::IResolvable, ...
readonly
The compute resources allocated to run the model, plus any adapter models, that you assign to the inference component.
-
#container ⇒ AWSCDK::IResolvable, ...
readonly
Defines a container that provides the runtime environment for a model that you deploy with an inference component.
-
#model_name ⇒ String?
readonly
The name of an existing SageMaker AI model object in your account that you want to deploy with the inference component.
-
#startup_parameters ⇒ AWSCDK::IResolvable, ...
readonly
Settings that take effect while the model container starts up.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(base_inference_component_name: nil, compute_resource_requirements: nil, container: nil, model_name: nil, startup_parameters: nil) ⇒ InferenceComponentSpecificationProperty
constructor
A new instance of InferenceComponentSpecificationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(base_inference_component_name: nil, compute_resource_requirements: nil, container: nil, model_name: nil, startup_parameters: nil) ⇒ InferenceComponentSpecificationProperty
Returns a new instance of InferenceComponentSpecificationProperty.
1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 |
# File 'sagemaker/cfn_inference_component.rb', line 1140 def initialize(base_inference_component_name: nil, compute_resource_requirements: nil, container: nil, model_name: nil, startup_parameters: nil) @base_inference_component_name = base_inference_component_name Jsii::Type.check_type(@base_inference_component_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "baseInferenceComponentName") unless @base_inference_component_name.nil? @compute_resource_requirements = compute_resource_requirements.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnInferenceComponent::InferenceComponentComputeResourceRequirementsProperty.new(**compute_resource_requirements.transform_keys(&:to_sym)) : compute_resource_requirements Jsii::Type.check_type(@compute_resource_requirements, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuSW5mZXJlbmNlQ29tcG9uZW50LkluZmVyZW5jZUNvbXBvbmVudENvbXB1dGVSZXNvdXJjZVJlcXVpcmVtZW50c1Byb3BlcnR5In1dfX0=")), "computeResourceRequirements") unless @compute_resource_requirements.nil? @container = container.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnInferenceComponent::InferenceComponentContainerSpecificationProperty.new(**container.transform_keys(&:to_sym)) : container Jsii::Type.check_type(@container, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuSW5mZXJlbmNlQ29tcG9uZW50LkluZmVyZW5jZUNvbXBvbmVudENvbnRhaW5lclNwZWNpZmljYXRpb25Qcm9wZXJ0eSJ9XX19")), "container") unless @container.nil? @model_name = model_name Jsii::Type.check_type(@model_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "modelName") unless @model_name.nil? @startup_parameters = startup_parameters.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnInferenceComponent::InferenceComponentStartupParametersProperty.new(**startup_parameters.transform_keys(&:to_sym)) : startup_parameters Jsii::Type.check_type(@startup_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuSW5mZXJlbmNlQ29tcG9uZW50LkluZmVyZW5jZUNvbXBvbmVudFN0YXJ0dXBQYXJhbWV0ZXJzUHJvcGVydHkifV19fQ==")), "startupParameters") unless @startup_parameters.nil? end |
Instance Attribute Details
#base_inference_component_name ⇒ String? (readonly)
The name of an existing inference component that is to contain the inference component that you're creating with your request.
Specify this parameter only if your request is meant to create an adapter inference component. An adapter inference component contains the path to an adapter model. The purpose of the adapter model is to tailor the inference output of a base foundation model, which is hosted by the base inference component. The adapter inference component uses the compute resources that you assigned to the base inference component.
When you create an adapter inference component, use the Container parameter to specify the location of the adapter artifacts. In the parameter value, use the ArtifactUrl parameter of the InferenceComponentContainerSpecification data type.
Before you can create an adapter inference component, you must have an existing inference component that contains the foundation model that you want to adapt.
1163 1164 1165 |
# File 'sagemaker/cfn_inference_component.rb', line 1163 def base_inference_component_name @base_inference_component_name end |
#compute_resource_requirements ⇒ AWSCDK::IResolvable, ... (readonly)
The compute resources allocated to run the model, plus any adapter models, that you assign to the inference component.
Omit this parameter if your request is meant to create an adapter inference component. An adapter inference component is loaded by a base inference component, and it uses the compute resources of the base inference component.
1170 1171 1172 |
# File 'sagemaker/cfn_inference_component.rb', line 1170 def compute_resource_requirements @compute_resource_requirements end |
#container ⇒ AWSCDK::IResolvable, ... (readonly)
Defines a container that provides the runtime environment for a model that you deploy with an inference component.
1175 1176 1177 |
# File 'sagemaker/cfn_inference_component.rb', line 1175 def container @container end |
#model_name ⇒ String? (readonly)
The name of an existing SageMaker AI model object in your account that you want to deploy with the inference component.
1180 1181 1182 |
# File 'sagemaker/cfn_inference_component.rb', line 1180 def model_name @model_name end |
#startup_parameters ⇒ AWSCDK::IResolvable, ... (readonly)
Settings that take effect while the model container starts up.
1185 1186 1187 |
# File 'sagemaker/cfn_inference_component.rb', line 1185 def startup_parameters @startup_parameters end |
Class Method Details
.jsii_properties ⇒ Object
1187 1188 1189 1190 1191 1192 1193 1194 1195 |
# File 'sagemaker/cfn_inference_component.rb', line 1187 def self.jsii_properties { :base_inference_component_name => "baseInferenceComponentName", :compute_resource_requirements => "computeResourceRequirements", :container => "container", :model_name => "modelName", :startup_parameters => "startupParameters", } end |
Instance Method Details
#to_jsii ⇒ Object
1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 |
# File 'sagemaker/cfn_inference_component.rb', line 1197 def to_jsii result = {} result.merge!({ "baseInferenceComponentName" => @base_inference_component_name, "computeResourceRequirements" => @compute_resource_requirements, "container" => @container, "modelName" => @model_name, "startupParameters" => @startup_parameters, }) result.compact end |