Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 37 additions & 4 deletions sample/sagemaker/2017-07-24/service-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -11199,6 +11199,10 @@
"shape":"Boolean",
"documentation":"<p>Sets whether all model containers deployed to the endpoint are isolated. If they are, no inbound or outbound network calls can be made to or from the model containers.</p>",
"box":true
},
"MetricsConfig":{
"shape":"MetricsConfig",
"documentation":"<p>The configuration parameters for utilization metrics.</p>"
}
}
},
Expand Down Expand Up @@ -16621,6 +16625,10 @@
"shape":"Boolean",
"documentation":"<p>Indicates whether all model containers deployed to the endpoint are isolated. If they are, no inbound or outbound network calls can be made to or from the model containers.</p>",
"box":true
},
"MetricsConfig":{
"shape":"MetricsConfig",
"documentation":"<p>The configuration parameters for utilization metrics.</p>"
}
}
},
Expand Down Expand Up @@ -16696,6 +16704,10 @@
"ShadowProductionVariants":{
"shape":"ProductionVariantSummaryList",
"documentation":"<p>An array of <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ProductionVariantSummary.html\">ProductionVariantSummary</a> objects, one for each model that you want to host at this endpoint in shadow mode with production traffic replicated from the model specified on <code>ProductionVariants</code>.</p>"
},
"MetricsConfig":{
"shape":"MetricsConfig",
"documentation":"<p>The configuration parameters for utilization metrics.</p>"
}
}
},
Expand Down Expand Up @@ -21268,6 +21280,10 @@
},
"EnableCaching":{"type":"boolean"},
"EnableCapture":{"type":"boolean"},
"EnableEnhancedMetrics":{
"type":"boolean",
"box":true
},
"EnableInfraCheck":{
"type":"boolean",
"box":true
Expand Down Expand Up @@ -31201,6 +31217,10 @@
"min":1,
"pattern":".+"
},
"MetricPublishFrequencyInSeconds":{
"type":"integer",
"box":true
},
"MetricRegex":{
"type":"string",
"max":500,
Expand Down Expand Up @@ -31231,6 +31251,20 @@
"union":true
},
"MetricValue":{"type":"float"},
"MetricsConfig":{
"type":"structure",
"members":{
"EnableEnhancedMetrics":{
"shape":"EnableEnhancedMetrics",
"documentation":"<p>Specifies whether to enable enhanced metrics for the endpoint. Enhanced metrics provide utilization data at instance and container granularity. Container granularity is supported for Inference Components. The default is <code>False</code>.</p>"
},
"MetricPublishFrequencyInSeconds":{
"shape":"MetricPublishFrequencyInSeconds",
"documentation":"<p>The frequency, in seconds, at which utilization metrics are published to Amazon CloudWatch. The default is <code>60</code> seconds.</p>"
}
},
"documentation":"<p>The configuration for Utilization metrics.</p>"
},
"MetricsSource":{
"type":"structure",
"required":[
Expand Down Expand Up @@ -38553,7 +38587,6 @@
},
"ResourceConfig":{
"type":"structure",
"required":["VolumeSizeInGB"],
"members":{
"InstanceType":{
"shape":"TrainingInstanceType",
Expand All @@ -38565,7 +38598,7 @@
"box":true
},
"VolumeSizeInGB":{
"shape":"VolumeSizeInGB",
"shape":"OptionalVolumeSizeInGB",
"documentation":"<p>The size of the ML storage volume that you want to provision. </p> <p>ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML storage volume for scratch space. If you want to store the training data in the ML storage volume, choose <code>File</code> as the <code>TrainingInputMode</code> in the algorithm specification. </p> <p>When using an ML instance with <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ssd-instance-store.html#nvme-ssd-volumes\">NVMe SSD volumes</a>, SageMaker doesn't provision Amazon EBS General Purpose SSD (gp2) storage. Available storage is fixed to the NVMe-type instance's storage capacity. SageMaker configures storage paths for training datasets, checkpoints, model artifacts, and outputs to use the entire capacity of the instance storage. For example, ML instance families with the NVMe-type instance storage include <code>ml.p4d</code>, <code>ml.g4dn</code>, and <code>ml.g5</code>. </p> <p>When using an ML instance with the EBS-only storage option and without instance storage, you must define the size of EBS volume through <code>VolumeSizeInGB</code> in the <code>ResourceConfig</code> API. For example, ML instance families that use EBS volumes include <code>ml.c5</code> and <code>ml.p2</code>. </p> <p>To look up instance types and their instance storage types and volumes, see <a href=\"http://aws.amazon.com/ec2/instance-types/\">Amazon EC2 Instance Types</a>.</p> <p>To find the default local paths defined by the SageMaker training platform, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/model-train-storage.html\">Amazon SageMaker Training Storage Folders for Training Datasets, Checkpoints, Model Artifacts, and Outputs</a>.</p>",
"box":true
},
Expand Down Expand Up @@ -38837,10 +38870,10 @@
},
"GroupPatterns":{
"shape":"GroupPatternsList",
"documentation":"<p>A list of AWS IAM Identity Center group patterns that should be assigned to the specified role. Group patterns support wildcard matching using <code>*</code>.</p>"
"documentation":"<p>A list of Amazon Web Services IAM Identity Center group patterns that should be assigned to the specified role. Group patterns support wildcard matching using <code>*</code>.</p>"
}
},
"documentation":"<p>Defines the mapping between an in-app role and the AWS IAM Identity Center group patterns that should be assigned to that role within the SageMaker Partner AI App.</p>"
"documentation":"<p>Defines the mapping between an in-app role and the Amazon Web Services IAM Identity Center group patterns that should be assigned to that role within the SageMaker Partner AI App.</p>"
},
"RoleGroupAssignmentsList":{
"type":"list",
Expand Down
16 changes: 15 additions & 1 deletion src/sagemaker_core/main/code_injection/shape_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -2526,6 +2526,7 @@
{"name": "ExecutionRoleArn", "shape": "RoleArn", "type": "string"},
{"name": "VpcConfig", "shape": "VpcConfig", "type": "structure"},
{"name": "EnableNetworkIsolation", "shape": "Boolean", "type": "boolean"},
{"name": "MetricsConfig", "shape": "MetricsConfig", "type": "structure"},
],
"type": "structure",
},
Expand Down Expand Up @@ -5044,6 +5045,7 @@
{"name": "ExecutionRoleArn", "shape": "RoleArn", "type": "string"},
{"name": "VpcConfig", "shape": "VpcConfig", "type": "structure"},
{"name": "EnableNetworkIsolation", "shape": "Boolean", "type": "boolean"},
{"name": "MetricsConfig", "shape": "MetricsConfig", "type": "structure"},
],
"type": "structure",
},
Expand Down Expand Up @@ -5075,6 +5077,7 @@
"shape": "ProductionVariantSummaryList",
"type": "list",
},
{"name": "MetricsConfig", "shape": "MetricsConfig", "type": "structure"},
],
"type": "structure",
},
Expand Down Expand Up @@ -11089,6 +11092,17 @@
"type": "structure",
},
"MetricValues": {"member_shape": "Double", "member_type": "double", "type": "list"},
"MetricsConfig": {
"members": [
{"name": "EnableEnhancedMetrics", "shape": "EnableEnhancedMetrics", "type": "boolean"},
{
"name": "MetricPublishFrequencyInSeconds",
"shape": "MetricPublishFrequencyInSeconds",
"type": "integer",
},
],
"type": "structure",
},
"MetricsSource": {
"members": [
{"name": "ContentType", "shape": "ContentType", "type": "string"},
Expand Down Expand Up @@ -14013,7 +14027,7 @@
"members": [
{"name": "InstanceType", "shape": "TrainingInstanceType", "type": "string"},
{"name": "InstanceCount", "shape": "TrainingInstanceCount", "type": "integer"},
{"name": "VolumeSizeInGB", "shape": "VolumeSizeInGB", "type": "integer"},
{"name": "VolumeSizeInGB", "shape": "OptionalVolumeSizeInGB", "type": "integer"},
{"name": "VolumeKmsKeyId", "shape": "KmsKeyId", "type": "string"},
{
"name": "KeepAlivePeriodInSeconds",
Expand Down
7 changes: 7 additions & 0 deletions src/sagemaker_core/main/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -8885,6 +8885,7 @@ class Endpoint(Base):
pending_deployment_summary: Returns the summary of an in-progress deployment. This field is only returned when the endpoint is creating or updating with a new endpoint configuration.
explainer_config: The configuration parameters for an explainer.
shadow_production_variants: An array of ProductionVariantSummary objects, one for each model that you want to host at this endpoint in shadow mode with production traffic replicated from the model specified on ProductionVariants.
metrics_config: The configuration parameters for utilization metrics.

"""

Expand All @@ -8902,6 +8903,7 @@ class Endpoint(Base):
pending_deployment_summary: Optional[shapes.PendingDeploymentSummary] = Unassigned()
explainer_config: Optional[shapes.ExplainerConfig] = Unassigned()
shadow_production_variants: Optional[List[shapes.ProductionVariantSummary]] = Unassigned()
metrics_config: Optional[shapes.MetricsConfig] = Unassigned()

def get_name(self) -> str:
attributes = vars(self)
Expand Down Expand Up @@ -9686,6 +9688,7 @@ class EndpointConfig(Base):
execution_role_arn: The Amazon Resource Name (ARN) of the IAM role that you assigned to the endpoint configuration.
vpc_config:
enable_network_isolation: Indicates whether all model containers deployed to the endpoint are isolated. If they are, no inbound or outbound network calls can be made to or from the model containers.
metrics_config: The configuration parameters for utilization metrics.

"""

Expand All @@ -9701,6 +9704,7 @@ class EndpointConfig(Base):
execution_role_arn: Optional[str] = Unassigned()
vpc_config: Optional[shapes.VpcConfig] = Unassigned()
enable_network_isolation: Optional[bool] = Unassigned()
metrics_config: Optional[shapes.MetricsConfig] = Unassigned()

def get_name(self) -> str:
attributes = vars(self)
Expand Down Expand Up @@ -9765,6 +9769,7 @@ def create(
execution_role_arn: Optional[str] = Unassigned(),
vpc_config: Optional[shapes.VpcConfig] = Unassigned(),
enable_network_isolation: Optional[bool] = Unassigned(),
metrics_config: Optional[shapes.MetricsConfig] = Unassigned(),
session: Optional[Session] = None,
region: Optional[str] = None,
) -> Optional["EndpointConfig"]:
Expand All @@ -9783,6 +9788,7 @@ def create(
execution_role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform actions on your behalf. For more information, see SageMaker AI Roles. To be able to pass this role to Amazon SageMaker AI, the caller of this action must have the iam:PassRole permission.
vpc_config:
enable_network_isolation: Sets whether all model containers deployed to the endpoint are isolated. If they are, no inbound or outbound network calls can be made to or from the model containers.
metrics_config: The configuration parameters for utilization metrics.
session: Boto3 session.
region: Region name.

Expand Down Expand Up @@ -9822,6 +9828,7 @@ def create(
"ExecutionRoleArn": execution_role_arn,
"VpcConfig": vpc_config,
"EnableNetworkIsolation": enable_network_isolation,
"MetricsConfig": metrics_config,
}

operation_input_args = Base.populate_chained_attributes(
Expand Down
21 changes: 18 additions & 3 deletions src/sagemaker_core/main/shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,9 +1067,9 @@ class ResourceConfig(Base):
instance_placement_config: Configuration for how training job instances are placed and allocated within UltraServers. Only applicable for UltraServer capacity.
"""

volume_size_in_gb: int
instance_type: Optional[str] = Unassigned()
instance_count: Optional[int] = Unassigned()
volume_size_in_gb: Optional[int] = Unassigned()
volume_kms_key_id: Optional[str] = Unassigned()
keep_alive_period_in_seconds: Optional[int] = Unassigned()
instance_groups: Optional[List[InstanceGroup]] = Unassigned()
Expand Down Expand Up @@ -5760,6 +5760,21 @@ class ExplainerConfig(Base):
clarify_explainer_config: Optional[ClarifyExplainerConfig] = Unassigned()


class MetricsConfig(Base):
"""
MetricsConfig
The configuration for Utilization metrics.

Attributes
----------------------
enable_enhanced_metrics: Specifies whether to enable enhanced metrics for the endpoint. Enhanced metrics provide utilization data at instance and container granularity. Container granularity is supported for Inference Components. The default is False.
metric_publish_frequency_in_seconds: The frequency, in seconds, at which utilization metrics are published to Amazon CloudWatch. The default is 60 seconds.
"""

enable_enhanced_metrics: Optional[bool] = Unassigned()
metric_publish_frequency_in_seconds: Optional[int] = Unassigned()


class RollingUpdatePolicy(Base):
"""
RollingUpdatePolicy
Expand Down Expand Up @@ -7786,12 +7801,12 @@ class PartnerAppMaintenanceConfig(Base):
class RoleGroupAssignment(Base):
"""
RoleGroupAssignment
Defines the mapping between an in-app role and the AWS IAM Identity Center group patterns that should be assigned to that role within the SageMaker Partner AI App.
Defines the mapping between an in-app role and the Amazon Web Services IAM Identity Center group patterns that should be assigned to that role within the SageMaker Partner AI App.

Attributes
----------------------
role_name: The name of the in-app role within the SageMaker Partner AI App. The specific roles available depend on the app type and version.
group_patterns: A list of AWS IAM Identity Center group patterns that should be assigned to the specified role. Group patterns support wildcard matching using \*.
group_patterns: A list of Amazon Web Services IAM Identity Center group patterns that should be assigned to the specified role. Group patterns support wildcard matching using \*.
"""

role_name: str
Expand Down
Loading