Skip to content

Commit ebdb3dd

Browse files
authored
Merge branch 'master' into transform_ami_version_v2
2 parents abffbd8 + ad190b9 commit ebdb3dd

15 files changed

Lines changed: 508 additions & 244 deletions

File tree

sagemaker-core/src/sagemaker/core/helper/pipeline_variable.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,7 @@ def __get_pydantic_core_schema__(cls, source_type, handler):
8080

8181
# This is a type that could be either string or pipeline variable
8282
StrPipeVar = Union[str, PipelineVariable]
83+
# This is a type that could be either integer or pipeline variable
84+
IntPipeVar = Union[int, PipelineVariable]
85+
# This is a type that could be either boolean or pipeline variable
86+
BoolPipeVar = Union[bool, PipelineVariable]

sagemaker-core/src/sagemaker/core/image_uri_config/djl-neuronx.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"cn-northwest-1": "727897471807",
1919
"eu-central-1": "763104351884",
2020
"eu-central-2": "380420809688",
21+
"eu-isoe-west-1": "371248457586",
2122
"eu-west-1": "763104351884",
2223
"eu-west-3": "763104351884",
2324
"mx-central-1": "637423239942",
@@ -26,6 +27,10 @@
2627
"us-east-2": "763104351884",
2728
"us-gov-east-1": "446045086412",
2829
"us-gov-west-1": "442386744353",
30+
"us-iso-east-1": "886529160074",
31+
"us-isob-east-1": "094389454867",
32+
"us-isof-east-1": "303241398832",
33+
"us-isof-south-1": "454834333376",
2934
"us-west-2": "763104351884",
3035
"ca-west-1": "204538143572",
3136
"eu-north-1": "763104351884",

