We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Introduce Priority for serving runtimes
/kind feature

**Problem**
- Currently, In auto selection mode, kserve serving runtime does not have a stable way to select a serving runtime if two are more serving runtimes support the same model format. 
- Currently, Kserve [selects the first serving runtime](https://github.com/kserve/kserve/blob/f2f0717a9d6341b6ec9b939bdd324b2c8c507551/pkg/controller/v1beta1/inferenceservice/components/predictor.go#L152) from a list of serving runtimes [sorted  by their respective creation timestamp descending and name ascending order](https://github.com/kserve/kserve/blob/f2f0717a9d6341b6ec9b939bdd324b2c8c507551/pkg/apis/serving/v1beta1/predictor_model.go#L162). So the users have little to no control over the runtime selection in auto select mode.


**Describe the solution you'd like**
[A clear and concise description of what you want to happen.]
- Introduce a new optional field called `Priority` in the model formats section. Through this field we can specify the priority of the serving runtimes for a sepcifice model format.
- The higher the priority value, the higher the precedence
- The priority is valid only if auto select is enabled otherwise the priority is not considered.
- If more than one serving runtime supports the model format and does not provided the priority, then the old way is followed for selecting the runtime.
-  The serving runtime with priority takes precedence over the serving runtime with priority not specified.
- The same model formats with same model version cannot have the same priority.

**Example Yaml**
```yaml
apiVersion: serving.kserve.io/v1alpha1
kind: ClusterServingRuntime
metadata:
  name: kserve-mlserver
spec:
  annotations:
    prometheus.kserve.io/path: /metrics
    prometheus.kserve.io/port: '8080'
  containers:
    - env:
        - name: MLSERVER_MODEL_IMPLEMENTATION
          value: '{{.Labels.modelClass}}'
        - name: MLSERVER_HTTP_PORT
          value: '8080'
        - name: MLSERVER_GRPC_PORT
          value: '9000'
        - name: MODELS_DIR
          value: /mnt/models
      image: docker.io/seldonio/mlserver:1.3.2
      name: kserve-container
      resources:
        limits:
          cpu: '1'
          memory: 2Gi
        requests:
          cpu: '1'
          memory: 2Gi
  protocolVersions:
    - v2
  supportedModelFormats:
    - autoSelect: true
      name: sklearn
      priority: 2
      version: '0'
    - autoSelect: true
      name: xgboost
      priority: 2
      version: '1'
    - autoSelect: true
      name: lightgbm
      priority: 2
      version: '3'
    - autoSelect: true
      name: mlflow
      priority: 1
      version: '1'

```


**Anything else you would like to add:**
[Miscellaneous information that will assist in solving the issue.]


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `python/kserve/kserve/models/v1alpha1_supported_model_format.py`
Content:
```
1 # Copyright 2023 The KServe Authors.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #    http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 # coding: utf-8
16 
17 """
18     KServe
19 
20     Python SDK for KServe  # noqa: E501
21 
22     The version of the OpenAPI document: v0.1
23     Generated by: https://openapi-generator.tech
24 """
25 
26 
27 import pprint
28 import re  # noqa: F401
29 
30 import six
31 
32 from kserve.configuration import Configuration
33 
34 
35 class V1alpha1SupportedModelFormat(object):
36     """NOTE: This class is auto generated by OpenAPI Generator.
37     Ref: https://openapi-generator.tech
38 
39     Do not edit the class manually.
40     """
41 
42     """
43     Attributes:
44       openapi_types (dict): The key is attribute name
45                             and the value is attribute type.
46       attribute_map (dict): The key is attribute name
47                             and the value is json key in definition.
48     """
49     openapi_types = {
50         'auto_select': 'bool',
51         'name': 'str',
52         'version': 'str'
53     }
54 
55     attribute_map = {
56         'auto_select': 'autoSelect',
57         'name': 'name',
58         'version': 'version'
59     }
60 
61     def __init__(self, auto_select=None, name='', version=None, local_vars_configuration=None):  # noqa: E501
62         """V1alpha1SupportedModelFormat - a model defined in OpenAPI"""  # noqa: E501
63         if local_vars_configuration is None:
64             local_vars_configuration = Configuration()
65         self.local_vars_configuration = local_vars_configuration
66 
67         self._auto_select = None
68         self._name = None
69         self._version = None
70         self.discriminator = None
71 
72         if auto_select is not None:
73             self.auto_select = auto_select
74         if name is not None:
75             self.name = name
76         if version is not None:
77             self.version = version
78 
79     @property
80     def auto_select(self):
81         """Gets the auto_select of this V1alpha1SupportedModelFormat.  # noqa: E501
82 
83         Set to true to allow the ServingRuntime to be used for automatic model placement if this model format is specified with no explicit runtime.  # noqa: E501
84 
85         :return: The auto_select of this V1alpha1SupportedModelFormat.  # noqa: E501
86         :rtype: bool
87         """
88         return self._auto_select
89 
90     @auto_select.setter
91     def auto_select(self, auto_select):
92         """Sets the auto_select of this V1alpha1SupportedModelFormat.
93 
94         Set to true to allow the ServingRuntime to be used for automatic model placement if this model format is specified with no explicit runtime.  # noqa: E501
95 
96         :param auto_select: The auto_select of this V1alpha1SupportedModelFormat.  # noqa: E501
97         :type: bool
98         """
99 
100         self._auto_select = auto_select
101 
102     @property
103     def name(self):
104         """Gets the name of this V1alpha1SupportedModelFormat.  # noqa: E501
105 
106         Name of the model format.  # noqa: E501
107 
108         :return: The name of this V1alpha1SupportedModelFormat.  # noqa: E501
109         :rtype: str
110         """
111         return self._name
112 
113     @name.setter
114     def name(self, name):
115         """Sets the name of this V1alpha1SupportedModelFormat.
116 
117         Name of the model format.  # noqa: E501
118 
119         :param name: The name of this V1alpha1SupportedModelFormat.  # noqa: E501
120         :type: str
121         """
122 
123         self._name = name
124 
125     @property
126     def version(self):
127         """Gets the version of this V1alpha1SupportedModelFormat.  # noqa: E501
128 
129         Version of the model format. Used in validating that a predictor is supported by a runtime. Can be \"major\", \"major.minor\" or \"major.minor.patch\".  # noqa: E501
130 
131         :return: The version of this V1alpha1SupportedModelFormat.  # noqa: E501
132         :rtype: str
133         """
134         return self._version
135 
136     @version.setter
137     def version(self, version):
138         """Sets the version of this V1alpha1SupportedModelFormat.
139 
140         Version of the model format. Used in validating that a predictor is supported by a runtime. Can be \"major\", \"major.minor\" or \"major.minor.patch\".  # noqa: E501
141 
142         :param version: The version of this V1alpha1SupportedModelFormat.  # noqa: E501
143         :type: str
144         """
145 
146         self._version = version
147 
148     def to_dict(self):
149         """Returns the model properties as a dict"""
150         result = {}
151 
152         for attr, _ in six.iteritems(self.openapi_types):
153             value = getattr(self, attr)
154             if isinstance(value, list):
155                 result[attr] = list(map(
156                     lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
157                     value
158                 ))
159             elif hasattr(value, "to_dict"):
160                 result[attr] = value.to_dict()
161             elif isinstance(value, dict):
162                 result[attr] = dict(map(
163                     lambda item: (item[0], item[1].to_dict())
164                     if hasattr(item[1], "to_dict") else item,
165                     value.items()
166                 ))
167             else:
168                 result[attr] = value
169 
170         return result
171 
172     def to_str(self):
173         """Returns the string representation of the model"""
174         return pprint.pformat(self.to_dict())
175 
176     def __repr__(self):
177         """For `print` and `pprint`"""
178         return self.to_str()
179 
180     def __eq__(self, other):
181         """Returns true if both objects are equal"""
182         if not isinstance(other, V1alpha1SupportedModelFormat):
183             return False
184 
185         return self.to_dict() == other.to_dict()
186 
187     def __ne__(self, other):
188         """Returns true if both objects are not equal"""
189         if not isinstance(other, V1alpha1SupportedModelFormat):
190             return True
191 
192         return self.to_dict() != other.to_dict()
193
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/python/kserve/kserve/models/v1alpha1_supported_model_format.py b/python/kserve/kserve/models/v1alpha1_supported_model_format.py
--- a/python/kserve/kserve/models/v1alpha1_supported_model_format.py
+++ b/python/kserve/kserve/models/v1alpha1_supported_model_format.py
@@ -49,16 +49,18 @@
     openapi_types = {
         'auto_select': 'bool',
         'name': 'str',
+        'priority': 'int',
         'version': 'str'
     }
 
     attribute_map = {
         'auto_select': 'autoSelect',
         'name': 'name',
+        'priority': 'priority',
         'version': 'version'
     }
 
-    def __init__(self, auto_select=None, name='', version=None, local_vars_configuration=None):  # noqa: E501
+    def __init__(self, auto_select=None, name='', priority=None, version=None, local_vars_configuration=None):  # noqa: E501
         """V1alpha1SupportedModelFormat - a model defined in OpenAPI"""  # noqa: E501
         if local_vars_configuration is None:
             local_vars_configuration = Configuration()
@@ -66,6 +68,7 @@
 
         self._auto_select = None
         self._name = None
+        self._priority = None
         self._version = None
         self.discriminator = None
 
@@ -73,6 +76,8 @@
             self.auto_select = auto_select
         if name is not None:
             self.name = name
+        if priority is not None:
+            self.priority = priority
         if version is not None:
             self.version = version
 
@@ -122,6 +127,29 @@
 
         self._name = name
 
+    @property
+    def priority(self):
+        """Gets the priority of this V1alpha1SupportedModelFormat.  # noqa: E501
+
+        Priority of this serving runtime for auto selection. This is used to select the serving runtime if more than one serving runtime supports the same model format. The value should be greater than zero.  The higher the value, the higher the priority. Priority is not considered if AutoSelect is either false or not specified. Priority can be overridden by specifying the runtime in the InferenceService.  # noqa: E501
+
+        :return: The priority of this V1alpha1SupportedModelFormat.  # noqa: E501
+        :rtype: int
+        """
+        return self._priority
+
+    @priority.setter
+    def priority(self, priority):
+        """Sets the priority of this V1alpha1SupportedModelFormat.
+
+        Priority of this serving runtime for auto selection. This is used to select the serving runtime if more than one serving runtime supports the same model format. The value should be greater than zero.  The higher the value, the higher the priority. Priority is not considered if AutoSelect is either false or not specified. Priority can be overridden by specifying the runtime in the InferenceService.  # noqa: E501
+
+        :param priority: The priority of this V1alpha1SupportedModelFormat.  # noqa: E501
+        :type: int
+        """
+
+        self._priority = priority
+
     @property
     def version(self):
         """Gets the version of this V1alpha1SupportedModelFormat.  # noqa: E501

{"golden_diff": "diff --git a/python/kserve/kserve/models/v1alpha1_supported_model_format.py b/python/kserve/kserve/models/v1alpha1_supported_model_format.py\n--- a/python/kserve/kserve/models/v1alpha1_supported_model_format.py\n+++ b/python/kserve/kserve/models/v1alpha1_supported_model_format.py\n@@ -49,16 +49,18 @@\n     openapi_types = {\n         'auto_select': 'bool',\n         'name': 'str',\n+        'priority': 'int',\n         'version': 'str'\n     }\n \n     attribute_map = {\n         'auto_select': 'autoSelect',\n         'name': 'name',\n+        'priority': 'priority',\n         'version': 'version'\n     }\n \n-    def __init__(self, auto_select=None, name='', version=None, local_vars_configuration=None):  # noqa: E501\n+    def __init__(self, auto_select=None, name='', priority=None, version=None, local_vars_configuration=None):  # noqa: E501\n         \"\"\"V1alpha1SupportedModelFormat - a model defined in OpenAPI\"\"\"  # noqa: E501\n         if local_vars_configuration is None:\n             local_vars_configuration = Configuration()\n@@ -66,6 +68,7 @@\n \n         self._auto_select = None\n         self._name = None\n+        self._priority = None\n         self._version = None\n         self.discriminator = None\n \n@@ -73,6 +76,8 @@\n             self.auto_select = auto_select\n         if name is not None:\n             self.name = name\n+        if priority is not None:\n+            self.priority = priority\n         if version is not None:\n             self.version = version\n \n@@ -122,6 +127,29 @@\n \n         self._name = name\n \n+    @property\n+    def priority(self):\n+        \"\"\"Gets the priority of this V1alpha1SupportedModelFormat.  # noqa: E501\n+\n+        Priority of this serving runtime for auto selection. This is used to select the serving runtime if more than one serving runtime supports the same model format. The value should be greater than zero.  The higher the value, the higher the priority. Priority is not considered if AutoSelect is either false or not specified. Priority can be overridden by specifying the runtime in the InferenceService.  # noqa: E501\n+\n+        :return: The priority of this V1alpha1SupportedModelFormat.  # noqa: E501\n+        :rtype: int\n+        \"\"\"\n+        return self._priority\n+\n+    @priority.setter\n+    def priority(self, priority):\n+        \"\"\"Sets the priority of this V1alpha1SupportedModelFormat.\n+\n+        Priority of this serving runtime for auto selection. This is used to select the serving runtime if more than one serving runtime supports the same model format. The value should be greater than zero.  The higher the value, the higher the priority. Priority is not considered if AutoSelect is either false or not specified. Priority can be overridden by specifying the runtime in the InferenceService.  # noqa: E501\n+\n+        :param priority: The priority of this V1alpha1SupportedModelFormat.  # noqa: E501\n+        :type: int\n+        \"\"\"\n+\n+        self._priority = priority\n+\n     @property\n     def version(self):\n         \"\"\"Gets the version of this V1alpha1SupportedModelFormat.  # noqa: E501\n", "issue": "Introduce Priority for serving runtimes\n/kind feature\r\n\r\n**Problem**\r\n- Currently, In auto selection mode, kserve serving runtime does not have a stable way to select a serving runtime if two are more serving runtimes support the same model format. \r\n- Currently, Kserve [selects the first serving runtime](https://github.com/kserve/kserve/blob/f2f0717a9d6341b6ec9b939bdd324b2c8c507551/pkg/controller/v1beta1/inferenceservice/components/predictor.go#L152) from a list of serving runtimes [sorted  by their respective creation timestamp descending and name ascending order](https://github.com/kserve/kserve/blob/f2f0717a9d6341b6ec9b939bdd324b2c8c507551/pkg/apis/serving/v1beta1/predictor_model.go#L162). So the users have little to no control over the runtime selection in auto select mode.\r\n\r\n\r\n**Describe the solution you'd like**\r\n[A clear and concise description of what you want to happen.]\r\n- Introduce a new optional field called `Priority` in the model formats section. Through this field we can specify the priority of the serving runtimes for a sepcifice model format.\r\n- The higher the priority value, the higher the precedence\r\n- The priority is valid only if auto select is enabled otherwise the priority is not considered.\r\n- If more than one serving runtime supports the model format and does not provided the priority, then the old way is followed for selecting the runtime.\r\n-  The serving runtime with priority takes precedence over the serving runtime with priority not specified.\r\n- The same model formats with same model version cannot have the same priority.\r\n\r\n**Example Yaml**\r\n```yaml\r\napiVersion: serving.kserve.io/v1alpha1\r\nkind: ClusterServingRuntime\r\nmetadata:\r\n  name: kserve-mlserver\r\nspec:\r\n  annotations:\r\n    prometheus.kserve.io/path: /metrics\r\n    prometheus.kserve.io/port: '8080'\r\n  containers:\r\n    - env:\r\n        - name: MLSERVER_MODEL_IMPLEMENTATION\r\n          value: '{{.Labels.modelClass}}'\r\n        - name: MLSERVER_HTTP_PORT\r\n          value: '8080'\r\n        - name: MLSERVER_GRPC_PORT\r\n          value: '9000'\r\n        - name: MODELS_DIR\r\n          value: /mnt/models\r\n      image: docker.io/seldonio/mlserver:1.3.2\r\n      name: kserve-container\r\n      resources:\r\n        limits:\r\n          cpu: '1'\r\n          memory: 2Gi\r\n        requests:\r\n          cpu: '1'\r\n          memory: 2Gi\r\n  protocolVersions:\r\n    - v2\r\n  supportedModelFormats:\r\n    - autoSelect: true\r\n      name: sklearn\r\n      priority: 2\r\n      version: '0'\r\n    - autoSelect: true\r\n      name: xgboost\r\n      priority: 2\r\n      version: '1'\r\n    - autoSelect: true\r\n      name: lightgbm\r\n      priority: 2\r\n      version: '3'\r\n    - autoSelect: true\r\n      name: mlflow\r\n      priority: 1\r\n      version: '1'\r\n\r\n```\r\n\r\n\r\n**Anything else you would like to add:**\r\n[Miscellaneous information that will assist in solving the issue.]\r\n\n", "before_files": [{"content": "# Copyright 2023 The KServe Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# coding: utf-8\n\n\"\"\"\n    KServe\n\n    Python SDK for KServe  # noqa: E501\n\n    The version of the OpenAPI document: v0.1\n    Generated by: https://openapi-generator.tech\n\"\"\"\n\n\nimport pprint\nimport re  # noqa: F401\n\nimport six\n\nfrom kserve.configuration import Configuration\n\n\nclass V1alpha1SupportedModelFormat(object):\n    \"\"\"NOTE: This class is auto generated by OpenAPI Generator.\n    Ref: https://openapi-generator.tech\n\n    Do not edit the class manually.\n    \"\"\"\n\n    \"\"\"\n    Attributes:\n      openapi_types (dict): The key is attribute name\n                            and the value is attribute type.\n      attribute_map (dict): The key is attribute name\n                            and the value is json key in definition.\n    \"\"\"\n    openapi_types = {\n        'auto_select': 'bool',\n        'name': 'str',\n        'version': 'str'\n    }\n\n    attribute_map = {\n        'auto_select': 'autoSelect',\n        'name': 'name',\n        'version': 'version'\n    }\n\n    def __init__(self, auto_select=None, name='', version=None, local_vars_configuration=None):  # noqa: E501\n        \"\"\"V1alpha1SupportedModelFormat - a model defined in OpenAPI\"\"\"  # noqa: E501\n        if local_vars_configuration is None:\n            local_vars_configuration = Configuration()\n        self.local_vars_configuration = local_vars_configuration\n\n        self._auto_select = None\n        self._name = None\n        self._version = None\n        self.discriminator = None\n\n        if auto_select is not None:\n            self.auto_select = auto_select\n        if name is not None:\n            self.name = name\n        if version is not None:\n            self.version = version\n\n    @property\n    def auto_select(self):\n        \"\"\"Gets the auto_select of this V1alpha1SupportedModelFormat.  # noqa: E501\n\n        Set to true to allow the ServingRuntime to be used for automatic model placement if this model format is specified with no explicit runtime.  # noqa: E501\n\n        :return: The auto_select of this V1alpha1SupportedModelFormat.  # noqa: E501\n        :rtype: bool\n        \"\"\"\n        return self._auto_select\n\n    @auto_select.setter\n    def auto_select(self, auto_select):\n        \"\"\"Sets the auto_select of this V1alpha1SupportedModelFormat.\n\n        Set to true to allow the ServingRuntime to be used for automatic model placement if this model format is specified with no explicit runtime.  # noqa: E501\n\n        :param auto_select: The auto_select of this V1alpha1SupportedModelFormat.  # noqa: E501\n        :type: bool\n        \"\"\"\n\n        self._auto_select = auto_select\n\n    @property\n    def name(self):\n        \"\"\"Gets the name of this V1alpha1SupportedModelFormat.  # noqa: E501\n\n        Name of the model format.  # noqa: E501\n\n        :return: The name of this V1alpha1SupportedModelFormat.  # noqa: E501\n        :rtype: str\n        \"\"\"\n        return self._name\n\n    @name.setter\n    def name(self, name):\n        \"\"\"Sets the name of this V1alpha1SupportedModelFormat.\n\n        Name of the model format.  # noqa: E501\n\n        :param name: The name of this V1alpha1SupportedModelFormat.  # noqa: E501\n        :type: str\n        \"\"\"\n\n        self._name = name\n\n    @property\n    def version(self):\n        \"\"\"Gets the version of this V1alpha1SupportedModelFormat.  # noqa: E501\n\n        Version of the model format. Used in validating that a predictor is supported by a runtime. Can be \\\"major\\\", \\\"major.minor\\\" or \\\"major.minor.patch\\\".  # noqa: E501\n\n        :return: The version of this V1alpha1SupportedModelFormat.  # noqa: E501\n        :rtype: str\n        \"\"\"\n        return self._version\n\n    @version.setter\n    def version(self, version):\n        \"\"\"Sets the version of this V1alpha1SupportedModelFormat.\n\n        Version of the model format. Used in validating that a predictor is supported by a runtime. Can be \\\"major\\\", \\\"major.minor\\\" or \\\"major.minor.patch\\\".  # noqa: E501\n\n        :param version: The version of this V1alpha1SupportedModelFormat.  # noqa: E501\n        :type: str\n        \"\"\"\n\n        self._version = version\n\n    def to_dict(self):\n        \"\"\"Returns the model properties as a dict\"\"\"\n        result = {}\n\n        for attr, _ in six.iteritems(self.openapi_types):\n            value = getattr(self, attr)\n            if isinstance(value, list):\n                result[attr] = list(map(\n                    lambda x: x.to_dict() if hasattr(x, \"to_dict\") else x,\n                    value\n                ))\n            elif hasattr(value, \"to_dict\"):\n                result[attr] = value.to_dict()\n            elif isinstance(value, dict):\n                result[attr] = dict(map(\n                    lambda item: (item[0], item[1].to_dict())\n                    if hasattr(item[1], \"to_dict\") else item,\n                    value.items()\n                ))\n            else:\n                result[attr] = value\n\n        return result\n\n    def to_str(self):\n        \"\"\"Returns the string representation of the model\"\"\"\n        return pprint.pformat(self.to_dict())\n\n    def __repr__(self):\n        \"\"\"For `print` and `pprint`\"\"\"\n        return self.to_str()\n\n    def __eq__(self, other):\n        \"\"\"Returns true if both objects are equal\"\"\"\n        if not isinstance(other, V1alpha1SupportedModelFormat):\n            return False\n\n        return self.to_dict() == other.to_dict()\n\n    def __ne__(self, other):\n        \"\"\"Returns true if both objects are not equal\"\"\"\n        if not isinstance(other, V1alpha1SupportedModelFormat):\n            return True\n\n        return self.to_dict() != other.to_dict()\n", "path": "python/kserve/kserve/models/v1alpha1_supported_model_format.py"}], "after_files": [{"content": "# Copyright 2023 The KServe Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# coding: utf-8\n\n\"\"\"\n    KServe\n\n    Python SDK for KServe  # noqa: E501\n\n    The version of the OpenAPI document: v0.1\n    Generated by: https://openapi-generator.tech\n\"\"\"\n\n\nimport pprint\nimport re  # noqa: F401\n\nimport six\n\nfrom kserve.configuration import Configuration\n\n\nclass V1alpha1SupportedModelFormat(object):\n    \"\"\"NOTE: This class is auto generated by OpenAPI Generator.\n    Ref: https://openapi-generator.tech\n\n    Do not edit the class manually.\n    \"\"\"\n\n    \"\"\"\n    Attributes:\n      openapi_types (dict): The key is attribute name\n                            and the value is attribute type.\n      attribute_map (dict): The key is attribute name\n                            and the value is json key in definition.\n    \"\"\"\n    openapi_types = {\n        'auto_select': 'bool',\n        'name': 'str',\n        'priority': 'int',\n        'version': 'str'\n    }\n\n    attribute_map = {\n        'auto_select': 'autoSelect',\n        'name': 'name',\n        'priority': 'priority',\n        'version': 'version'\n    }\n\n    def __init__(self, auto_select=None, name='', priority=None, version=None, local_vars_configuration=None):  # noqa: E501\n        \"\"\"V1alpha1SupportedModelFormat - a model defined in OpenAPI\"\"\"  # noqa: E501\n        if local_vars_configuration is None:\n            local_vars_configuration = Configuration()\n        self.local_vars_configuration = local_vars_configuration\n\n        self._auto_select = None\n        self._name = None\n        self._priority = None\n        self._version = None\n        self.discriminator = None\n\n        if auto_select is not None:\n            self.auto_select = auto_select\n        if name is not None:\n            self.name = name\n        if priority is not None:\n            self.priority = priority\n        if version is not None:\n            self.version = version\n\n    @property\n    def auto_select(self):\n        \"\"\"Gets the auto_select of this V1alpha1SupportedModelFormat.  # noqa: E501\n\n        Set to true to allow the ServingRuntime to be used for automatic model placement if this model format is specified with no explicit runtime.  # noqa: E501\n\n        :return: The auto_select of this V1alpha1SupportedModelFormat.  # noqa: E501\n        :rtype: bool\n        \"\"\"\n        return self._auto_select\n\n    @auto_select.setter\n    def auto_select(self, auto_select):\n        \"\"\"Sets the auto_select of this V1alpha1SupportedModelFormat.\n\n        Set to true to allow the ServingRuntime to be used for automatic model placement if this model format is specified with no explicit runtime.  # noqa: E501\n\n        :param auto_select: The auto_select of this V1alpha1SupportedModelFormat.  # noqa: E501\n        :type: bool\n        \"\"\"\n\n        self._auto_select = auto_select\n\n    @property\n    def name(self):\n        \"\"\"Gets the name of this V1alpha1SupportedModelFormat.  # noqa: E501\n\n        Name of the model format.  # noqa: E501\n\n        :return: The name of this V1alpha1SupportedModelFormat.  # noqa: E501\n        :rtype: str\n        \"\"\"\n        return self._name\n\n    @name.setter\n    def name(self, name):\n        \"\"\"Sets the name of this V1alpha1SupportedModelFormat.\n\n        Name of the model format.  # noqa: E501\n\n        :param name: The name of this V1alpha1SupportedModelFormat.  # noqa: E501\n        :type: str\n        \"\"\"\n\n        self._name = name\n\n    @property\n    def priority(self):\n        \"\"\"Gets the priority of this V1alpha1SupportedModelFormat.  # noqa: E501\n\n        Priority of this serving runtime for auto selection. This is used to select the serving runtime if more than one serving runtime supports the same model format. The value should be greater than zero.  The higher the value, the higher the priority. Priority is not considered if AutoSelect is either false or not specified. Priority can be overridden by specifying the runtime in the InferenceService.  # noqa: E501\n\n        :return: The priority of this V1alpha1SupportedModelFormat.  # noqa: E501\n        :rtype: int\n        \"\"\"\n        return self._priority\n\n    @priority.setter\n    def priority(self, priority):\n        \"\"\"Sets the priority of this V1alpha1SupportedModelFormat.\n\n        Priority of this serving runtime for auto selection. This is used to select the serving runtime if more than one serving runtime supports the same model format. The value should be greater than zero.  The higher the value, the higher the priority. Priority is not considered if AutoSelect is either false or not specified. Priority can be overridden by specifying the runtime in the InferenceService.  # noqa: E501\n\n        :param priority: The priority of this V1alpha1SupportedModelFormat.  # noqa: E501\n        :type: int\n        \"\"\"\n\n        self._priority = priority\n\n    @property\n    def version(self):\n        \"\"\"Gets the version of this V1alpha1SupportedModelFormat.  # noqa: E501\n\n        Version of the model format. Used in validating that a predictor is supported by a runtime. Can be \\\"major\\\", \\\"major.minor\\\" or \\\"major.minor.patch\\\".  # noqa: E501\n\n        :return: The version of this V1alpha1SupportedModelFormat.  # noqa: E501\n        :rtype: str\n        \"\"\"\n        return self._version\n\n    @version.setter\n    def version(self, version):\n        \"\"\"Sets the version of this V1alpha1SupportedModelFormat.\n\n        Version of the model format. Used in validating that a predictor is supported by a runtime. Can be \\\"major\\\", \\\"major.minor\\\" or \\\"major.minor.patch\\\".  # noqa: E501\n\n        :param version: The version of this V1alpha1SupportedModelFormat.  # noqa: E501\n        :type: str\n        \"\"\"\n\n        self._version = version\n\n    def to_dict(self):\n        \"\"\"Returns the model properties as a dict\"\"\"\n        result = {}\n\n        for attr, _ in six.iteritems(self.openapi_types):\n            value = getattr(self, attr)\n            if isinstance(value, list):\n                result[attr] = list(map(\n                    lambda x: x.to_dict() if hasattr(x, \"to_dict\") else x,\n                    value\n                ))\n            elif hasattr(value, \"to_dict\"):\n                result[attr] = value.to_dict()\n            elif isinstance(value, dict):\n                result[attr] = dict(map(\n                    lambda item: (item[0], item[1].to_dict())\n                    if hasattr(item[1], \"to_dict\") else item,\n                    value.items()\n                ))\n            else:\n                result[attr] = value\n\n        return result\n\n    def to_str(self):\n        \"\"\"Returns the string representation of the model\"\"\"\n        return pprint.pformat(self.to_dict())\n\n    def __repr__(self):\n        \"\"\"For `print` and `pprint`\"\"\"\n        return self.to_str()\n\n    def __eq__(self, other):\n        \"\"\"Returns true if both objects are equal\"\"\"\n        if not isinstance(other, V1alpha1SupportedModelFormat):\n            return False\n\n        return self.to_dict() == other.to_dict()\n\n    def __ne__(self, other):\n        \"\"\"Returns true if both objects are not equal\"\"\"\n        if not isinstance(other, V1alpha1SupportedModelFormat):\n            return True\n\n        return self.to_dict() != other.to_dict()\n", "path": "python/kserve/kserve/models/v1alpha1_supported_model_format.py"}]}