5858from oci .data_science .models import JobRun , Model
5959
6060
61- class ModelValidationResult :
62- model_file : Optional [str ] = None
63- model_format : ModelFormat = None
64- telemetry_model_name : str = None
65-
66-
6761class AquaModelApp (AquaApp ):
6862 """Provides a suite of APIs to interact with Aqua models within the Oracle
6963 Cloud Infrastructure Data Science service, serving as an interface for
@@ -728,6 +722,17 @@ def _create_model_catalog_entry(
728722
729723 @staticmethod
730724 def get_model_files (os_path : str , model_format : ModelFormat ) -> [str ]:
725+ """
726+ Get a list of model files based on the given OS path and model format.
727+
728+ Args:
729+ os_path (str): The OS path where the model files are located.
730+ model_format (ModelFormat): The format of the model files.
731+
732+ Returns:
733+ List[str]: A list of model file names.
734+
735+ """
731736 model_files : List [str ] = []
732737 if model_format == ModelFormat .SAFETENSORS :
733738 try :
@@ -751,6 +756,19 @@ def validate_model_config(
751756 import_model_details : ImportModelDetails ,
752757 verified_model : Optional [DataScienceModel ],
753758 ) -> ModelValidationResult :
759+ """
760+ Validates the model configuration and returns the model format telemetry model name.
761+
762+ Args:
763+ import_model_details (ImportModelDetails): The details of the imported model.
764+ verified_model (Optional[DataScienceModel]): The verified model.
765+
766+ Returns:
767+ ModelValidationResult: The result of the model validation.
768+
769+ Raises:
770+ AquaRuntimeError: If there is an error while loading the config file or if the model path is incorrect.
771+ AquaValueError: If the model format is not supported by AQUA."""
754772 inference_containers_config = (
755773 AquaContainerConfig .from_container_index_json ().inference
756774 )
0 commit comments