Skip to content

Commit 2635dd1

Browse files
committed
chore: resolve git comments
1 parent 2669e83 commit 2635dd1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/sagemaker/jumpstart/accessors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,6 @@ def get_manifest(
164164
cache_kwargs (str): cache kwargs to use.
165165
region (str): The region to use for the cache.
166166
"""
167-
cache_kwargs_dict = {} if cache_kwargs is None else cache_kwargs
167+
cache_kwargs_dict: Dict[str, Any] = {} if cache_kwargs is None else cache_kwargs
168168
JumpStartModelsAccessor.set_cache_kwargs(cache_kwargs_dict, region)
169169
return JumpStartModelsAccessor._cache.get_manifest() # type: ignore

src/sagemaker/jumpstart/notebook_utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import copy
1616

1717
from functools import cmp_to_key
18-
from typing import Any, List, Tuple, Union, Set, Dict
18+
from typing import Any, List, Optional, Tuple, Union, Set, Dict
1919
from packaging.version import Version
2020
from sagemaker.jumpstart import accessors
2121
from sagemaker.jumpstart.constants import JUMPSTART_DEFAULT_REGION_NAME
@@ -26,7 +26,8 @@
2626

2727

2828
def _compare_model_version_tuples( # pylint: disable=too-many-return-statements
29-
model_version_1: Tuple[str, str] = None, model_version_2: Tuple[str, str] = None
29+
model_version_1: Optional[Tuple[str, str]] = None,
30+
model_version_2: Optional[Tuple[str, str]] = None,
3031
) -> int:
3132
"""Performs comparison of sdk specs paths, in order to sort them.
3233
@@ -104,7 +105,7 @@ def extract_framework_task_model(model_id: str) -> Tuple[str, str, str]:
104105
_id_parts = model_id.split("-")
105106

106107
if len(_id_parts) < 3:
107-
raise ValueError(f"incorrect model id: {model_id}.")
108+
raise ValueError(f"incorrect model ID: {model_id}.")
108109

109110
framework = _id_parts[0]
110111
task = _id_parts[1]

0 commit comments

Comments
 (0)