sagemaker-core/src/sagemaker/core/jumpstart/region_config.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@
119119
"gated_content_bucket": "jumpstart-private-cache-prod-eu-west-3",
120120
"neo_content_bucket": "sagemaker-sd-models-prod-eu-west-3"
121121
},
122+
"eu-isoe-west-1": {
123+
"content_bucket": "jumpstart-cache-prod-eu-isoe-west-1",
124+
"gated_content_bucket": "jumpstart-private-cache-prod-eu-isoe-west-1"
125+
},
122126
"il-central-1": {
123127
"content_bucket": "jumpstart-cache-prod-il-central-1",
124128
"gated_content_bucket": "jumpstart-private-cache-prod-il-central-1"
@@ -158,6 +162,22 @@
158162
"content_bucket": "jumpstart-cache-prod-us-gov-west-1",
159163
"gated_content_bucket": "jumpstart-private-cache-prod-us-gov-west-1"
160164
},
165+
"us-iso-east-1": {
166+
"content_bucket": "jumpstart-cache-prod-us-iso-east-1",
167+
"gated_content_bucket": "jumpstart-private-cache-prod-us-iso-east-1"
168+
},
169+
"us-isob-east-1": {
170+
"content_bucket": "jumpstart-cache-prod-us-isob-east-1",
171+
"gated_content_bucket": "jumpstart-private-cache-prod-us-isob-east-1"
172+
},
173+
"us-isof-east-1": {
174+
"content_bucket": "jumpstart-cache-prod-us-isof-east-1",
175+
"gated_content_bucket": "jumpstart-private-cache-prod-us-isof-east-1"
176+
},
177+
"us-isof-south-1": {
178+
"content_bucket": "jumpstart-cache-prod-us-isof-south-1",
179+
"gated_content_bucket": "jumpstart-private-cache-prod-us-isof-south-1"
180+
},
161181
"us-west-1": {
162182
"content_bucket": "jumpstart-cache-prod-us-west-1",
163183
"gated_content_bucket": "jumpstart-private-cache-prod-us-west-1",

sagemaker-core/src/sagemaker/core/shapes/shapes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from pydantic import BaseModel, ConfigDict, Field
1717
from typing import List, Dict, Optional, Any, Union
1818
from sagemaker.core.utils.utils import Unassigned
19-
from sagemaker.core.helper.pipeline_variable import StrPipeVar
19+
from sagemaker.core.helper.pipeline_variable import StrPipeVar, IntPipeVar, BoolPipeVar
2020

2121
# Suppress Pydantic warnings about field names shadowing parent attributes
2222
warnings.filterwarnings("ignore", message=".*shadows an attribute.*")
@@ -1324,10 +1324,10 @@ class ResourceConfig(Base):
13241324
"""
13251325

13261326
instance_type: Optional[StrPipeVar] = Unassigned()
1327-
instance_count: Optional[int] = Unassigned()
1328-
volume_size_in_gb: Optional[int] = Unassigned()
1327+
instance_count: Optional[IntPipeVar] = Unassigned()
1328+
volume_size_in_gb: Optional[IntPipeVar] = Unassigned()
13291329
volume_kms_key_id: Optional[StrPipeVar] = Unassigned()
1330-
keep_alive_period_in_seconds: Optional[int] = Unassigned()
1330+
keep_alive_period_in_seconds: Optional[IntPipeVar] = Unassigned()
13311331
capacity_reservation_ids: Optional[List[StrPipeVar]] = Unassigned()
13321332
instance_groups: Optional[List[InstanceGroup]] = Unassigned()
13331333
capacity_schedules_config: Optional[CapacitySchedulesConfig] = Unassigned()

sagemaker-core/src/sagemaker/core/training/configs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from pydantic import BaseModel, model_validator, ConfigDict
2626

2727
import sagemaker.core.shapes as shapes
28-
from sagemaker.core.helper.pipeline_variable import StrPipeVar
28+
from sagemaker.core.helper.pipeline_variable import StrPipeVar, IntPipeVar, BoolPipeVar
2929

3030
# TODO: Can we add custom logic to some of these to set better defaults?
3131
from sagemaker.core.shapes import (
@@ -158,23 +158,23 @@ class Compute(shapes.ResourceConfig):
158158
instance_type (Optional[StrPipeVar]):
159159
The ML compute instance type. For information about available instance types,
160160
see https://aws.amazon.com/sagemaker/pricing/.
161-
instance_count (Optional[int]): The number of ML compute instances to use. For distributed
161+
instance_count (Optional[IntPipeVar]): The number of ML compute instances to use. For distributed
162162
training, provide a value greater than 1.
163-
volume_size_in_gb (Optional[int]):
163+
volume_size_in_gb (Optional[IntPipeVar]):
164164
The size of the ML storage volume that you want to provision. ML storage volumes store
165165
model artifacts and incremental states. Training algorithms might also use the ML
166166
storage volume for scratch space. Default: 30
167167
volume_kms_key_id (Optional[StrPipeVar]):
168168
The Amazon Web Services KMS key that SageMaker uses to encrypt data on the storage
169169
volume attached to the ML compute instance(s) that run the training job.
170-
keep_alive_period_in_seconds (Optional[int]):
170+
keep_alive_period_in_seconds (Optional[IntPipeVar]):
171171
The duration of time in seconds to retain configured resources in a warm pool for
172172
subsequent training jobs.
173173
instance_groups (Optional[List[InstanceGroup]]):
174174
A list of instance groups for heterogeneous clusters to be used in the training job.
175175
training_plan_arn (Optional[StrPipeVar]):
176176
The Amazon Resource Name (ARN) of the training plan to use for this resource configuration.
177-
enable_managed_spot_training (Optional[bool]):
177+
enable_managed_spot_training (Optional[BoolPipeVar]):
178178
To train models using managed spot training, choose True. Managed spot training
179179
provides a fully managed and scalable infrastructure for training machine learning
180180
models. this option is useful when training jobs can be interrupted and when there

0 commit comments

Comments
 (0)