Skip to content

Commit b793419

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # src/sagemaker/serve/model_server/multi_model_server/inference.py # src/sagemaker/serve/model_server/torchserve/inference.py # src/sagemaker/serve/model_server/torchserve/xgboost_inference.py
2 parents 637bc2e + ae3cc1c commit b793419

File tree

27 files changed

+1161
-160
lines changed

27 files changed

+1161
-160
lines changed

CHANGELOG.md

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

3+
## v2.237.3 (2025-01-09)
4+
5+
### Bug Fixes and Other Changes
6+
7+
* pin metadata-version to 2.3
8+
* model server might have already done a serialization. honor that by not decoding the request again if it is not already bytes or bytestream
9+
* Disable jumpstart tests missing clean up logic
10+
* Jumpstart ap southeast 5
11+
* add autogluon 1.2
12+
* updated inference script to cover context
13+
* security update -> use sha256 instead of md5 for file hashing
14+
* Fix Flake8 Violations
15+
* Added parsing string support for situations where custom code might be used (ie. mlflow)
16+
* Updating Inference Optimization Validations
17+
318
## v2.237.2 (2024-12-17)
419

520
### Bug Fixes and Other Changes

VERSION

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

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,15 @@ pattern = "(?P<version>.+)"
7373
[tool.hatch.metadata.hooks.custom]
7474

7575
[tool.hatch.build.targets.wheel]
76+
core-metadata-version = "2.3"
7677
packages = ["src/sagemaker"]
7778
exclude = ["src/sagemaker/serve/model_server/triton/pack_conda_env.sh"]
7879

7980
[tool.hatch.build.targets.wheel.shared-scripts]
8081
"src/sagemaker/serve/model_server/triton/pack_conda_env.sh" = "pack_conda_env.sh"
8182

8283
[tool.hatch.build.targets.sdist]
84+
core-metadata-version = "2.3"
8385
only-include = [
8486
"/requirements/extras",
8587
"/src",

src/sagemaker/image_uri_config/autogluon.json

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"0.7": "0.7.0",
1313
"0.8": "0.8.2",
1414
"1.0": "1.0.0",
15-
"1.1": "1.1.1"
15+
"1.1": "1.1.1",
16+
"1.2": "1.2.0"
1617
},
1718
"versions": {
1819
"0.3.1": {
@@ -563,6 +564,47 @@
563564
"py_versions": [
564565
"py311"
565566
]
567+
},
568+
"1.2.0": {
569+
"registries": {
570+
"af-south-1": "626614931356",
571+
"il-central-1": "780543022126",
572+
"ap-east-1": "871362719292",
573+
"ap-northeast-1": "763104351884",
574+
"ap-northeast-2": "763104351884",
575+
"ap-northeast-3": "364406365360",
576+
"ap-south-1": "763104351884",
577+
"ap-southeast-1": "763104351884",
578+
"ap-southeast-2": "763104351884",
579+
"ap-southeast-3": "907027046896",
580+
"ap-southeast-4": "457447274322",
581+
"ca-central-1": "763104351884",
582+
"eu-central-1": "763104351884",
583+
"eu-north-1": "763104351884",
584+
"eu-west-1": "763104351884",
585+
"eu-west-2": "763104351884",
586+
"eu-west-3": "763104351884",
587+
"eu-south-1": "692866216735",
588+
"me-south-1": "217643126080",
589+
"sa-east-1": "763104351884",
590+
"us-east-1": "763104351884",
591+
"us-east-2": "763104351884",
592+
"us-gov-east-1": "446045086412",
593+
"us-gov-west-1": "442386744353",
594+
"us-iso-east-1": "886529160074",
595+
"us-isob-east-1": "094389454867",
596+
"us-west-1": "763104351884",
597+
"us-west-2": "763104351884",
598+
"ca-west-1": "204538143572"
599+
},
600+
"repository": "autogluon-training",
601+
"processors": [
602+
"cpu",
603+
"gpu"
604+
],
605+
"py_versions": [
606+
"py311"
607+
]
566608
}
567609
}
568610
},
@@ -575,7 +617,8 @@
575617
"0.7": "0.7.0",
576618
"0.8": "0.8.2",
577619
"1.0": "1.0.0",
578-
"1.1": "1.1.1"
620+
"1.1": "1.1.1",
621+
"1.2": "1.2.0"
579622
},
580623
"versions": {
581624
"0.3.1": {
@@ -1157,6 +1200,49 @@
11571200
"py_versions": [
11581201
"py311"
11591202
]
1203+
},
1204+
"1.2.0": {
1205+
"registries": {
1206+
"af-south-1": "626614931356",
1207+
"il-central-1": "780543022126",
1208+
"ap-east-1": "871362719292",
1209+
"ap-northeast-1": "763104351884",
1210+
"ap-northeast-2": "763104351884",
1211+
"ap-northeast-3": "364406365360",
1212+
"ap-south-1": "763104351884",
1213+
"ap-southeast-1": "763104351884",
1214+
"ap-southeast-2": "763104351884",
1215+
"ap-southeast-3": "907027046896",
1216+
"ap-southeast-4": "457447274322",
1217+
"ca-central-1": "763104351884",
1218+
"cn-north-1": "727897471807",
1219+
"cn-northwest-1": "727897471807",
1220+
"eu-central-1": "763104351884",
1221+
"eu-north-1": "763104351884",
1222+
"eu-west-1": "763104351884",
1223+
"eu-west-2": "763104351884",
1224+
"eu-west-3": "763104351884",
1225+
"eu-south-1": "692866216735",
1226+
"me-south-1": "217643126080",
1227+
"sa-east-1": "763104351884",
1228+
"us-east-1": "763104351884",
1229+
"us-east-2": "763104351884",
1230+
"us-gov-east-1": "446045086412",
1231+
"us-gov-west-1": "442386744353",
1232+
"us-iso-east-1": "886529160074",
1233+
"us-isob-east-1": "094389454867",
1234+
"us-west-1": "763104351884",
1235+
"us-west-2": "763104351884",
1236+
"ca-west-1": "204538143572"
1237+
},
1238+
"repository": "autogluon-inference",
1239+
"processors": [
1240+
"cpu",
1241+
"gpu"
1242+
],
1243+
"py_versions": [
1244+
"py311"
1245+
]
11601246
}
11611247
}
11621248
}

