@@ -50,14 +50,14 @@ def get_s3_reference(self, dependency_type: HubContentDependencyType):
50
50
return getattr (self , dependency_type .value )
51
51
52
52
@property
53
- def inference_artifact_s3_reference (self ):
53
+ def inference_artifact_s3_reference (self ) -> Optional [ S3ObjectLocation ] :
54
54
"""Retrieves s3 reference for model inference artifact"""
55
55
return create_s3_object_reference_from_uri (
56
56
self ._jumpstart_artifact_s3_uri (JumpStartScriptScope .INFERENCE )
57
57
)
58
58
59
59
@property
60
- def training_artifact_s3_reference (self ):
60
+ def training_artifact_s3_reference (self ) -> Optional [ S3ObjectLocation ] :
61
61
"""Retrieves s3 reference for model training artifact"""
62
62
if not self .model_specs .training_supported :
63
63
return None
@@ -66,14 +66,14 @@ def training_artifact_s3_reference(self):
66
66
)
67
67
68
68
@property
69
- def inference_script_s3_reference (self ):
69
+ def inference_script_s3_reference (self ) -> Optional [ S3ObjectLocation ] :
70
70
"""Retrieves s3 reference for model inference script"""
71
71
return create_s3_object_reference_from_uri (
72
72
self ._jumpstart_script_s3_uri (JumpStartScriptScope .INFERENCE )
73
73
)
74
74
75
75
@property
76
- def training_script_s3_reference (self ):
76
+ def training_script_s3_reference (self ) -> Optional [ S3ObjectLocation ] :
77
77
"""Retrieves s3 reference for model training script"""
78
78
if not self .model_specs .training_supported :
79
79
return None
@@ -82,21 +82,21 @@ def training_script_s3_reference(self):
82
82
)
83
83
84
84
@property
85
- def default_training_dataset_s3_reference (self ):
85
+ def default_training_dataset_s3_reference (self ) -> S3ObjectLocation :
86
86
"""Retrieves s3 reference for s3 directory containing model training datasets"""
87
87
if not self .model_specs .training_supported :
88
88
return None
89
89
return S3ObjectLocation (self ._get_bucket_name (), self .__get_training_dataset_prefix ())
90
90
91
91
@property
92
- def demo_notebook_s3_reference (self ):
92
+ def demo_notebook_s3_reference (self ) -> S3ObjectLocation :
93
93
"""Retrieves s3 reference for model demo jupyter notebook"""
94
94
framework = self .model_specs .get_framework ()
95
95
key = f"{ framework } -notebooks/{ self .model_specs .model_id } -inference.ipynb"
96
96
return S3ObjectLocation (self ._get_bucket_name (), key )
97
97
98
98
@property
99
- def markdown_s3_reference (self ):
99
+ def markdown_s3_reference (self ) -> S3ObjectLocation :
100
100
"""Retrieves s3 reference for model markdown"""
101
101
framework = self .model_specs .get_framework ()
102
102
key = f"{ framework } -metadata/{ self .model_specs .model_id } .md"
@@ -106,7 +106,7 @@ def _get_bucket_name(self) -> str:
106
106
"""Retrieves s3 bucket"""
107
107
return self ._bucket
108
108
109
- def __get_training_dataset_prefix (self ) -> str :
109
+ def _get_training_dataset_prefix (self ) -> Optional [ str ] :
110
110
"""Retrieves training dataset location"""
111
111
return self .studio_specs .get ("defaultDataKey" )
112
112
0 commit comments