Source code for ads.model.runtime.model_deployment_details
#!/usr/bin/env python# -*- coding: utf-8 -*--# Copyright (c) 2022 Oracle and/or its affiliates.# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/fromdataclassesimportdataclass,fieldfromtypingimportDictfromads.common.serializerimportDataClassSerializablefromads.model.runtime.env_infoimportInferenceEnvInfo
[docs]@dataclass(repr=False)classModelDeploymentDetails(DataClassSerializable):"""ModelDeploymentDetails class."""inference_conda_env:InferenceEnvInfo=field(default_factory=InferenceEnvInfo)@classmethoddef_validate_dict(cls,obj_dict:Dict)->bool:"""Validate the content in the dictionary format from the yaml file. Parameters ---------- obj_dict: (Dict) yaml file content to validate. Returns ------- bool Validation result. """assertobj_dictand("INFERENCE_CONDA_ENV"inobj_dict),"`model_deployment_details` must have `INFERENCE_CONDA_ENV` field."returnTrue