Class: AWSCDK::Sagemaker::CfnEndpointConfig::ProductionVariantProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Sagemaker::CfnEndpointConfig::ProductionVariantProperty
- Defined in:
- sagemaker/cfn_endpoint_config.rb
Overview
Specifies a model that you want to host and the resources to deploy for hosting it.
If you are deploying multiple models, tell Amazon SageMaker how to distribute traffic among the models by specifying the InitialVariantWeight objects.
Instance Attribute Summary collapse
-
#accelerator_type ⇒ String?
readonly
The size of the Elastic Inference (EI) instance to use for the production variant.
- #capacity_reservation_config ⇒ AWSCDK::IResolvable, ... readonly
-
#container_startup_health_check_timeout_in_seconds ⇒ Numeric?
readonly
The timeout value, in seconds, for your inference container to pass health check by SageMaker Hosting.
-
#enable_ssm_access ⇒ Boolean, ...
readonly
You can use this parameter to turn on native AWS Systems Manager (SSM) access for a production variant behind an endpoint.
- #inference_ami_version ⇒ String? readonly
-
#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_pools ⇒ AWSCDK::IResolvable, ... readonly
-
#instance_type ⇒ String?
readonly
The ML compute instance type.
- #managed_instance_scaling ⇒ AWSCDK::IResolvable, ... readonly
-
#model_data_download_timeout_in_seconds ⇒ Numeric?
readonly
The timeout value, in seconds, to download and extract the model that you want to host from Amazon S3 to the individual inference instance associated with this production variant.
-
#model_name ⇒ String?
readonly
The name of the model that you want to host.
- #routing_config ⇒ AWSCDK::IResolvable, ... readonly
-
#serverless_config ⇒ AWSCDK::IResolvable, ...
readonly
The serverless configuration for an endpoint.
- #variant_instance_provision_timeout_in_seconds ⇒ Numeric? readonly
-
#variant_name ⇒ String
readonly
The name of the production variant.
-
#volume_size_in_gb ⇒ Numeric?
readonly
The size, in GB, of the ML storage volume attached to individual inference instance associated with the production variant.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(variant_name:, accelerator_type: nil, capacity_reservation_config: nil, container_startup_health_check_timeout_in_seconds: nil, enable_ssm_access: nil, inference_ami_version: nil, initial_instance_count: nil, initial_variant_weight: nil, instance_pools: nil, instance_type: nil, managed_instance_scaling: nil, model_data_download_timeout_in_seconds: nil, model_name: nil, routing_config: nil, serverless_config: nil, variant_instance_provision_timeout_in_seconds: nil, volume_size_in_gb: nil) ⇒ ProductionVariantProperty
constructor
A new instance of ProductionVariantProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(variant_name:, accelerator_type: nil, capacity_reservation_config: nil, container_startup_health_check_timeout_in_seconds: nil, enable_ssm_access: nil, inference_ami_version: nil, initial_instance_count: nil, initial_variant_weight: nil, instance_pools: nil, instance_type: nil, managed_instance_scaling: nil, model_data_download_timeout_in_seconds: nil, model_name: nil, routing_config: nil, serverless_config: nil, variant_instance_provision_timeout_in_seconds: nil, volume_size_in_gb: nil) ⇒ ProductionVariantProperty
Returns a new instance of ProductionVariantProperty.
1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1600 def initialize(variant_name:, accelerator_type: nil, capacity_reservation_config: nil, container_startup_health_check_timeout_in_seconds: nil, enable_ssm_access: nil, inference_ami_version: nil, initial_instance_count: nil, initial_variant_weight: nil, instance_pools: nil, instance_type: nil, managed_instance_scaling: nil, model_data_download_timeout_in_seconds: nil, model_name: nil, routing_config: nil, serverless_config: nil, variant_instance_provision_timeout_in_seconds: nil, volume_size_in_gb: nil) @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("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "acceleratorType") unless @accelerator_type.nil? @capacity_reservation_config = capacity_reservation_config.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnEndpointConfig::CapacityReservationConfigProperty.new(**capacity_reservation_config.transform_keys(&:to_sym)) : capacity_reservation_config Jsii::Type.check_type(@capacity_reservation_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRW5kcG9pbnRDb25maWcuQ2FwYWNpdHlSZXNlcnZhdGlvbkNvbmZpZ1Byb3BlcnR5In1dfX0=")), "capacityReservationConfig") unless @capacity_reservation_config.nil? @container_startup_health_check_timeout_in_seconds = container_startup_health_check_timeout_in_seconds Jsii::Type.check_type(@container_startup_health_check_timeout_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "containerStartupHealthCheckTimeoutInSeconds") unless @container_startup_health_check_timeout_in_seconds.nil? @enable_ssm_access = enable_ssm_access Jsii::Type.check_type(@enable_ssm_access, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableSsmAccess") unless @enable_ssm_access.nil? @inference_ami_version = inference_ami_version Jsii::Type.check_type(@inference_ami_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "inferenceAmiVersion") unless @inference_ami_version.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? @instance_pools = instance_pools Jsii::Type.check_type(@instance_pools, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2FnZW1ha2VyLkNmbkVuZHBvaW50Q29uZmlnLkluc3RhbmNlUG9vbHNQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "instancePools") unless @instance_pools.nil? @instance_type = instance_type Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceType") unless @instance_type.nil? @managed_instance_scaling = managed_instance_scaling.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnEndpointConfig::ManagedInstanceScalingProperty.new(**managed_instance_scaling.transform_keys(&:to_sym)) : managed_instance_scaling Jsii::Type.check_type(@managed_instance_scaling, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRW5kcG9pbnRDb25maWcuTWFuYWdlZEluc3RhbmNlU2NhbGluZ1Byb3BlcnR5In1dfX0=")), "managedInstanceScaling") unless @managed_instance_scaling.nil? @model_data_download_timeout_in_seconds = model_data_download_timeout_in_seconds Jsii::Type.check_type(@model_data_download_timeout_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "modelDataDownloadTimeoutInSeconds") unless @model_data_download_timeout_in_seconds.nil? @model_name = model_name Jsii::Type.check_type(@model_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "modelName") unless @model_name.nil? @routing_config = routing_config.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnEndpointConfig::RoutingConfigProperty.new(**routing_config.transform_keys(&:to_sym)) : routing_config Jsii::Type.check_type(@routing_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRW5kcG9pbnRDb25maWcuUm91dGluZ0NvbmZpZ1Byb3BlcnR5In1dfX0=")), "routingConfig") unless @routing_config.nil? @serverless_config = serverless_config.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnEndpointConfig::ServerlessConfigProperty.new(**serverless_config.transform_keys(&:to_sym)) : serverless_config Jsii::Type.check_type(@serverless_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRW5kcG9pbnRDb25maWcuU2VydmVybGVzc0NvbmZpZ1Byb3BlcnR5In1dfX0=")), "serverlessConfig") unless @serverless_config.nil? @variant_instance_provision_timeout_in_seconds = variant_instance_provision_timeout_in_seconds Jsii::Type.check_type(@variant_instance_provision_timeout_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "variantInstanceProvisionTimeoutInSeconds") unless @variant_instance_provision_timeout_in_seconds.nil? @volume_size_in_gb = volume_size_in_gb Jsii::Type.check_type(@volume_size_in_gb, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "volumeSizeInGb") unless @volume_size_in_gb.nil? end |
Instance Attribute Details
#accelerator_type ⇒ String? (readonly)
The size of the Elastic Inference (EI) instance to use for the production variant.
EI instances provide on-demand GPU computing for inference. For more information, see Using Elastic Inference in Amazon SageMaker . For more information, see Using Elastic Inference in Amazon SageMaker .
1648 1649 1650 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1648 def accelerator_type @accelerator_type end |
#capacity_reservation_config ⇒ AWSCDK::IResolvable, ... (readonly)
1651 1652 1653 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1651 def capacity_reservation_config @capacity_reservation_config end |
#container_startup_health_check_timeout_in_seconds ⇒ Numeric? (readonly)
The timeout value, in seconds, for your inference container to pass health check by SageMaker Hosting.
For more information about health check, see How Your Container Should Respond to Health Check (Ping) Requests .
1658 1659 1660 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1658 def container_startup_health_check_timeout_in_seconds @container_startup_health_check_timeout_in_seconds end |
#enable_ssm_access ⇒ Boolean, ... (readonly)
You can use this parameter to turn on native AWS Systems Manager (SSM) access for a production variant behind an endpoint.
By default, SSM access is disabled for all production variants behind an endpoint. You can turn on or turn off SSM access for a production variant behind an existing endpoint by creating a new endpoint configuration and calling UpdateEndpoint .
1665 1666 1667 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1665 def enable_ssm_access @enable_ssm_access end |
#inference_ami_version ⇒ String? (readonly)
1668 1669 1670 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1668 def inference_ami_version @inference_ami_version end |
#initial_instance_count ⇒ Numeric? (readonly)
Number of instances to launch initially.
1673 1674 1675 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1673 def initial_instance_count @initial_instance_count end |
#initial_variant_weight ⇒ Numeric? (readonly)
Determines initial traffic distribution among all of the models that you specify in the endpoint configuration.
The traffic to a production variant is determined by the ratio of the VariantWeight to the sum of all VariantWeight values across all ProductionVariants. If unspecified, it defaults to 1.0.
1680 1681 1682 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1680 def initial_variant_weight @initial_variant_weight end |
#instance_pools ⇒ AWSCDK::IResolvable, ... (readonly)
1683 1684 1685 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1683 def instance_pools @instance_pools end |
#instance_type ⇒ String? (readonly)
The ML compute instance type.
1688 1689 1690 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1688 def instance_type @instance_type end |
#managed_instance_scaling ⇒ AWSCDK::IResolvable, ... (readonly)
1691 1692 1693 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1691 def managed_instance_scaling @managed_instance_scaling end |
#model_data_download_timeout_in_seconds ⇒ Numeric? (readonly)
The timeout value, in seconds, to download and extract the model that you want to host from Amazon S3 to the individual inference instance associated with this production variant.
1696 1697 1698 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1696 def model_data_download_timeout_in_seconds @model_data_download_timeout_in_seconds 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.
1703 1704 1705 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1703 def model_name @model_name end |
#routing_config ⇒ AWSCDK::IResolvable, ... (readonly)
1706 1707 1708 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1706 def routing_config @routing_config end |
#serverless_config ⇒ AWSCDK::IResolvable, ... (readonly)
The serverless configuration for an endpoint.
Specifies a serverless endpoint configuration instead of an instance-based endpoint configuration.
1713 1714 1715 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1713 def serverless_config @serverless_config end |
#variant_instance_provision_timeout_in_seconds ⇒ Numeric? (readonly)
1716 1717 1718 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1716 def variant_instance_provision_timeout_in_seconds @variant_instance_provision_timeout_in_seconds end |
#variant_name ⇒ String (readonly)
The name of the production variant.
1641 1642 1643 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1641 def variant_name @variant_name end |
#volume_size_in_gb ⇒ Numeric? (readonly)
The size, in GB, of the ML storage volume attached to individual inference instance associated with the production variant.
Currently only Amazon EBS gp2 storage volumes are supported.
1723 1724 1725 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1723 def volume_size_in_gb @volume_size_in_gb end |
Class Method Details
.jsii_properties ⇒ Object
1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1725 def self.jsii_properties { :variant_name => "variantName", :accelerator_type => "acceleratorType", :capacity_reservation_config => "capacityReservationConfig", :container_startup_health_check_timeout_in_seconds => "containerStartupHealthCheckTimeoutInSeconds", :enable_ssm_access => "enableSsmAccess", :inference_ami_version => "inferenceAmiVersion", :initial_instance_count => "initialInstanceCount", :initial_variant_weight => "initialVariantWeight", :instance_pools => "instancePools", :instance_type => "instanceType", :managed_instance_scaling => "managedInstanceScaling", :model_data_download_timeout_in_seconds => "modelDataDownloadTimeoutInSeconds", :model_name => "modelName", :routing_config => "routingConfig", :serverless_config => "serverlessConfig", :variant_instance_provision_timeout_in_seconds => "variantInstanceProvisionTimeoutInSeconds", :volume_size_in_gb => "volumeSizeInGb", } end |
Instance Method Details
#to_jsii ⇒ Object
1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 |
# File 'sagemaker/cfn_endpoint_config.rb', line 1747 def to_jsii result = {} result.merge!({ "variantName" => @variant_name, "acceleratorType" => @accelerator_type, "capacityReservationConfig" => @capacity_reservation_config, "containerStartupHealthCheckTimeoutInSeconds" => @container_startup_health_check_timeout_in_seconds, "enableSsmAccess" => @enable_ssm_access, "inferenceAmiVersion" => @inference_ami_version, "initialInstanceCount" => @initial_instance_count, "initialVariantWeight" => @initial_variant_weight, "instancePools" => @instance_pools, "instanceType" => @instance_type, "managedInstanceScaling" => @managed_instance_scaling, "modelDataDownloadTimeoutInSeconds" => @model_data_download_timeout_in_seconds, "modelName" => @model_name, "routingConfig" => @routing_config, "serverlessConfig" => @serverless_config, "variantInstanceProvisionTimeoutInSeconds" => @variant_instance_provision_timeout_in_seconds, "volumeSizeInGb" => @volume_size_in_gb, }) result.compact end |