Skip to content

Commit c58cb24

Browse files
Merge branch 'master' into curated_hub_improvements
2 parents 33e83d8 + 1b454ca commit c58cb24

File tree

7 files changed

+165
-9
lines changed

7 files changed

+165
-9
lines changed

CHANGELOG.md

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

3+
## v2.224.4 (2024-07-04)
4+
5+
### Bug Fixes and Other Changes
6+
7+
* allow for inf spec and server override to be passed
8+
9+
## v2.224.3 (2024-07-03)
10+
11+
### Bug Fixes and Other Changes
12+
13+
* Upgrade local dependencies
14+
* Improve docstrings for estimator tags
15+
316
## v2.224.2 (2024-06-27)
417

518
### Bug Fixes and Other Changes

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.224.3.dev0
1+
2.224.5.dev0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
urllib3>=1.26.8,<3.0.0
2-
docker>=5.0.2,<7.0.0
2+
docker>=5.0.2,<8.0.0
33
PyYAML>=5.4.1,<7

src/sagemaker/image_uri_config/autogluon.json

Lines changed: 86 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"0.7": "0.7.0",
1313
"0.8": "0.8.2",
1414
"1.0": "1.0.0",
15-
"1.1": "1.1.0"
15+
"1.1": "1.1.1"
1616
},
1717
"versions": {
1818
"0.3.1": {
@@ -522,6 +522,47 @@
522522
"py_versions": [
523523
"py310"
524524
]
525+
},
526+
"1.1.1": {
527+
"registries": {
528+
"af-south-1": "626614931356",
529+
"il-central-1": "780543022126",
530+
"ap-east-1": "871362719292",
531+
"ap-northeast-1": "763104351884",
532+
"ap-northeast-2": "763104351884",
533+
"ap-northeast-3": "364406365360",
534+
"ap-south-1": "763104351884",
535+
"ap-southeast-1": "763104351884",
536+
"ap-southeast-2": "763104351884",
537+
"ap-southeast-3": "907027046896",
538+
"ap-southeast-4": "457447274322",
539+
"ca-central-1": "763104351884",
540+
"eu-central-1": "763104351884",
541+
"eu-north-1": "763104351884",
542+
"eu-west-1": "763104351884",
543+
"eu-west-2": "763104351884",
544+
"eu-west-3": "763104351884",
545+
"eu-south-1": "692866216735",
546+
"me-south-1": "217643126080",
547+
"sa-east-1": "763104351884",
548+
"us-east-1": "763104351884",
549+
"us-east-2": "763104351884",
550+
"us-gov-east-1": "446045086412",
551+
"us-gov-west-1": "442386744353",
552+
"us-iso-east-1": "886529160074",
553+
"us-isob-east-1": "094389454867",
554+
"us-west-1": "763104351884",
555+
"us-west-2": "763104351884",
556+
"ca-west-1": "204538143572"
557+
},
558+
"repository": "autogluon-training",
559+
"processors": [
560+
"cpu",
561+
"gpu"
562+
],
563+
"py_versions": [
564+
"py311"
565+
]
525566
}
526567
}
527568
},
@@ -534,7 +575,7 @@
534575
"0.7": "0.7.0",
535576
"0.8": "0.8.2",
536577
"1.0": "1.0.0",
537-
"1.1": "1.1.0"
578+
"1.1": "1.1.1"
538579
},
539580
"versions": {
540581
"0.3.1": {
@@ -1073,6 +1114,49 @@
10731114
"py_versions": [
10741115
"py310"
10751116
]
1117+
},
1118+
"1.1.1": {
1119+
"registries": {
1120+
"af-south-1": "626614931356",
1121+
"il-central-1": "780543022126",
1122+
"ap-east-1": "871362719292",
1123+
"ap-northeast-1": "763104351884",
1124+
"ap-northeast-2": "763104351884",
1125+
"ap-northeast-3": "364406365360",
1126+
"ap-south-1": "763104351884",
1127+
"ap-southeast-1": "763104351884",
1128+
"ap-southeast-2": "763104351884",
1129+
"ap-southeast-3": "907027046896",
1130+
"ap-southeast-4": "457447274322",
1131+
"ca-central-1": "763104351884",
1132+
"cn-north-1": "727897471807",
1133+
"cn-northwest-1": "727897471807",
1134+
"eu-central-1": "763104351884",
1135+
"eu-north-1": "763104351884",
1136+
"eu-west-1": "763104351884",
1137+
"eu-west-2": "763104351884",
1138+
"eu-west-3": "763104351884",
1139+
"eu-south-1": "692866216735",
1140+
"me-south-1": "217643126080",
1141+
"sa-east-1": "763104351884",
1142+
"us-east-1": "763104351884",
1143+
"us-east-2": "763104351884",
1144+
"us-gov-east-1": "446045086412",
1145+
"us-gov-west-1": "442386744353",
1146+
"us-iso-east-1": "886529160074",
1147+
"us-isob-east-1": "094389454867",
1148+
"us-west-1": "763104351884",
1149+
"us-west-2": "763104351884",
1150+
"ca-west-1": "204538143572"
1151+
},
1152+
"repository": "autogluon-inference",
1153+
"processors": [
1154+
"cpu",
1155+
"gpu"
1156+
],
1157+
"py_versions": [
1158+
"py311"
1159+
]
10761160
}
10771161
}
10781162
}

