File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed
tests/unit/sagemaker/model_uris/jumpstart Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -208,8 +208,6 @@ def _retrieve_model_uri(
208
208
VulnerableJumpStartModelError: If any of the dependencies required by the script have
209
209
known security vulnerabilities.
210
210
DeprecatedJumpStartModelError: If the version of the model is deprecated.
211
- NotImplementedError: If the combination of arguments doesn't support combined model
212
- and script artifact.
213
211
"""
214
212
if region is None :
215
213
region = JUMPSTART_DEFAULT_REGION_NAME
@@ -234,13 +232,13 @@ def _retrieve_model_uri(
234
232
else :
235
233
model_artifact_key = getattr (model_specs , "hosting_prepacked_artifact_key" , None )
236
234
if model_artifact_key is None :
237
- raise NotImplementedError (error_msg_no_combined_artifact )
235
+ raise ValueError (error_msg_no_combined_artifact )
238
236
239
237
elif model_scope == JumpStartScriptScope .TRAINING :
240
238
if not include_script :
241
239
model_artifact_key = model_specs .training_artifact_key
242
240
else :
243
- raise NotImplementedError (error_msg_no_combined_artifact )
241
+ raise ValueError (error_msg_no_combined_artifact )
244
242
245
243
bucket = os .environ .get (
246
244
ENV_VARIABLE_JUMPSTART_MODEL_ARTIFACT_BUCKET_OVERRIDE
Original file line number Diff line number Diff line change @@ -60,8 +60,6 @@ def retrieve(
60
60
VulnerableJumpStartModelError: If any of the dependencies required by the script have
61
61
known security vulnerabilities.
62
62
DeprecatedJumpStartModelError: If the version of the model is deprecated.
63
- NotImplementedError: If the combination of arguments doesn't support combined model
64
- and script artifact.
65
63
"""
66
64
if not jumpstart_utils .is_jumpstart_model_input (model_id , model_version ):
67
65
raise ValueError ("Must specify `model_id` and `model_version` when retrieving model URIs." )
Original file line number Diff line number Diff line change @@ -39,18 +39,18 @@ def test_jumpstart_combined_artifacts(patched_get_model_specs):
39
39
"prepack/v1.0.0/infer-prepack-huggingface-text2text-flan-t5-xxl-fp16.tar.gz"
40
40
)
41
41
42
- with pytest .raises (NotImplementedError ):
42
+ with pytest .raises (ValueError ):
43
43
model_uris .retrieve (
44
44
region = "us-west-2" ,
45
- model_scope = "transfer_learning " ,
45
+ model_scope = "training " ,
46
46
model_id = model_id_combined_model_artifact ,
47
47
model_version = "*" ,
48
48
include_script = True ,
49
49
)
50
50
51
51
model_id_combined_model_artifact_unsupported = "xgboost-classification-model"
52
52
53
- with pytest .raises (NotImplementedError ):
53
+ with pytest .raises (ValueError ):
54
54
model_uris .retrieve (
55
55
region = "us-west-2" ,
56
56
model_scope = "inference" ,
You can’t perform that action at this time.
0 commit comments