Skip to content

Commit 9e20cb6

Browse files
committed
chore: address PR comment
1 parent 220929a commit 9e20cb6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/sagemaker/jumpstart/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def verify_model_region_and_return_specs(
402402
f"JumpStart model ID '{model_id}' and version '{version}' " "does not support training."
403403
)
404404

405-
if model_specs.deprecated or model_specs.deprecated_message:
405+
if model_specs.deprecated:
406406
if not tolerate_deprecated_model:
407407
raise DeprecatedJumpStartModelError(
408408
model_id=model_id, version=version, message=model_specs.deprecated_message

tests/unit/sagemaker/jumpstart/test_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,7 @@ def make_deprecated_spec(*largs, **kwargs):
892892
def make_deprecated_message_spec(*largs, **kwargs):
893893
spec = get_spec_from_base_spec(*largs, **kwargs)
894894
spec.deprecated_message = deprecated_message
895+
spec.deprecated = True
895896
return spec
896897

897898
patched_get_model_specs.side_effect = make_deprecated_message_spec

0 commit comments

Comments
 (0)