Skip to content

Commit 626fc97

Browse files
authored
Merge branch 'master' into hf-tgi
2 parents 8c9fc41 + 46ac17f commit 626fc97

File tree

23 files changed

+414
-23
lines changed

23 files changed

+414
-23
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Changelog
22

3+
## v2.251.1 (2025-08-29)
4+
5+
### Bug Fixes and Other Changes
6+
7+
* chore: onboard tei 1.8.0
8+
9+
## v2.251.0 (2025-08-21)
10+
11+
### Features
12+
13+
* support pipeline versioning
14+
15+
### Bug Fixes and Other Changes
16+
17+
* GPT OSS Hotfix
18+
* dockerfile stuck on interactive shell
19+
* add sleep for model deployment
20+
21+
## v2.250.0 (2025-08-08)
22+
23+
### Features
24+
25+
* Add support for InstancePlacementConfig in Estimator for training jobs running on ultraserver capacity
26+
27+
### Bug Fixes and Other Changes
28+
29+
* Add more constraints to test requirements
30+
331
## v2.249.0 (2025-07-31)
432

533
### Features

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.249.1.dev0
1+
2.251.2.dev0

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ classifiers = [
3232
]
3333
dependencies = [
3434
"attrs>=24,<26",
35-
"boto3>=1.35.36,<2.0",
35+
"boto3>=1.39.5,<2.0",
3636
"cloudpickle>=2.2.1",
3737
"docker",
3838
"fastapi",

requirements/extras/test_requirements.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ PyYAML>=6.0.1
3232
xgboost>=1.6.2,<=1.7.6
3333
pillow>=10.0.1,<=11
3434
opentelemetry-proto==1.27.0
35+
opentelemetry_exporter_otlp==1.27.0
3536
protobuf==4.25.8
3637
tensorboard>=2.16.2,<=2.18.0
3738
transformers==4.48.0
@@ -53,3 +54,10 @@ sagemaker-mlflow>=0.1.0
5354
deepdiff>=8.0.0
5455
orderly-set<5.4.0
5556
lexicon
57+
networkx==3.2.1
58+
mypy-boto3-appflow==1.35.39
59+
mypy-boto3-rds==1.35.72
60+
mypy-boto3-redshift-data==1.35.51
61+
mypy-boto3-s3==1.35.76
62+
mypy-extensions==1.0.0
63+
mypy==1.9.0

src/sagemaker/estimator.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ def __init__(
186186
enable_remote_debug: Optional[Union[bool, PipelineVariable]] = None,
187187
enable_session_tag_chaining: Optional[Union[bool, PipelineVariable]] = None,
188188
training_plan: Optional[Union[str, PipelineVariable]] = None,
189+
instance_placement_config: Optional[Dict] = None,
189190
**kwargs,
190191
):
191192
"""Initialize an ``EstimatorBase`` instance.
@@ -560,6 +561,21 @@ def __init__(
560561
Specifies whether SessionTagChaining is enabled for the training job.
561562
training_plan (str or PipelineVariable): Optional.
562563
Specifies which training plan arn to use for the training job
564+
instance_placement_config (dict): Optional.
565+
Specifies UltraServer placement configuration for the training job
566+
567+
.. code:: python
568+
569+
instance_placement_config={
570+
"EnableMultipleJobs": True,
571+
"PlacementSpecifications":[
572+
{
573+
"UltraServerId": "ultraserver-1",
574+
"InstanceCount": "2"
575+
}
576+
]
577+
}
578+
563579
"""
564580
instance_count = renamed_kwargs(
565581
"train_instance_count", "instance_count", instance_count, kwargs
@@ -813,6 +829,8 @@ def __init__(
813829

814830
self.training_plan = training_plan
815831

832+
self.instance_placement_config = instance_placement_config
833+
816834
# Internal flag
817835
self._is_output_path_set_from_default_bucket_and_prefix = False
818836

@@ -1997,6 +2015,11 @@ def _prepare_init_params_from_job_description(cls, job_details, model_channel_na
19972015
if "TrainingPlanArn" in job_details["ResourceConfig"]:
19982016
init_params["training_plan"] = job_details["ResourceConfig"]["TrainingPlanArn"]
19992017

2018+
if "InstancePlacementConfig" in job_details["ResourceConfig"]:
2019+
init_params["instance_placement_config"] = job_details["ResourceConfig"][
2020+
"InstancePlacementConfig"
2021+
]
2022+
20002023
has_hps = "HyperParameters" in job_details
20012024
init_params["hyperparameters"] = job_details["HyperParameters"] if has_hps else {}
20022025

@@ -2882,6 +2905,7 @@ def __init__(
28822905
enable_remote_debug: Optional[Union[bool, PipelineVariable]] = None,
28832906
enable_session_tag_chaining: Optional[Union[bool, PipelineVariable]] = None,
28842907
training_plan: Optional[Union[str, PipelineVariable]] = None,
2908+
instance_placement_config: Optional[Dict] = None,
28852909
**kwargs,
28862910
):
28872911
"""Initialize an ``Estimator`` instance.
@@ -3249,6 +3273,20 @@ def __init__(
32493273
Specifies whether SessionTagChaining is enabled for the training job
32503274
training_plan (str or PipelineVariable): Optional.
32513275
Specifies which training plan arn to use for the training job
3276+
instance_placement_config (dict): Optional.
3277+
Specifies UltraServer placement configuration for the training job
3278+
3279+
.. code:: python
3280+
3281+
instance_placement_config={
3282+
"EnableMultipleJobs": True,
3283+
"PlacementSpecifications":[
3284+
{
3285+
"UltraServerId": "ultraserver-1",
3286+
"InstanceCount": "2"
3287+
}
3288+
]
3289+
}
32523290
"""
32533291
self.image_uri = image_uri
32543292
self._hyperparameters = hyperparameters.copy() if hyperparameters else {}
@@ -3303,6 +3341,7 @@ def __init__(
33033341
enable_remote_debug=enable_remote_debug,
33043342
enable_session_tag_chaining=enable_session_tag_chaining,
33053343
training_plan=training_plan,
3344+
instance_placement_config=instance_placement_config,
33063345
**kwargs,
33073346
)
33083347

src/sagemaker/image_uri_config/huggingface-tei-cpu.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,53 @@
197197
"container_version": {
198198
"cpu": "ubuntu22.04"
199199
}
200+
},
201+
"1.8.0":{
202+
"py_versions": [
203+
"py310"
204+
],
205+
"registries": {
206+
"af-south-1": "510948584623",
207+
"ap-east-1": "651117190479",
208+
"ap-northeast-1": "354813040037",
209+
"ap-northeast-2": "366743142698",
210+
"ap-northeast-3": "867004704886",
211+
"ap-south-1": "720646828776",
212+
"ap-south-2": "628508329040",
213+
"ap-southeast-1": "121021644041",
214+
"ap-southeast-2": "783357654285",
215+
"ap-southeast-3": "951798379941",
216+
"ap-southeast-4": "106583098589",
217+
"ca-central-1": "341280168497",
218+
"ca-west-1": "190319476487",
219+
"cn-north-1": "450853457545",
220+
"cn-northwest-1": "451049120500",
221+
"eu-central-1": "492215442770",
222+
"eu-central-2": "680994064768",
223+
"eu-north-1": "662702820516",
224+
"eu-south-1": "978288397137",
225+
"eu-south-2": "104374241257",
226+
"eu-west-1": "141502667606",
227+
"eu-west-2": "764974769150",
228+
"eu-west-3": "659782779980",
229+
"il-central-1": "898809789911",
230+
"me-central-1": "272398656194",
231+
"me-south-1": "801668240914",
232+
"sa-east-1": "737474898029",
233+
"us-east-1": "683313688378",
234+
"us-east-2": "257758044811",
235+
"us-gov-east-1": "237065988967",
236+
"us-gov-west-1": "414596584902",
237+
"us-iso-east-1": "833128469047",
238+
"us-isob-east-1": "281123927165",
239+
"us-west-1": "746614075791",
240+
"us-west-2": "246618743249"
241+
},
242+
"tag_prefix": "2.0.1-tei1.8.0",
243+
"repository": "tei-cpu",
244+
"container_version": {
245+
"cpu": "ubuntu22.04"
246+
}
200247
}
201248
}
202249
}

src/sagemaker/image_uri_config/huggingface-tei.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,53 @@
197197
"container_version": {
198198
"gpu": "cu122-ubuntu22.04"
199199
}
200+
},
201+
"1.8.0": {
202+
"py_versions": [
203+
"py310"
204+
],
205+
"registries": {
206+
"af-south-1": "510948584623",
207+
"ap-east-1": "651117190479",
208+
"ap-northeast-1": "354813040037",
209+
"ap-northeast-2": "366743142698",
210+
"ap-northeast-3": "867004704886",
211+
"ap-south-1": "720646828776",
212+
"ap-south-2": "628508329040",
213+
"ap-southeast-1": "121021644041",
214+
"ap-southeast-2": "783357654285",
215+
"ap-southeast-3": "951798379941",
216+
"ap-southeast-4": "106583098589",
217+
"ca-central-1": "341280168497",
218+
"ca-west-1": "190319476487",
219+
"cn-north-1": "450853457545",
220+
"cn-northwest-1": "451049120500",
221+
"eu-central-1": "492215442770",
222+
"eu-central-2": "680994064768",
223+
"eu-north-1": "662702820516",
224+
"eu-south-1": "978288397137",
225+
"eu-south-2": "104374241257",
226+
"eu-west-1": "141502667606",
227+
"eu-west-2": "764974769150",
228+
"eu-west-3": "659782779980",
229+
"il-central-1": "898809789911",
230+
"me-central-1": "272398656194",
231+
"me-south-1": "801668240914",
232+
"sa-east-1": "737474898029",
233+
"us-east-1": "683313688378",
234+
"us-east-2": "257758044811",
235+
"us-gov-east-1": "237065988967",
236+
"us-gov-west-1": "414596584902",
237+
"us-iso-east-1": "833128469047",
238+
"us-isob-east-1": "281123927165",
239+
"us-west-1": "746614075791",
240+
"us-west-2": "246618743249"
241+
},
242+
"tag_prefix": "2.0.1-tei1.8.0",
243+
"repository": "tei",
244+
"container_version": {
245+
"gpu": "cu122-ubuntu22.04"
246+
}
200247
}
201248
}
202249
}