src/sagemaker/image_uri_config/huggingface-llm-neuronx.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"ap-southeast-1": "763104351884",
1919
"ap-southeast-2": "763104351884",
2020
"ap-southeast-4": "457447274322",
21+
"ap-southeast-5": "550225433462",
2122
"cn-north-1": "727897471807",
2223
"cn-northwest-1": "727897471807",
2324
"eu-central-1": "763104351884",
@@ -51,6 +52,7 @@
5152
"ap-southeast-1": "763104351884",
5253
"ap-southeast-2": "763104351884",
5354
"ap-southeast-4": "457447274322",
55+
"ap-southeast-5": "550225433462",
5456
"cn-north-1": "727897471807",
5557
"cn-northwest-1": "727897471807",
5658
"eu-central-1": "763104351884",
@@ -84,6 +86,7 @@
8486
"ap-southeast-1": "763104351884",
8587
"ap-southeast-2": "763104351884",
8688
"ap-southeast-4": "457447274322",
89+
"ap-southeast-5": "550225433462",
8790
"cn-north-1": "727897471807",
8891
"cn-northwest-1": "727897471807",
8992
"eu-central-1": "763104351884",
@@ -117,6 +120,7 @@
117120
"ap-southeast-1": "763104351884",
118121
"ap-southeast-2": "763104351884",
119122
"ap-southeast-4": "457447274322",
123+
"ap-southeast-5": "550225433462",
120124
"cn-north-1": "727897471807",
121125
"cn-northwest-1": "727897471807",
122126
"eu-central-1": "763104351884",
@@ -150,6 +154,7 @@
150154
"ap-southeast-1": "763104351884",
151155
"ap-southeast-2": "763104351884",
152156
"ap-southeast-4": "457447274322",
157+
"ap-southeast-5": "550225433462",
153158
"cn-north-1": "727897471807",
154159
"cn-northwest-1": "727897471807",
155160
"eu-central-1": "763104351884",
@@ -183,6 +188,7 @@
183188
"ap-southeast-1": "763104351884",
184189
"ap-southeast-2": "763104351884",
185190
"ap-southeast-4": "457447274322",
191+
"ap-southeast-5": "550225433462",
186192
"cn-north-1": "727897471807",
187193
"cn-northwest-1": "727897471807",
188194
"eu-central-1": "763104351884",
@@ -216,6 +222,7 @@
216222
"ap-southeast-1": "763104351884",
217223
"ap-southeast-2": "763104351884",
218224
"ap-southeast-4": "457447274322",
225+
"ap-southeast-5": "550225433462",
219226
"cn-north-1": "727897471807",
220227
"cn-northwest-1": "727897471807",
221228
"eu-central-1": "763104351884",
@@ -247,6 +254,7 @@
247254
"ap-southeast-1": "763104351884",
248255
"ap-southeast-2": "763104351884",
249256
"ap-southeast-4": "457447274322",
257+
"ap-southeast-5": "550225433462",
250258
"cn-north-1": "727897471807",
251259
"cn-northwest-1": "727897471807",
252260
"eu-central-1": "763104351884",
@@ -280,6 +288,7 @@
280288
"ap-southeast-1": "763104351884",
281289
"ap-southeast-2": "763104351884",
282290
"ap-southeast-4": "457447274322",
291+
"ap-southeast-5": "550225433462",
283292
"cn-north-1": "727897471807",
284293
"cn-northwest-1": "727897471807",
285294
"eu-central-1": "763104351884",
@@ -313,6 +322,7 @@
313322
"ap-southeast-1": "763104351884",
314323
"ap-southeast-2": "763104351884",
315324
"ap-southeast-4": "457447274322",
325+
"ap-southeast-5": "550225433462",
316326
"cn-north-1": "727897471807",
317327
"cn-northwest-1": "727897471807",
318328
"eu-central-1": "763104351884",

