@@ -619,7 +619,9 @@ def is_model_created_by_reference(self):
619
619
return True
620
620
return False
621
621
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
+ ):
623
625
"""
624
626
returns the content of the metadata artifact
625
627
@@ -665,7 +667,10 @@ def get_metadata_content(self, artifact_path_or_content: str, path_type):
665
667
msg = "Model needs to be saved to the Model Catalog before the creating custom metadata artifact corresponding to that model"
666
668
)
667
669
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 ,
669
674
) -> ModelMetadataArtifactDetails :
670
675
"""Creates model custom metadata artifact for specified model.
671
676
@@ -677,7 +682,7 @@ def create_custom_metadata_artifact(
677
682
artifact_path: str
678
683
The model custom metadata artifact path to be upload.
679
684
680
- path_type: str
685
+ path_type: utils.MetadataArtifactPathType
681
686
can be one of local , oss or actual content itself
682
687
683
688
Returns
@@ -715,7 +720,10 @@ def create_custom_metadata_artifact(
715
720
msg = "Model needs to be saved to the Model Catalog before creating defined metadata artifact corresponding to that model"
716
721
)
717
722
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 ,
719
727
) -> ModelMetadataArtifactDetails :
720
728
"""Creates model defined metadata artifact for specified model.
721
729
@@ -727,7 +735,7 @@ def create_defined_metadata_artifact(
727
735
artifact_path: str
728
736
The model custom metadata artifact path to be upload.
729
737
730
- path_type: str
738
+ path_type: utils.MetadataArtifactPathType
731
739
can be one of local , oss or actual content itself.
732
740
733
741
Returns
@@ -765,7 +773,10 @@ def create_defined_metadata_artifact(
765
773
msg = "Model needs to be saved to the Model Catalog before updating defined metadata artifact corresponding to that model"
766
774
)
767
775
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 ,
769
780
) -> ModelMetadataArtifactDetails :
770
781
"""Update model defined metadata artifact for specified model.
771
782
@@ -777,7 +788,7 @@ def update_defined_metadata_artifact(
777
788
artifact_path: str
778
789
The model defined metadata artifact path to be upload.
779
790
780
- path_type:str
791
+ path_type:utils.MetadataArtifactPathType
781
792
can be one of local , oss or actual content itself.
782
793
Returns
783
794
-------
@@ -814,7 +825,10 @@ def update_defined_metadata_artifact(
814
825
msg = "Model needs to be saved to the Model Catalog before updating custom metadata artifact corresponding to that model"
815
826
)
816
827
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 ,
818
832
) -> ModelMetadataArtifactDetails :
819
833
"""Update model custom metadata artifact for specified model.
820
834
@@ -826,7 +840,7 @@ def update_custom_metadata_artifact(
826
840
artifact_path: str
827
841
The model custom metadata artifact path to be upload.
828
842
829
- path_type: str
843
+ path_type: utils.MetadataArtifactPathType
830
844
can be one of local , oss or actual content itself.
831
845
832
846
Returns
0 commit comments