src/sagemaker/job.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def _load_config(inputs, estimator, expand_role=True, validate_uri=True):
8585
estimator.volume_kms_key,
8686
estimator.keep_alive_period_in_seconds,
8787
estimator.training_plan,
88+
estimator.instance_placement_config,
8889
)
8990
stop_condition = _Job._prepare_stop_condition(estimator.max_run, estimator.max_wait)
9091
vpc_config = estimator.get_vpc_config()
@@ -333,6 +334,7 @@ def _prepare_resource_config(
333334
volume_kms_key,
334335
keep_alive_period_in_seconds,
335336
training_plan,
337+
instance_placement_config=None,
336338
):
337339
"""Placeholder docstring"""
338340
resource_config = {
@@ -360,6 +362,8 @@ def _prepare_resource_config(
360362
resource_config["InstanceType"] = instance_type
361363
if training_plan is not None:
362364
resource_config["TrainingPlanArn"] = training_plan
365+
if instance_placement_config is not None:
366+
resource_config["InstancePlacementConfig"] = instance_placement_config
363367

364368
return resource_config
365369

src/sagemaker/jumpstart/estimator.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def __init__(
119119
config_name: Optional[str] = None,
120120
enable_session_tag_chaining: Optional[Union[bool, PipelineVariable]] = None,
121121
training_plan: Optional[Union[str, PipelineVariable]] = None,
122+
instance_placement_config: Optional[Dict] = None,
122123
):
123124
"""Initializes a ``JumpStartEstimator``.
124125
@@ -517,6 +518,20 @@ def __init__(
517518
Specifies whether SessionTagChaining is enabled for the training job
518519
training_plan (str or PipelineVariable): Optional.
519520
Specifies which training plan arn to use for the training job
521+
instance_placement_config (dict): Optional.
522+
Specifies UltraServer placement configuration for the training job
523+
524+
.. code:: python
525+
526+
instance_placement_config={
527+
"EnableMultipleJobs": True,
528+
"PlacementSpecifications":[
529+
{
530+
"UltraServerId": "ultraserver-1",
531+
"InstanceCount": "2"
532+
}
533+
]
534+
}
520535
521536
Raises:
522537
ValueError: If the model ID is not recognized by JumpStart.
@@ -606,6 +621,7 @@ def _validate_model_id_and_get_type_hook():
606621
config_name=config_name,
607622
enable_session_tag_chaining=enable_session_tag_chaining,
608623
training_plan=training_plan,
624+
instance_placement_config=instance_placement_config,
609625
)
610626

611627
self.hub_arn = estimator_init_kwargs.hub_arn

src/sagemaker/jumpstart/factory/estimator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ def get_init_kwargs(
145145
config_name: Optional[str] = None,
146146
enable_session_tag_chaining: Optional[Union[bool, PipelineVariable]] = None,
147147
training_plan: Optional[Union[str, PipelineVariable]] = None,
148+
instance_placement_config: Optional[Dict] = None,
148149
) -> JumpStartEstimatorInitKwargs:
149150
"""Returns kwargs required to instantiate `sagemaker.estimator.Estimator` object."""
150151

@@ -207,6 +208,7 @@ def get_init_kwargs(
207208
config_name=config_name,
208209
enable_session_tag_chaining=enable_session_tag_chaining,
209210
training_plan=training_plan,
211+
instance_placement_config=instance_placement_config,
210212
)
211213

212214
estimator_init_kwargs, orig_session = _set_temp_sagemaker_session_if_not_set(

0 commit comments

Comments
 (0)