Skip to content

Commit c9f79fd

Browse files
committed
update types
1 parent 1af132e commit c9f79fd

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/sagemaker/jumpstart/curated_hub/accessors/public_model_data.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ def get_s3_reference(self, dependency_type: HubContentDependencyType):
5050
return getattr(self, dependency_type.value)
5151

5252
@property
53-
def inference_artifact_s3_reference(self):
53+
def inference_artifact_s3_reference(self) -> Optional[S3ObjectLocation]:
5454
"""Retrieves s3 reference for model inference artifact"""
5555
return create_s3_object_reference_from_uri(
5656
self._jumpstart_artifact_s3_uri(JumpStartScriptScope.INFERENCE)
5757
)
5858

5959
@property
60-
def training_artifact_s3_reference(self):
60+
def training_artifact_s3_reference(self) -> Optional[S3ObjectLocation]:
6161
"""Retrieves s3 reference for model training artifact"""
6262
if not self.model_specs.training_supported:
6363
return None
@@ -66,14 +66,14 @@ def training_artifact_s3_reference(self):
6666
)
6767

6868
@property
69-
def inference_script_s3_reference(self):
69+
def inference_script_s3_reference(self) -> Optional[S3ObjectLocation]:
7070
"""Retrieves s3 reference for model inference script"""
7171
return create_s3_object_reference_from_uri(
7272
self._jumpstart_script_s3_uri(JumpStartScriptScope.INFERENCE)
7373
)
7474

7575
@property
76-
def training_script_s3_reference(self):
76+
def training_script_s3_reference(self) -> Optional[S3ObjectLocation]:
7777
"""Retrieves s3 reference for model training script"""
7878
if not self.model_specs.training_supported:
7979
return None
@@ -82,21 +82,21 @@ def training_script_s3_reference(self):
8282
)
8383

8484
@property
85-
def default_training_dataset_s3_reference(self):
85+
def default_training_dataset_s3_reference(self) -> S3ObjectLocation:
8686
"""Retrieves s3 reference for s3 directory containing model training datasets"""
8787
if not self.model_specs.training_supported:
8888
return None
8989
return S3ObjectLocation(self._get_bucket_name(), self.__get_training_dataset_prefix())
9090

9191
@property
92-
def demo_notebook_s3_reference(self):
92+
def demo_notebook_s3_reference(self) -> S3ObjectLocation:
9393
"""Retrieves s3 reference for model demo jupyter notebook"""
9494
framework = self.model_specs.get_framework()
9595
key = f"{framework}-notebooks/{self.model_specs.model_id}-inference.ipynb"
9696
return S3ObjectLocation(self._get_bucket_name(), key)
9797

9898
@property
99-
def markdown_s3_reference(self):
99+
def markdown_s3_reference(self) -> S3ObjectLocation:
100100
"""Retrieves s3 reference for model markdown"""
101101
framework = self.model_specs.get_framework()
102102
key = f"{framework}-metadata/{self.model_specs.model_id}.md"
@@ -106,7 +106,7 @@ def _get_bucket_name(self) -> str:
106106
"""Retrieves s3 bucket"""
107107
return self._bucket
108108

109-
def __get_training_dataset_prefix(self) -> str:
109+
def _get_training_dataset_prefix(self) -> Optional[str]:
110110
"""Retrieves training dataset location"""
111111
return self.studio_specs.get("defaultDataKey")
112112

0 commit comments

Comments
 (0)