Skip to content

Commit d8bab8a

Browse files
Addressing review comments
1 parent e05cbf3 commit d8bab8a

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

ads/model/service/oci_datascience_model.py

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,9 @@ def is_model_created_by_reference(self):
619619
return True
620620
return False
621621

622-
def get_metadata_content(self, artifact_path_or_content: str, path_type):
622+
def get_metadata_content(
623+
self, artifact_path_or_content: str, path_type: utils.MetadataArtifactPathType
624+
):
623625
"""
624626
returns the content of the metadata artifact
625627
@@ -665,7 +667,10 @@ def get_metadata_content(self, artifact_path_or_content: str, path_type):
665667
msg="Model needs to be saved to the Model Catalog before the creating custom metadata artifact corresponding to that model"
666668
)
667669
def create_custom_metadata_artifact(
668-
self, metadata_key_name: str, artifact_path: str, path_type: str
670+
self,
671+
metadata_key_name: str,
672+
artifact_path: str,
673+
path_type: utils.MetadataArtifactPathType,
669674
) -> ModelMetadataArtifactDetails:
670675
"""Creates model custom metadata artifact for specified model.
671676
@@ -677,7 +682,7 @@ def create_custom_metadata_artifact(
677682
artifact_path: str
678683
The model custom metadata artifact path to be upload.
679684
680-
path_type: str
685+
path_type: utils.MetadataArtifactPathType
681686
can be one of local , oss or actual content itself
682687
683688
Returns
@@ -715,7 +720,10 @@ def create_custom_metadata_artifact(
715720
msg="Model needs to be saved to the Model Catalog before creating defined metadata artifact corresponding to that model"
716721
)
717722
def create_defined_metadata_artifact(
718-
self, metadata_key_name: str, artifact_path: str, path_type: str
723+
self,
724+
metadata_key_name: str,
725+
artifact_path: str,
726+
path_type: utils.MetadataArtifactPathType,
719727
) -> ModelMetadataArtifactDetails:
720728
"""Creates model defined metadata artifact for specified model.
721729
@@ -727,7 +735,7 @@ def create_defined_metadata_artifact(
727735
artifact_path: str
728736
The model custom metadata artifact path to be upload.
729737
730-
path_type: str
738+
path_type: utils.MetadataArtifactPathType
731739
can be one of local , oss or actual content itself.
732740
733741
Returns
@@ -765,7 +773,10 @@ def create_defined_metadata_artifact(
765773
msg="Model needs to be saved to the Model Catalog before updating defined metadata artifact corresponding to that model"
766774
)
767775
def update_defined_metadata_artifact(
768-
self, metadata_key_name: str, artifact_path: str, path_type: str
776+
self,
777+
metadata_key_name: str,
778+
artifact_path: str,
779+
path_type: utils.MetadataArtifactPathType,
769780
) -> ModelMetadataArtifactDetails:
770781
"""Update model defined metadata artifact for specified model.
771782
@@ -777,7 +788,7 @@ def update_defined_metadata_artifact(
777788
artifact_path: str
778789
The model defined metadata artifact path to be upload.
779790
780-
path_type:str
791+
path_type:utils.MetadataArtifactPathType
781792
can be one of local , oss or actual content itself.
782793
Returns
783794
-------
@@ -814,7 +825,10 @@ def update_defined_metadata_artifact(
814825
msg="Model needs to be saved to the Model Catalog before updating custom metadata artifact corresponding to that model"
815826
)
816827
def update_custom_metadata_artifact(
817-
self, metadata_key_name: str, artifact_path: str, path_type: str
828+
self,
829+
metadata_key_name: str,
830+
artifact_path: str,
831+
path_type: utils.MetadataArtifactPathType,
818832
) -> ModelMetadataArtifactDetails:
819833
"""Update model custom metadata artifact for specified model.
820834
@@ -826,7 +840,7 @@ def update_custom_metadata_artifact(
826840
artifact_path: str
827841
The model custom metadata artifact path to be upload.
828842
829-
path_type: str
843+
path_type: utils.MetadataArtifactPathType
830844
can be one of local , oss or actual content itself.
831845
832846
Returns

0 commit comments

Comments
 (0)