src/sagemaker/image_uri_config/pytorch.json

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,8 @@
11071107
"1.12": "1.12.1",
11081108
"2.0": "2.0.1",
11091109
"2.1": "2.1.0",
1110-
"2.2": "2.2.1"
1110+
"2.2": "2.2.1",
1111+
"2.3": "2.3.0"
11111112
},
11121113
"versions": {
11131114
"1.12.1": {
@@ -1331,6 +1332,50 @@
13311332
"us-west-2": "763104351884"
13321333
},
13331334
"repository": "pytorch-inference-graviton"
1335+
},
1336+
"2.3.0": {
1337+
"container_version": {
1338+
"cpu": "ubuntu20.04"
1339+
},
1340+
"py_versions": [
1341+
"py311"
1342+
],
1343+
"registries": {
1344+
"af-south-1": "626614931356",
1345+
"ap-east-1": "871362719292",
1346+
"ap-northeast-1": "763104351884",
1347+
"ap-northeast-2": "763104351884",
1348+
"ap-northeast-3": "364406365360",
1349+
"ap-south-1": "763104351884",
1350+
"ap-south-2": "772153158452",
1351+
"ap-southeast-1": "763104351884",
1352+
"ap-southeast-2": "763104351884",
1353+
"ap-southeast-3": "907027046896",
1354+
"ap-southeast-4": "457447274322",
1355+
"ca-central-1": "763104351884",
1356+
"ca-west-1": "204538143572",
1357+
"cn-north-1": "727897471807",
1358+
"cn-northwest-1": "727897471807",
1359+
"eu-central-1": "763104351884",
1360+
"eu-central-2": "380420809688",
1361+
"eu-north-1": "763104351884",
1362+
"eu-south-1": "692866216735",
1363+
"eu-south-2": "503227376785",
1364+
"eu-west-1": "763104351884",
1365+
"eu-west-2": "763104351884",
1366+
"eu-west-3": "763104351884",
1367+
"il-central-1": "780543022126",
1368+
"me-central-1": "914824155844",
1369+
"me-south-1": "217643126080",
1370+
"sa-east-1": "763104351884",
1371+
"us-east-1": "763104351884",
1372+
"us-east-2": "763104351884",
1373+
"us-gov-east-1": "446045086412",
1374+
"us-gov-west-1": "442386744353",
1375+
"us-west-1": "763104351884",
1376+
"us-west-2": "763104351884"
1377+
},
1378+
"repository": "pytorch-inference-graviton"
13341379
}
13351380
}
13361381
},

src/sagemaker/serve/builder/model_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,8 +881,8 @@ def _build_for_model_server(self): # pylint: disable=R0911, R1710
881881
if self.model_metadata:
882882
mlflow_path = self.model_metadata.get(MLFLOW_MODEL_PATH)
883883

884-
if not self.model and not mlflow_path:
885-
raise ValueError("Missing required parameter `model` or 'ml_flow' path")
884+
if not self.model and not mlflow_path and not self.inference_spec:
885+
raise ValueError("Missing required parameter `model` or 'ml_flow' path or inf_spec")
886886

887887
if self.model_server == ModelServer.TORCHSERVE:
888888
return self._build_for_torchserve()

tests/unit/sagemaker/serve/builder/test_model_builder.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def test_model_server_override_djl_without_model_or_mlflow(self, mock_serve_sett
147147
)
148148
self.assertRaisesRegex(
149149
Exception,
150-
"Missing required parameter `model` or 'ml_flow' path",
150+
"Missing required parameter `model` or 'ml_flow' path or inf_spec",
151151
builder.build,
152152
Mode.SAGEMAKER_ENDPOINT,
153153
mock_role_arn,
@@ -168,12 +168,26 @@ def test_model_server_override_torchserve_with_model(
168168

169169
mock_build_for_ts.assert_called_once()
170170

171+
@patch("sagemaker.serve.builder.model_builder._ServeSettings")
172+
@patch("sagemaker.serve.builder.model_builder.ModelBuilder._build_for_torchserve")
173+
def test_model_server_override_torchserve_with_inf_spec(
174+
self, mock_build_for_ts, mock_serve_settings
175+
):
176+
mock_setting_object = mock_serve_settings.return_value
177+
mock_setting_object.role_arn = mock_role_arn
178+
mock_setting_object.s3_model_data_url = mock_s3_model_data_url
179+
180+
builder = ModelBuilder(model_server=ModelServer.TORCHSERVE, inference_spec="some value")
181+
builder.build(sagemaker_session=mock_session)
182+
183+
mock_build_for_ts.assert_called_once()
184+
171185
@patch("sagemaker.serve.builder.model_builder._ServeSettings")
172186
def test_model_server_override_torchserve_without_model_or_mlflow(self, mock_serve_settings):
173187
builder = ModelBuilder(model_server=ModelServer.TORCHSERVE)
174188
self.assertRaisesRegex(
175189
Exception,
176-
"Missing required parameter `model` or 'ml_flow' path",
190+
"Missing required parameter `model` or 'ml_flow' path or inf_spec",
177191
builder.build,
178192
Mode.SAGEMAKER_ENDPOINT,
179193
mock_role_arn,

0 commit comments

Comments
 (0)