Skip to content

Commit abfadca

Browse files
committed
address more comments and fix doc
1 parent 40542b7 commit abfadca

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

doc/doc_utils/jumpstart_doc_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def create_proprietary_model_table():
244244
proprietary_content_entries.append(
245245
" - `{} <{}>`__ |external-link|\n".format("Source", model_spec.get("url"))
246246
)
247-
return marketpkace_content_intro + proprietary_content_entries + ["\n"]
247+
return [marketpkace_content_intro] + proprietary_content_entries + ["\n"]
248248

249249

250250
def create_jumpstart_model_table():

src/sagemaker/jumpstart/filters.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ class SpecialSupportedFilterKeys(str, Enum):
5252
MODEL_TYPE = "model_type"
5353

5454

55+
class ProprietaryModelFilterIdentifiers(str, Enum):
56+
"""Enum class for proprietary model filter keys."""
57+
58+
PROPRIETARY = "proprietary"
59+
MARKETPLACE = "marketplace"
60+
61+
5562
FILTER_OPERATOR_STRING_MAPPINGS = {
5663
FilterOperators.EQUALS: ["===", "==", "equals", "is"],
5764
FilterOperators.NOT_EQUALS: ["!==", "!=", "not equals", "is not"],

src/sagemaker/jumpstart/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ def deploy(
631631
and endpoint_type == EndpointType.INFERENCE_COMPONENT_BASED
632632
):
633633
raise ValueError(
634-
"EndpointType.INFERENCE_COMPONENT_BASED is not supported for Proprietary models."
634+
f"{EndpointType.INFERENCE_COMPONENT_BASED} is not supported for Proprietary models."
635635
)
636636

637637
try:

src/sagemaker/jumpstart/notebook_utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from sagemaker.jumpstart.enums import JumpStartScriptScope, JumpStartModelType
3030
from sagemaker.jumpstart.filters import (
3131
SPECIAL_SUPPORTED_FILTER_KEYS,
32+
ProprietaryModelFilterIdentifiers,
3233
BooleanValues,
3334
Identity,
3435
SpecialSupportedFilterKeys,
@@ -227,7 +228,6 @@ def list_jumpstart_scripts( # pylint: disable=redefined-builtin
227228
sagemaker_session (sagemaker.session.Session): Optional. The SageMaker Session to
228229
use to perform the model search. (Default: DEFAULT_JUMPSTART_SAGEMAKER_SESSION).
229230
"""
230-
231231
if (isinstance(filter, Constant) and filter.resolved_value == BooleanValues.TRUE) or (
232232
isinstance(filter, str) and filter.lower() == BooleanValues.TRUE.lower()
233233
):
@@ -360,8 +360,7 @@ def _generate_jumpstart_model_versions( # pylint: disable=redefined-builtin
360360
key = model_filter.key
361361
all_keys.add(key)
362362
if model_filter.key == SpecialSupportedFilterKeys.MODEL_TYPE and model_filter.value in {
363-
"marketplace",
364-
"proprietary",
363+
identifier.value for identifier in ProprietaryModelFilterIdentifiers
365364
}:
366365
model_filter.set_value(JumpStartModelType.PROPRIETARY.value)
367366
model_filters.add(model_filter)

0 commit comments

Comments
 (0)