Skip to content

Commit 2f07130

Browse files
author
Malav Shastri
committed
address comments: moving get default JS session to constructor body
1 parent ac45eea commit 2f07130

File tree

1 file changed

+2
-4
lines changed
  • src/sagemaker/jumpstart/hub

1 file changed

+2
-4
lines changed

src/sagemaker/jumpstart/hub/hub.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ def __init__(
6767
self,
6868
hub_name: str,
6969
bucket_name: Optional[str] = None,
70-
sagemaker_session: Optional[
71-
Session
72-
] = utils.get_default_jumpstart_session_with_user_agent_suffix(is_hub_content=True),
70+
sagemaker_session: Optional[Session] = None,
7371
) -> None:
7472
"""Instantiates a SageMaker ``Hub``.
7573
@@ -80,7 +78,7 @@ def __init__(
8078
"""
8179
self.hub_name = hub_name
8280
self.region = sagemaker_session.boto_region_name
83-
self._sagemaker_session = sagemaker_session
81+
self._sagemaker_session = sagemaker_session or utils.get_default_jumpstart_session_with_user_agent_suffix(is_hub_content=True)
8482
self.hub_storage_location = self._generate_hub_storage_location(bucket_name)
8583

8684
def _fetch_hub_bucket_name(self) -> str:

0 commit comments

Comments
 (0)