@@ -167,6 +167,7 @@ def _retrieve_default_serializer(
167
167
def _retrieve_deserializer_options (
168
168
model_id : str ,
169
169
model_version : str ,
170
+ hub_arn : Optional [str ],
170
171
region : Optional [str ],
171
172
tolerate_vulnerable_model : bool = False ,
172
173
tolerate_deprecated_model : bool = False ,
@@ -179,6 +180,8 @@ def _retrieve_deserializer_options(
179
180
retrieve the supported deserializers.
180
181
model_version (str): Version of the JumpStart model for which to retrieve the
181
182
supported deserializers.
183
+ hub_arn (str): The arn of the SageMaker Hub for which to retrieve
184
+ model details from. (default: None).
182
185
region (Optional[str]): Region for which to retrieve deserializer options.
183
186
tolerate_vulnerable_model (bool): True if vulnerable versions of model
184
187
specifications should be tolerated (exception not raised). If False, raises an
@@ -198,6 +201,7 @@ def _retrieve_deserializer_options(
198
201
supported_accept_types = _retrieve_supported_accept_types (
199
202
model_id = model_id ,
200
203
model_version = model_version ,
204
+ hub_arn = hub_arn ,
201
205
region = region ,
202
206
tolerate_vulnerable_model = tolerate_vulnerable_model ,
203
207
tolerate_deprecated_model = tolerate_deprecated_model ,
@@ -224,6 +228,7 @@ def _retrieve_deserializer_options(
224
228
def _retrieve_serializer_options (
225
229
model_id : str ,
226
230
model_version : str ,
231
+ hub_arn : Optional [str ],
227
232
region : Optional [str ],
228
233
tolerate_vulnerable_model : bool = False ,
229
234
tolerate_deprecated_model : bool = False ,
@@ -236,6 +241,8 @@ def _retrieve_serializer_options(
236
241
retrieve the supported serializers.
237
242
model_version (str): Version of the JumpStart model for which to retrieve the
238
243
supported serializers.
244
+ hub_arn (str): The arn of the SageMaker Hub for which to retrieve
245
+ model details from. (default: None).
239
246
region (Optional[str]): Region for which to retrieve serializer options.
240
247
tolerate_vulnerable_model (bool): True if vulnerable versions of model
241
248
specifications should be tolerated (exception not raised). If False, raises an
@@ -255,6 +262,7 @@ def _retrieve_serializer_options(
255
262
supported_content_types = _retrieve_supported_content_types (
256
263
model_id = model_id ,
257
264
model_version = model_version ,
265
+ hub_arn = hub_arn ,
258
266
region = region ,
259
267
tolerate_vulnerable_model = tolerate_vulnerable_model ,
260
268
tolerate_deprecated_model = tolerate_deprecated_model ,
@@ -386,6 +394,7 @@ def _retrieve_default_accept_type(
386
394
def _retrieve_supported_accept_types (
387
395
model_id : str ,
388
396
model_version : str ,
397
+ hub_arn : Optional [str ],
389
398
region : Optional [str ],
390
399
tolerate_vulnerable_model : bool = False ,
391
400
tolerate_deprecated_model : bool = False ,
@@ -398,6 +407,8 @@ def _retrieve_supported_accept_types(
398
407
retrieve the supported accept types.
399
408
model_version (str): Version of the JumpStart model for which to retrieve the
400
409
supported accept types.
410
+ hub_arn (str): The arn of the SageMaker Hub for which to retrieve
411
+ model details from. (default: None).
401
412
region (Optional[str]): Region for which to retrieve accept type options.
402
413
tolerate_vulnerable_model (bool): True if vulnerable versions of model
403
414
specifications should be tolerated (exception not raised). If False, raises an
@@ -420,6 +431,7 @@ def _retrieve_supported_accept_types(
420
431
model_specs = verify_model_region_and_return_specs (
421
432
model_id = model_id ,
422
433
version = model_version ,
434
+ hub_arn = hub_arn ,
423
435
scope = JumpStartScriptScope .INFERENCE ,
424
436
region = region ,
425
437
tolerate_vulnerable_model = tolerate_vulnerable_model ,
@@ -435,6 +447,7 @@ def _retrieve_supported_accept_types(
435
447
def _retrieve_supported_content_types (
436
448
model_id : str ,
437
449
model_version : str ,
450
+ hub_arn : Optional [str ],
438
451
region : Optional [str ],
439
452
tolerate_vulnerable_model : bool = False ,
440
453
tolerate_deprecated_model : bool = False ,
@@ -447,6 +460,8 @@ def _retrieve_supported_content_types(
447
460
retrieve the supported content types.
448
461
model_version (str): Version of the JumpStart model for which to retrieve the
449
462
supported content types.
463
+ hub_arn (str): The arn of the SageMaker Hub for which to retrieve
464
+ model details from. (default: None).
450
465
region (Optional[str]): Region for which to retrieve content type options.
451
466
tolerate_vulnerable_model (bool): True if vulnerable versions of model
452
467
specifications should be tolerated (exception not raised). If False, raises an
@@ -469,6 +484,7 @@ def _retrieve_supported_content_types(
469
484
model_specs = verify_model_region_and_return_specs (
470
485
model_id = model_id ,
471
486
version = model_version ,
487
+ hub_arn = hub_arn ,
472
488
scope = JumpStartScriptScope .INFERENCE ,
473
489
region = region ,
474
490
tolerate_vulnerable_model = tolerate_vulnerable_model ,
0 commit comments