src/sagemaker/image_uri_config/huggingface-neuron.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"ap-southeast-1": "763104351884",
2424
"ap-southeast-2": "763104351884",
2525
"ap-southeast-4": "457447274322",
26+
"ap-southeast-5": "550225433462",
2627
"eu-central-1": "763104351884",
2728
"eu-central-2": "380420809688",
2829
"eu-south-2": "503227376785",

src/sagemaker/image_uri_config/huggingface-neuronx.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"ap-southeast-1": "763104351884",
2626
"ap-southeast-2": "763104351884",
2727
"ap-southeast-4": "457447274322",
28+
"ap-southeast-5": "550225433462",
2829
"cn-north-1": "727897471807",
2930
"cn-northwest-1": "727897471807",
3031
"eu-central-1": "763104351884",
@@ -65,6 +66,7 @@
6566
"ap-southeast-1": "763104351884",
6667
"ap-southeast-2": "763104351884",
6768
"ap-southeast-4": "457447274322",
69+
"ap-southeast-5": "550225433462",
6870
"cn-north-1": "727897471807",
6971
"cn-northwest-1": "727897471807",
7072
"eu-central-1": "763104351884",
@@ -105,6 +107,7 @@
105107
"ap-southeast-1": "763104351884",
106108
"ap-southeast-2": "763104351884",
107109
"ap-southeast-4": "457447274322",
110+
"ap-southeast-5": "550225433462",
108111
"cn-north-1": "727897471807",
109112
"cn-northwest-1": "727897471807",
110113
"eu-central-1": "763104351884",
@@ -162,6 +165,7 @@
162165
"ap-southeast-1": "763104351884",
163166
"ap-southeast-2": "763104351884",
164167
"ap-southeast-4": "457447274322",
168+
"ap-southeast-5": "550225433462",
165169
"ca-central-1": "763104351884",
166170
"cn-north-1": "727897471807",
167171
"cn-northwest-1": "727897471807",
@@ -214,6 +218,7 @@
214218
"ap-southeast-1": "763104351884",
215219
"ap-southeast-2": "763104351884",
216220
"ap-southeast-4": "457447274322",
221+
"ap-southeast-5": "550225433462",
217222
"ca-central-1": "763104351884",
218223
"cn-north-1": "727897471807",
219224
"cn-northwest-1": "727897471807",
@@ -267,6 +272,7 @@
267272
"ap-southeast-1": "763104351884",
268273
"ap-southeast-2": "763104351884",
269274
"ap-southeast-4": "457447274322",
275+
"ap-southeast-5": "550225433462",
270276
"ca-central-1": "763104351884",
271277
"cn-north-1": "727897471807",
272278
"cn-northwest-1": "727897471807",
@@ -314,6 +320,7 @@
314320
"ap-southeast-1": "763104351884",
315321
"ap-southeast-2": "763104351884",
316322
"ap-southeast-4": "457447274322",
323+
"ap-southeast-5": "550225433462",
317324
"ca-central-1": "763104351884",
318325
"cn-north-1": "727897471807",
319326
"cn-northwest-1": "727897471807",

src/sagemaker/image_uri_config/huggingface-training-compiler.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"ap-southeast-2": "763104351884",
7070
"ap-southeast-3": "907027046896",
7171
"ap-southeast-4": "457447274322",
72+
"ap-southeast-5": "550225433462",
7273
"ca-central-1": "763104351884",
7374
"eu-central-1": "763104351884",
7475
"eu-central-2": "380420809688",
@@ -109,6 +110,7 @@
109110
"ap-southeast-2": "763104351884",
110111
"ap-southeast-3": "907027046896",
111112
"ap-southeast-4": "457447274322",
113+
"ap-southeast-5": "550225433462",
112114
"ca-central-1": "763104351884",
113115
"eu-central-1": "763104351884",
114116
"eu-central-2": "380420809688",
@@ -154,6 +156,7 @@
154156
"ap-southeast-2": "763104351884",
155157
"ap-southeast-3": "907027046896",
156158
"ap-southeast-4": "457447274322",
159+
"ap-southeast-5": "550225433462",
157160
"ca-central-1": "763104351884",
158161
"eu-central-1": "763104351884",
159162
"eu-central-2": "380420809688",

src/sagemaker/jumpstart/hub/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def construct_hub_model_reference_arn_from_inputs(
106106
info = get_info_from_hub_resource_arn(hub_arn)
107107
arn = (
108108
f"arn:{info.partition}:sagemaker:{info.region}:{info.account_id}:hub-content/"
109-
f"{info.hub_name}/{HubContentType.MODEL_REFERENCE}/{model_name}/{version}"
109+
f"{info.hub_name}/{HubContentType.MODEL_REFERENCE.value}/{model_name}/{version}"
110110
)
111111

112112
return arn

src/sagemaker/modules/local_core/local_container.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ class _LocalContainer(BaseModel):
108108
container_entrypoint: Optional[List[str]]
109109
container_arguments: Optional[List[str]]
110110

111+
_temporary_folders: List[str] = []
112+
111113
def model_post_init(self, __context: Any):
112114
"""Post init method to perform custom validation and set default values."""
113115
self.hosts = [f"algo-{i}" for i in range(1, self.instance_count + 1)]
@@ -201,6 +203,13 @@ def train(
201203

202204
# Print our Job Complete line
203205
logger.info("Local training job completed, output artifacts saved to %s", artifacts)
206+
207+
shutil.rmtree(os.path.join(self.container_root, "input"))
208+
shutil.rmtree(os.path.join(self.container_root, "shared"))
209+
for host in self.hosts:
210+
shutil.rmtree(os.path.join(self.container_root, host))
211+
for folder in self._temporary_folders:
212+
shutil.rmtree(os.path.join(self.container_root, folder))
204213
return artifacts
205214

206215
def retrieve_artifacts(
@@ -540,6 +549,7 @@ def _get_data_source_local_path(self, data_source: DataSource):
540549
uri = data_source.s3_data_source.s3_uri
541550
parsed_uri = urlparse(uri)
542551
local_dir = TemporaryDirectory(prefix=os.path.join(self.container_root + "/")).name
552+
self._temporary_folders.append(local_dir)
543553
download_folder(parsed_uri.netloc, parsed_uri.path, local_dir, self.sagemaker_session)
544554
return local_dir
545555
else:

0 commit comments

Comments
 (0)