platform-api-python-client 4.28.0__py3-none-any.whl → 4.37.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- platform_api_python_client/__init__.py +43 -10
- platform_api_python_client/api/external_api.py +6332 -1348
- platform_api_python_client/api_client.py +1 -1
- platform_api_python_client/configuration.py +1 -1
- platform_api_python_client/models/__init__.py +42 -9
- platform_api_python_client/models/ccl_dynamo_pools.py +116 -0
- platform_api_python_client/models/{create_c_serve_v2_deployment_response.py → ccl_main_pools.py} +12 -13
- platform_api_python_client/models/cloud_provider.py +5 -0
- platform_api_python_client/models/cluster_credential.py +2 -2
- platform_api_python_client/models/create_compute_deployment_request.py +40 -7
- platform_api_python_client/models/create_dynamo_deployment_request.py +97 -6
- platform_api_python_client/models/create_inference_v3_deployment_request.py +59 -2
- platform_api_python_client/models/create_job_deployment_request.py +43 -10
- platform_api_python_client/models/create_object_volume_request.py +19 -19
- platform_api_python_client/models/deployment_response.py +23 -23
- platform_api_python_client/models/deployment_type.py +14 -0
- platform_api_python_client/models/{c_serve_recipe_perf.py → dynamo_communications_input.py} +12 -19
- platform_api_python_client/models/dynamo_communications_output.py +91 -0
- platform_api_python_client/models/dynamo_image.py +105 -0
- platform_api_python_client/models/dynamo_kv_transfer_configuration.py +88 -0
- platform_api_python_client/models/dynamo_kv_transfer_policy.py +37 -0
- platform_api_python_client/models/dynamo_weight_transfer_configuration.py +88 -0
- platform_api_python_client/models/dynamo_weight_transfer_policy.py +36 -0
- platform_api_python_client/models/dynamo_worker_pool_config.py +37 -17
- platform_api_python_client/models/dynamo_worker_pools.py +23 -16
- platform_api_python_client/models/env.py +89 -0
- platform_api_python_client/models/get_cluster_response.py +4 -2
- platform_api_python_client/models/get_compute_deployment_response.py +45 -4
- platform_api_python_client/models/get_deployment_response.py +26 -2
- platform_api_python_client/models/get_deployment_usage_response.py +19 -4
- platform_api_python_client/models/get_dynamo_deployment_response.py +89 -5
- platform_api_python_client/models/get_inference_deployment_response.py +25 -1
- platform_api_python_client/models/get_inference_v3_deployment_response.py +67 -2
- platform_api_python_client/models/get_job_deployment_response.py +52 -11
- platform_api_python_client/models/get_object_volume_response.py +2 -16
- platform_api_python_client/models/hardware_instance_response.py +6 -4
- platform_api_python_client/models/image.py +112 -0
- platform_api_python_client/models/ingress.py +103 -0
- platform_api_python_client/models/insight_list_item_response.py +108 -0
- platform_api_python_client/models/insight_resource.py +97 -0
- platform_api_python_client/models/insight_resource_type.py +37 -0
- platform_api_python_client/models/insight_response.py +133 -0
- platform_api_python_client/models/insight_severity.py +40 -0
- platform_api_python_client/models/insight_status.py +39 -0
- platform_api_python_client/models/{c_serve_recipe_response.py → insight_status_change_response.py} +28 -24
- platform_api_python_client/models/list_insights_response.py +95 -0
- platform_api_python_client/models/metric.py +13 -0
- platform_api_python_client/models/pool.py +116 -0
- platform_api_python_client/models/unified_get_compute_deployment_response.py +177 -0
- platform_api_python_client/models/unified_get_deployment_logs_response.py +95 -0
- platform_api_python_client/models/{create_c_serve_v3_deployment_response.py → unified_get_deployment_pods_response.py} +8 -13
- platform_api_python_client/models/unified_get_deployment_response.py +164 -0
- platform_api_python_client/models/unified_get_deployment_revision_response.py +109 -0
- platform_api_python_client/models/unified_get_deployment_rollout_response.py +90 -0
- platform_api_python_client/models/unified_get_deployment_usage_response.py +110 -0
- platform_api_python_client/models/unified_get_dynamo_deployment_response.py +218 -0
- platform_api_python_client/models/unified_get_inference_v3_deployment_response.py +228 -0
- platform_api_python_client/models/unified_get_job_deployment_response.py +204 -0
- platform_api_python_client/models/{list_c_serve_recipe_response.py → unified_list_deployment_revisions_response.py} +7 -7
- platform_api_python_client/models/unified_update_deployment_rollout_request.py +87 -0
- platform_api_python_client/models/unified_write_compute_deployment_request.py +154 -0
- platform_api_python_client/models/unified_write_deployment_request.py +164 -0
- platform_api_python_client/models/{c_serve_v2_recipe.py → unified_write_deployment_response.py} +27 -27
- platform_api_python_client/models/unified_write_dynamo_deployment_request.py +197 -0
- platform_api_python_client/models/unified_write_inference_v3_deployment_request.py +207 -0
- platform_api_python_client/models/unified_write_job_deployment_request.py +183 -0
- platform_api_python_client/models/update_insight_status_request.py +106 -0
- platform_api_python_client/models/upsert_user_vault_item_request.py +1 -1
- platform_api_python_client/models/usage_availability.py +40 -0
- platform_api_python_client/models/usage_component.py +39 -0
- platform_api_python_client/models/validation_error.py +12 -3
- platform_api_python_client/models/volume_mount.py +1 -1
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/METADATA +1 -1
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/RECORD +76 -43
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/WHEEL +1 -1
- platform_api_python_client/models/create_c_serve_v3_deployment_request.py +0 -182
- platform_api_python_client/models/get_c_serve_v2_deployment_response.py +0 -169
- platform_api_python_client/models/get_c_serve_v3_deployment_response.py +0 -170
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/top_level.txt +0 -0
|
@@ -18,19 +18,23 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
23
24
|
from platform_api_python_client.models.backend_protocol import BackendProtocol
|
|
24
25
|
from platform_api_python_client.models.deployment_status import DeploymentStatus
|
|
25
26
|
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
27
|
+
from platform_api_python_client.models.dynamo_communications_output import DynamoCommunicationsOutput
|
|
26
28
|
from platform_api_python_client.models.dynamo_serving_mode import DynamoServingMode
|
|
29
|
+
from platform_api_python_client.models.dynamo_weight_transfer_configuration import DynamoWeightTransferConfiguration
|
|
27
30
|
from platform_api_python_client.models.dynamo_worker_pools import DynamoWorkerPools
|
|
31
|
+
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
28
32
|
from typing import Optional, Set
|
|
29
33
|
from typing_extensions import Self
|
|
30
34
|
|
|
31
35
|
class GetDynamoDeploymentResponse(BaseModel):
|
|
32
36
|
"""
|
|
33
|
-
|
|
37
|
+
Dynamo deployment read model. ``worker_pools`` is the authoritative hardware/scaling view for both serving modes. The inherited ``hardware_instance_id`` is the single-hardware projection (worker for aggregated, decode for disaggregated) and the top-level scaling fields mirror ``worker_pools.worker``; both remain for consumers that predate ``worker_pools``.
|
|
34
38
|
""" # noqa: E501
|
|
35
39
|
creator_email: StrictStr
|
|
36
40
|
cluster_id: StrictInt
|
|
@@ -43,23 +47,34 @@ class GetDynamoDeploymentResponse(BaseModel):
|
|
|
43
47
|
created_at: datetime
|
|
44
48
|
hardware_instance_id: StrictInt
|
|
45
49
|
revision_number: StrictInt
|
|
50
|
+
chart_revision: Optional[StrictStr] = None
|
|
46
51
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
52
|
+
priority: Optional[StrictStr] = None
|
|
53
|
+
volume_mounts: Optional[List[VolumeMount]] = None
|
|
54
|
+
hf_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
47
55
|
serving_mode: Optional[DynamoServingMode] = None
|
|
48
56
|
worker_pools: Optional[DynamoWorkerPools] = None
|
|
57
|
+
communications: Optional[DynamoCommunicationsOutput] = None
|
|
58
|
+
weight_transfer: Optional[DynamoWeightTransferConfiguration] = None
|
|
49
59
|
model: StrictStr
|
|
60
|
+
model_revision: Optional[StrictStr] = None
|
|
50
61
|
served_model_name: Optional[StrictStr] = None
|
|
51
|
-
|
|
52
|
-
|
|
62
|
+
runtime_version: Optional[StrictStr] = None
|
|
63
|
+
min_replicas: StrictInt = Field(description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.")
|
|
64
|
+
max_replicas: StrictInt = Field(description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.")
|
|
53
65
|
concurrency: Optional[StrictInt] = None
|
|
54
66
|
cooldown_period: Optional[StrictInt] = None
|
|
55
67
|
extra_args: Optional[StrictStr] = None
|
|
56
68
|
env_vars: Optional[Dict[str, StrictStr]] = None
|
|
69
|
+
env_vars_refs: Optional[Dict[str, Any]] = None
|
|
57
70
|
endpoint_certificate_authority: Optional[StrictStr] = None
|
|
58
71
|
endpoint_bearer_token: Optional[StrictStr] = None
|
|
72
|
+
bearer_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
73
|
+
image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
59
74
|
enable_logging: Optional[StrictBool] = True
|
|
60
75
|
enable_node_model_cache: Optional[StrictBool] = False
|
|
61
76
|
backend_protocol: Optional[BackendProtocol] = None
|
|
62
|
-
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "serving_mode", "worker_pools", "model", "served_model_name", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "env_vars", "endpoint_certificate_authority", "endpoint_bearer_token", "enable_logging", "enable_node_model_cache", "backend_protocol"]
|
|
77
|
+
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "hf_token_ref", "serving_mode", "worker_pools", "communications", "weight_transfer", "model", "model_revision", "served_model_name", "runtime_version", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "env_vars", "env_vars_refs", "endpoint_certificate_authority", "endpoint_bearer_token", "bearer_token_ref", "image_pull_ref", "enable_logging", "enable_node_model_cache", "backend_protocol"]
|
|
63
78
|
|
|
64
79
|
model_config = ConfigDict(
|
|
65
80
|
populate_by_name=True,
|
|
@@ -100,29 +115,77 @@ class GetDynamoDeploymentResponse(BaseModel):
|
|
|
100
115
|
exclude=excluded_fields,
|
|
101
116
|
exclude_none=True,
|
|
102
117
|
)
|
|
118
|
+
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
119
|
+
_items = []
|
|
120
|
+
if self.volume_mounts:
|
|
121
|
+
for _item_volume_mounts in self.volume_mounts:
|
|
122
|
+
if _item_volume_mounts:
|
|
123
|
+
_items.append(_item_volume_mounts.to_dict())
|
|
124
|
+
_dict['volume_mounts'] = _items
|
|
103
125
|
# override the default output from pydantic by calling `to_dict()` of worker_pools
|
|
104
126
|
if self.worker_pools:
|
|
105
127
|
_dict['worker_pools'] = self.worker_pools.to_dict()
|
|
128
|
+
# override the default output from pydantic by calling `to_dict()` of communications
|
|
129
|
+
if self.communications:
|
|
130
|
+
_dict['communications'] = self.communications.to_dict()
|
|
131
|
+
# override the default output from pydantic by calling `to_dict()` of weight_transfer
|
|
132
|
+
if self.weight_transfer:
|
|
133
|
+
_dict['weight_transfer'] = self.weight_transfer.to_dict()
|
|
106
134
|
# set to None if image_url (nullable) is None
|
|
107
135
|
# and model_fields_set contains the field
|
|
108
136
|
if self.image_url is None and "image_url" in self.model_fields_set:
|
|
109
137
|
_dict['image_url'] = None
|
|
110
138
|
|
|
139
|
+
# set to None if chart_revision (nullable) is None
|
|
140
|
+
# and model_fields_set contains the field
|
|
141
|
+
if self.chart_revision is None and "chart_revision" in self.model_fields_set:
|
|
142
|
+
_dict['chart_revision'] = None
|
|
143
|
+
|
|
111
144
|
# set to None if user_annotations (nullable) is None
|
|
112
145
|
# and model_fields_set contains the field
|
|
113
146
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
114
147
|
_dict['user_annotations'] = None
|
|
115
148
|
|
|
149
|
+
# set to None if priority (nullable) is None
|
|
150
|
+
# and model_fields_set contains the field
|
|
151
|
+
if self.priority is None and "priority" in self.model_fields_set:
|
|
152
|
+
_dict['priority'] = None
|
|
153
|
+
|
|
154
|
+
# set to None if hf_token_ref (nullable) is None
|
|
155
|
+
# and model_fields_set contains the field
|
|
156
|
+
if self.hf_token_ref is None and "hf_token_ref" in self.model_fields_set:
|
|
157
|
+
_dict['hf_token_ref'] = None
|
|
158
|
+
|
|
116
159
|
# set to None if worker_pools (nullable) is None
|
|
117
160
|
# and model_fields_set contains the field
|
|
118
161
|
if self.worker_pools is None and "worker_pools" in self.model_fields_set:
|
|
119
162
|
_dict['worker_pools'] = None
|
|
120
163
|
|
|
164
|
+
# set to None if communications (nullable) is None
|
|
165
|
+
# and model_fields_set contains the field
|
|
166
|
+
if self.communications is None and "communications" in self.model_fields_set:
|
|
167
|
+
_dict['communications'] = None
|
|
168
|
+
|
|
169
|
+
# set to None if weight_transfer (nullable) is None
|
|
170
|
+
# and model_fields_set contains the field
|
|
171
|
+
if self.weight_transfer is None and "weight_transfer" in self.model_fields_set:
|
|
172
|
+
_dict['weight_transfer'] = None
|
|
173
|
+
|
|
174
|
+
# set to None if model_revision (nullable) is None
|
|
175
|
+
# and model_fields_set contains the field
|
|
176
|
+
if self.model_revision is None and "model_revision" in self.model_fields_set:
|
|
177
|
+
_dict['model_revision'] = None
|
|
178
|
+
|
|
121
179
|
# set to None if served_model_name (nullable) is None
|
|
122
180
|
# and model_fields_set contains the field
|
|
123
181
|
if self.served_model_name is None and "served_model_name" in self.model_fields_set:
|
|
124
182
|
_dict['served_model_name'] = None
|
|
125
183
|
|
|
184
|
+
# set to None if runtime_version (nullable) is None
|
|
185
|
+
# and model_fields_set contains the field
|
|
186
|
+
if self.runtime_version is None and "runtime_version" in self.model_fields_set:
|
|
187
|
+
_dict['runtime_version'] = None
|
|
188
|
+
|
|
126
189
|
# set to None if concurrency (nullable) is None
|
|
127
190
|
# and model_fields_set contains the field
|
|
128
191
|
if self.concurrency is None and "concurrency" in self.model_fields_set:
|
|
@@ -148,6 +211,16 @@ class GetDynamoDeploymentResponse(BaseModel):
|
|
|
148
211
|
if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set:
|
|
149
212
|
_dict['endpoint_bearer_token'] = None
|
|
150
213
|
|
|
214
|
+
# set to None if bearer_token_ref (nullable) is None
|
|
215
|
+
# and model_fields_set contains the field
|
|
216
|
+
if self.bearer_token_ref is None and "bearer_token_ref" in self.model_fields_set:
|
|
217
|
+
_dict['bearer_token_ref'] = None
|
|
218
|
+
|
|
219
|
+
# set to None if image_pull_ref (nullable) is None
|
|
220
|
+
# and model_fields_set contains the field
|
|
221
|
+
if self.image_pull_ref is None and "image_pull_ref" in self.model_fields_set:
|
|
222
|
+
_dict['image_pull_ref'] = None
|
|
223
|
+
|
|
151
224
|
return _dict
|
|
152
225
|
|
|
153
226
|
@classmethod
|
|
@@ -171,19 +244,30 @@ class GetDynamoDeploymentResponse(BaseModel):
|
|
|
171
244
|
"created_at": obj.get("created_at"),
|
|
172
245
|
"hardware_instance_id": obj.get("hardware_instance_id"),
|
|
173
246
|
"revision_number": obj.get("revision_number"),
|
|
247
|
+
"chart_revision": obj.get("chart_revision"),
|
|
174
248
|
"user_annotations": obj.get("user_annotations"),
|
|
249
|
+
"priority": obj.get("priority"),
|
|
250
|
+
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
|
|
251
|
+
"hf_token_ref": obj.get("hf_token_ref"),
|
|
175
252
|
"serving_mode": obj.get("serving_mode"),
|
|
176
253
|
"worker_pools": DynamoWorkerPools.from_dict(obj["worker_pools"]) if obj.get("worker_pools") is not None else None,
|
|
254
|
+
"communications": DynamoCommunicationsOutput.from_dict(obj["communications"]) if obj.get("communications") is not None else None,
|
|
255
|
+
"weight_transfer": DynamoWeightTransferConfiguration.from_dict(obj["weight_transfer"]) if obj.get("weight_transfer") is not None else None,
|
|
177
256
|
"model": obj.get("model"),
|
|
257
|
+
"model_revision": obj.get("model_revision"),
|
|
178
258
|
"served_model_name": obj.get("served_model_name"),
|
|
259
|
+
"runtime_version": obj.get("runtime_version"),
|
|
179
260
|
"min_replicas": obj.get("min_replicas"),
|
|
180
261
|
"max_replicas": obj.get("max_replicas"),
|
|
181
262
|
"concurrency": obj.get("concurrency"),
|
|
182
263
|
"cooldown_period": obj.get("cooldown_period"),
|
|
183
264
|
"extra_args": obj.get("extra_args"),
|
|
184
265
|
"env_vars": obj.get("env_vars"),
|
|
266
|
+
"env_vars_refs": obj.get("env_vars_refs"),
|
|
185
267
|
"endpoint_certificate_authority": obj.get("endpoint_certificate_authority"),
|
|
186
268
|
"endpoint_bearer_token": obj.get("endpoint_bearer_token"),
|
|
269
|
+
"bearer_token_ref": obj.get("bearer_token_ref"),
|
|
270
|
+
"image_pull_ref": obj.get("image_pull_ref"),
|
|
187
271
|
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
|
|
188
272
|
"enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False,
|
|
189
273
|
"backend_protocol": obj.get("backend_protocol")
|
|
@@ -22,6 +22,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from platform_api_python_client.models.deployment_status import DeploymentStatus
|
|
24
24
|
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
25
|
+
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
25
26
|
from typing import Optional, Set
|
|
26
27
|
from typing_extensions import Self
|
|
27
28
|
|
|
@@ -40,7 +41,10 @@ class GetInferenceDeploymentResponse(BaseModel):
|
|
|
40
41
|
created_at: datetime
|
|
41
42
|
hardware_instance_id: StrictInt
|
|
42
43
|
revision_number: StrictInt
|
|
44
|
+
chart_revision: Optional[StrictStr] = None
|
|
43
45
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
46
|
+
priority: Optional[StrictStr] = None
|
|
47
|
+
volume_mounts: Optional[List[VolumeMount]] = None
|
|
44
48
|
container_port: StrictInt
|
|
45
49
|
min_scale: StrictInt
|
|
46
50
|
max_scale: StrictInt
|
|
@@ -52,7 +56,7 @@ class GetInferenceDeploymentResponse(BaseModel):
|
|
|
52
56
|
env_vars: Optional[Dict[str, StrictStr]] = None
|
|
53
57
|
command: Optional[List[StrictStr]] = None
|
|
54
58
|
command_args: Optional[List[StrictStr]] = None
|
|
55
|
-
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "container_port", "min_scale", "max_scale", "initial_scale", "concurrency", "healthcheck", "endpoint_certificate_authority", "endpoint_bearer_token", "env_vars", "command", "command_args"]
|
|
59
|
+
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "container_port", "min_scale", "max_scale", "initial_scale", "concurrency", "healthcheck", "endpoint_certificate_authority", "endpoint_bearer_token", "env_vars", "command", "command_args"]
|
|
56
60
|
|
|
57
61
|
model_config = ConfigDict(
|
|
58
62
|
populate_by_name=True,
|
|
@@ -93,16 +97,33 @@ class GetInferenceDeploymentResponse(BaseModel):
|
|
|
93
97
|
exclude=excluded_fields,
|
|
94
98
|
exclude_none=True,
|
|
95
99
|
)
|
|
100
|
+
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
101
|
+
_items = []
|
|
102
|
+
if self.volume_mounts:
|
|
103
|
+
for _item_volume_mounts in self.volume_mounts:
|
|
104
|
+
if _item_volume_mounts:
|
|
105
|
+
_items.append(_item_volume_mounts.to_dict())
|
|
106
|
+
_dict['volume_mounts'] = _items
|
|
96
107
|
# set to None if image_url (nullable) is None
|
|
97
108
|
# and model_fields_set contains the field
|
|
98
109
|
if self.image_url is None and "image_url" in self.model_fields_set:
|
|
99
110
|
_dict['image_url'] = None
|
|
100
111
|
|
|
112
|
+
# set to None if chart_revision (nullable) is None
|
|
113
|
+
# and model_fields_set contains the field
|
|
114
|
+
if self.chart_revision is None and "chart_revision" in self.model_fields_set:
|
|
115
|
+
_dict['chart_revision'] = None
|
|
116
|
+
|
|
101
117
|
# set to None if user_annotations (nullable) is None
|
|
102
118
|
# and model_fields_set contains the field
|
|
103
119
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
104
120
|
_dict['user_annotations'] = None
|
|
105
121
|
|
|
122
|
+
# set to None if priority (nullable) is None
|
|
123
|
+
# and model_fields_set contains the field
|
|
124
|
+
if self.priority is None and "priority" in self.model_fields_set:
|
|
125
|
+
_dict['priority'] = None
|
|
126
|
+
|
|
106
127
|
# set to None if initial_scale (nullable) is None
|
|
107
128
|
# and model_fields_set contains the field
|
|
108
129
|
if self.initial_scale is None and "initial_scale" in self.model_fields_set:
|
|
@@ -166,7 +187,10 @@ class GetInferenceDeploymentResponse(BaseModel):
|
|
|
166
187
|
"created_at": obj.get("created_at"),
|
|
167
188
|
"hardware_instance_id": obj.get("hardware_instance_id"),
|
|
168
189
|
"revision_number": obj.get("revision_number"),
|
|
190
|
+
"chart_revision": obj.get("chart_revision"),
|
|
169
191
|
"user_annotations": obj.get("user_annotations"),
|
|
192
|
+
"priority": obj.get("priority"),
|
|
193
|
+
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
|
|
170
194
|
"container_port": obj.get("container_port"),
|
|
171
195
|
"min_scale": obj.get("min_scale"),
|
|
172
196
|
"max_scale": obj.get("max_scale"),
|
|
@@ -18,14 +18,16 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
23
24
|
from platform_api_python_client.models.backend_protocol import BackendProtocol
|
|
24
25
|
from platform_api_python_client.models.config_file_mount import ConfigFileMount
|
|
25
26
|
from platform_api_python_client.models.deployment_status import DeploymentStatus
|
|
26
27
|
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
27
28
|
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
|
|
28
29
|
from platform_api_python_client.models.metrics_config import MetricsConfig
|
|
30
|
+
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
29
31
|
from typing import Optional, Set
|
|
30
32
|
from typing_extensions import Self
|
|
31
33
|
|
|
@@ -44,7 +46,11 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
44
46
|
created_at: datetime
|
|
45
47
|
hardware_instance_id: StrictInt
|
|
46
48
|
revision_number: StrictInt
|
|
49
|
+
chart_revision: Optional[StrictStr] = None
|
|
47
50
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
51
|
+
priority: Optional[StrictStr] = None
|
|
52
|
+
volume_mounts: Optional[List[VolumeMount]] = None
|
|
53
|
+
hf_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
48
54
|
container_port: StrictInt
|
|
49
55
|
min_replicas: StrictInt
|
|
50
56
|
max_replicas: StrictInt
|
|
@@ -58,13 +64,27 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
58
64
|
command_args: Optional[List[StrictStr]] = None
|
|
59
65
|
original_command: Optional[StrictStr] = None
|
|
60
66
|
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
|
|
67
|
+
env_vars_refs: Optional[Dict[str, Any]] = None
|
|
68
|
+
bearer_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
69
|
+
image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
70
|
+
image_pull_secret_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=253)]] = Field(default=None, description="Name of a pre-existing image pull Secret in the deployment namespace. Created, refreshed and deleted externally. Mutually exclusive with inline registry credentials and image_pull_ref. Include on updates to retain it; null clears it.")
|
|
61
71
|
backend_protocol: Optional[BackendProtocol] = None
|
|
62
72
|
enable_logging: Optional[StrictBool] = True
|
|
63
73
|
enable_node_model_cache: Optional[StrictBool] = False
|
|
64
74
|
session_affinity: Optional[StrictBool] = Field(default=False, description="Enable best-effort sticky routing via the `X-Session-Id` request header. Requests carrying the same header value land on the same pod, improving KV cache reuse for agentic workloads. Requests without the header are routed at random. Affinity is NOT durable: scaling, rollouts, restarts, or readiness-probe transitions will remap sessions to different pods. Do not use for irreplaceable in-pod state.")
|
|
65
75
|
config_file: Optional[ConfigFileMount] = None
|
|
66
76
|
metrics: Optional[MetricsConfig] = None
|
|
67
|
-
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "container_port", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "healthcheck", "endpoint_certificate_authority", "endpoint_bearer_token", "env_vars", "command", "command_args", "original_command", "image_pull_secret_credentials", "backend_protocol", "enable_logging", "enable_node_model_cache", "session_affinity", "config_file", "metrics"]
|
|
77
|
+
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "hf_token_ref", "container_port", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "healthcheck", "endpoint_certificate_authority", "endpoint_bearer_token", "env_vars", "command", "command_args", "original_command", "image_pull_secret_credentials", "env_vars_refs", "bearer_token_ref", "image_pull_ref", "image_pull_secret_name", "backend_protocol", "enable_logging", "enable_node_model_cache", "session_affinity", "config_file", "metrics"]
|
|
78
|
+
|
|
79
|
+
@field_validator('image_pull_secret_name')
|
|
80
|
+
def image_pull_secret_name_validate_regular_expression(cls, value):
|
|
81
|
+
"""Validates the regular expression"""
|
|
82
|
+
if value is None:
|
|
83
|
+
return value
|
|
84
|
+
|
|
85
|
+
if not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
|
|
86
|
+
raise ValueError(r"must validate the regular expression /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/")
|
|
87
|
+
return value
|
|
68
88
|
|
|
69
89
|
model_config = ConfigDict(
|
|
70
90
|
populate_by_name=True,
|
|
@@ -105,6 +125,13 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
105
125
|
exclude=excluded_fields,
|
|
106
126
|
exclude_none=True,
|
|
107
127
|
)
|
|
128
|
+
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
129
|
+
_items = []
|
|
130
|
+
if self.volume_mounts:
|
|
131
|
+
for _item_volume_mounts in self.volume_mounts:
|
|
132
|
+
if _item_volume_mounts:
|
|
133
|
+
_items.append(_item_volume_mounts.to_dict())
|
|
134
|
+
_dict['volume_mounts'] = _items
|
|
108
135
|
# override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
|
|
109
136
|
if self.image_pull_secret_credentials:
|
|
110
137
|
_dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
|
|
@@ -119,11 +146,26 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
119
146
|
if self.image_url is None and "image_url" in self.model_fields_set:
|
|
120
147
|
_dict['image_url'] = None
|
|
121
148
|
|
|
149
|
+
# set to None if chart_revision (nullable) is None
|
|
150
|
+
# and model_fields_set contains the field
|
|
151
|
+
if self.chart_revision is None and "chart_revision" in self.model_fields_set:
|
|
152
|
+
_dict['chart_revision'] = None
|
|
153
|
+
|
|
122
154
|
# set to None if user_annotations (nullable) is None
|
|
123
155
|
# and model_fields_set contains the field
|
|
124
156
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
125
157
|
_dict['user_annotations'] = None
|
|
126
158
|
|
|
159
|
+
# set to None if priority (nullable) is None
|
|
160
|
+
# and model_fields_set contains the field
|
|
161
|
+
if self.priority is None and "priority" in self.model_fields_set:
|
|
162
|
+
_dict['priority'] = None
|
|
163
|
+
|
|
164
|
+
# set to None if hf_token_ref (nullable) is None
|
|
165
|
+
# and model_fields_set contains the field
|
|
166
|
+
if self.hf_token_ref is None and "hf_token_ref" in self.model_fields_set:
|
|
167
|
+
_dict['hf_token_ref'] = None
|
|
168
|
+
|
|
127
169
|
# set to None if concurrency (nullable) is None
|
|
128
170
|
# and model_fields_set contains the field
|
|
129
171
|
if self.concurrency is None and "concurrency" in self.model_fields_set:
|
|
@@ -169,6 +211,21 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
169
211
|
if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
|
|
170
212
|
_dict['image_pull_secret_credentials'] = None
|
|
171
213
|
|
|
214
|
+
# set to None if bearer_token_ref (nullable) is None
|
|
215
|
+
# and model_fields_set contains the field
|
|
216
|
+
if self.bearer_token_ref is None and "bearer_token_ref" in self.model_fields_set:
|
|
217
|
+
_dict['bearer_token_ref'] = None
|
|
218
|
+
|
|
219
|
+
# set to None if image_pull_ref (nullable) is None
|
|
220
|
+
# and model_fields_set contains the field
|
|
221
|
+
if self.image_pull_ref is None and "image_pull_ref" in self.model_fields_set:
|
|
222
|
+
_dict['image_pull_ref'] = None
|
|
223
|
+
|
|
224
|
+
# set to None if image_pull_secret_name (nullable) is None
|
|
225
|
+
# and model_fields_set contains the field
|
|
226
|
+
if self.image_pull_secret_name is None and "image_pull_secret_name" in self.model_fields_set:
|
|
227
|
+
_dict['image_pull_secret_name'] = None
|
|
228
|
+
|
|
172
229
|
# set to None if config_file (nullable) is None
|
|
173
230
|
# and model_fields_set contains the field
|
|
174
231
|
if self.config_file is None and "config_file" in self.model_fields_set:
|
|
@@ -202,7 +259,11 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
202
259
|
"created_at": obj.get("created_at"),
|
|
203
260
|
"hardware_instance_id": obj.get("hardware_instance_id"),
|
|
204
261
|
"revision_number": obj.get("revision_number"),
|
|
262
|
+
"chart_revision": obj.get("chart_revision"),
|
|
205
263
|
"user_annotations": obj.get("user_annotations"),
|
|
264
|
+
"priority": obj.get("priority"),
|
|
265
|
+
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
|
|
266
|
+
"hf_token_ref": obj.get("hf_token_ref"),
|
|
206
267
|
"container_port": obj.get("container_port"),
|
|
207
268
|
"min_replicas": obj.get("min_replicas"),
|
|
208
269
|
"max_replicas": obj.get("max_replicas"),
|
|
@@ -216,6 +277,10 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
216
277
|
"command_args": obj.get("command_args"),
|
|
217
278
|
"original_command": obj.get("original_command"),
|
|
218
279
|
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
|
|
280
|
+
"env_vars_refs": obj.get("env_vars_refs"),
|
|
281
|
+
"bearer_token_ref": obj.get("bearer_token_ref"),
|
|
282
|
+
"image_pull_ref": obj.get("image_pull_ref"),
|
|
283
|
+
"image_pull_secret_name": obj.get("image_pull_secret_name"),
|
|
219
284
|
"backend_protocol": obj.get("backend_protocol"),
|
|
220
285
|
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
|
|
221
286
|
"enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False,
|
|
@@ -18,8 +18,9 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
23
24
|
from platform_api_python_client.models.config_file_mount import ConfigFileMount
|
|
24
25
|
from platform_api_python_client.models.deployment_status import DeploymentStatus
|
|
25
26
|
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
@@ -43,7 +44,10 @@ class GetJobDeploymentResponse(BaseModel):
|
|
|
43
44
|
created_at: datetime
|
|
44
45
|
hardware_instance_id: StrictInt
|
|
45
46
|
revision_number: StrictInt
|
|
47
|
+
chart_revision: Optional[StrictStr] = None
|
|
46
48
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
49
|
+
priority: Optional[StrictStr] = None
|
|
50
|
+
volume_mounts: Optional[List[VolumeMount]] = None
|
|
47
51
|
env_vars: Optional[Dict[str, StrictStr]] = None
|
|
48
52
|
command: Optional[List[StrictStr]] = None
|
|
49
53
|
args: Optional[List[StrictStr]] = None
|
|
@@ -53,10 +57,22 @@ class GetJobDeploymentResponse(BaseModel):
|
|
|
53
57
|
backoff_limit: Optional[StrictInt] = 3
|
|
54
58
|
active_deadline_seconds: Optional[StrictInt] = None
|
|
55
59
|
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
|
|
60
|
+
env_vars_refs: Optional[Dict[str, Any]] = None
|
|
61
|
+
image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
62
|
+
image_pull_secret_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=253)]] = Field(default=None, description="Name of a pre-existing image pull Secret in the deployment namespace. Created, refreshed and deleted externally. Mutually exclusive with inline registry credentials and image_pull_ref. Include on updates to retain it; null clears it.")
|
|
56
63
|
enable_logging: Optional[StrictBool] = True
|
|
57
64
|
config_file: Optional[ConfigFileMount] = None
|
|
58
|
-
|
|
59
|
-
|
|
65
|
+
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "env_vars", "command", "args", "original_command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "image_pull_secret_credentials", "env_vars_refs", "image_pull_ref", "image_pull_secret_name", "enable_logging", "config_file"]
|
|
66
|
+
|
|
67
|
+
@field_validator('image_pull_secret_name')
|
|
68
|
+
def image_pull_secret_name_validate_regular_expression(cls, value):
|
|
69
|
+
"""Validates the regular expression"""
|
|
70
|
+
if value is None:
|
|
71
|
+
return value
|
|
72
|
+
|
|
73
|
+
if not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
|
|
74
|
+
raise ValueError(r"must validate the regular expression /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/")
|
|
75
|
+
return value
|
|
60
76
|
|
|
61
77
|
model_config = ConfigDict(
|
|
62
78
|
populate_by_name=True,
|
|
@@ -97,12 +113,6 @@ class GetJobDeploymentResponse(BaseModel):
|
|
|
97
113
|
exclude=excluded_fields,
|
|
98
114
|
exclude_none=True,
|
|
99
115
|
)
|
|
100
|
-
# override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
|
|
101
|
-
if self.image_pull_secret_credentials:
|
|
102
|
-
_dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
|
|
103
|
-
# override the default output from pydantic by calling `to_dict()` of config_file
|
|
104
|
-
if self.config_file:
|
|
105
|
-
_dict['config_file'] = self.config_file.to_dict()
|
|
106
116
|
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
107
117
|
_items = []
|
|
108
118
|
if self.volume_mounts:
|
|
@@ -110,16 +120,32 @@ class GetJobDeploymentResponse(BaseModel):
|
|
|
110
120
|
if _item_volume_mounts:
|
|
111
121
|
_items.append(_item_volume_mounts.to_dict())
|
|
112
122
|
_dict['volume_mounts'] = _items
|
|
123
|
+
# override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
|
|
124
|
+
if self.image_pull_secret_credentials:
|
|
125
|
+
_dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
|
|
126
|
+
# override the default output from pydantic by calling `to_dict()` of config_file
|
|
127
|
+
if self.config_file:
|
|
128
|
+
_dict['config_file'] = self.config_file.to_dict()
|
|
113
129
|
# set to None if image_url (nullable) is None
|
|
114
130
|
# and model_fields_set contains the field
|
|
115
131
|
if self.image_url is None and "image_url" in self.model_fields_set:
|
|
116
132
|
_dict['image_url'] = None
|
|
117
133
|
|
|
134
|
+
# set to None if chart_revision (nullable) is None
|
|
135
|
+
# and model_fields_set contains the field
|
|
136
|
+
if self.chart_revision is None and "chart_revision" in self.model_fields_set:
|
|
137
|
+
_dict['chart_revision'] = None
|
|
138
|
+
|
|
118
139
|
# set to None if user_annotations (nullable) is None
|
|
119
140
|
# and model_fields_set contains the field
|
|
120
141
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
121
142
|
_dict['user_annotations'] = None
|
|
122
143
|
|
|
144
|
+
# set to None if priority (nullable) is None
|
|
145
|
+
# and model_fields_set contains the field
|
|
146
|
+
if self.priority is None and "priority" in self.model_fields_set:
|
|
147
|
+
_dict['priority'] = None
|
|
148
|
+
|
|
123
149
|
# set to None if env_vars (nullable) is None
|
|
124
150
|
# and model_fields_set contains the field
|
|
125
151
|
if self.env_vars is None and "env_vars" in self.model_fields_set:
|
|
@@ -150,6 +176,16 @@ class GetJobDeploymentResponse(BaseModel):
|
|
|
150
176
|
if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
|
|
151
177
|
_dict['image_pull_secret_credentials'] = None
|
|
152
178
|
|
|
179
|
+
# set to None if image_pull_ref (nullable) is None
|
|
180
|
+
# and model_fields_set contains the field
|
|
181
|
+
if self.image_pull_ref is None and "image_pull_ref" in self.model_fields_set:
|
|
182
|
+
_dict['image_pull_ref'] = None
|
|
183
|
+
|
|
184
|
+
# set to None if image_pull_secret_name (nullable) is None
|
|
185
|
+
# and model_fields_set contains the field
|
|
186
|
+
if self.image_pull_secret_name is None and "image_pull_secret_name" in self.model_fields_set:
|
|
187
|
+
_dict['image_pull_secret_name'] = None
|
|
188
|
+
|
|
153
189
|
# set to None if config_file (nullable) is None
|
|
154
190
|
# and model_fields_set contains the field
|
|
155
191
|
if self.config_file is None and "config_file" in self.model_fields_set:
|
|
@@ -178,7 +214,10 @@ class GetJobDeploymentResponse(BaseModel):
|
|
|
178
214
|
"created_at": obj.get("created_at"),
|
|
179
215
|
"hardware_instance_id": obj.get("hardware_instance_id"),
|
|
180
216
|
"revision_number": obj.get("revision_number"),
|
|
217
|
+
"chart_revision": obj.get("chart_revision"),
|
|
181
218
|
"user_annotations": obj.get("user_annotations"),
|
|
219
|
+
"priority": obj.get("priority"),
|
|
220
|
+
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
|
|
182
221
|
"env_vars": obj.get("env_vars"),
|
|
183
222
|
"command": obj.get("command"),
|
|
184
223
|
"args": obj.get("args"),
|
|
@@ -188,9 +227,11 @@ class GetJobDeploymentResponse(BaseModel):
|
|
|
188
227
|
"backoff_limit": obj.get("backoff_limit") if obj.get("backoff_limit") is not None else 3,
|
|
189
228
|
"active_deadline_seconds": obj.get("active_deadline_seconds"),
|
|
190
229
|
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
|
|
230
|
+
"env_vars_refs": obj.get("env_vars_refs"),
|
|
231
|
+
"image_pull_ref": obj.get("image_pull_ref"),
|
|
232
|
+
"image_pull_secret_name": obj.get("image_pull_secret_name"),
|
|
191
233
|
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
|
|
192
|
-
"config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None
|
|
193
|
-
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None
|
|
234
|
+
"config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None
|
|
194
235
|
})
|
|
195
236
|
return _obj
|
|
196
237
|
|
|
@@ -43,9 +43,7 @@ class GetObjectVolumeResponse(BaseModel):
|
|
|
43
43
|
region: StrictStr
|
|
44
44
|
prefix: Optional[StrictStr] = None
|
|
45
45
|
read_only: StrictBool
|
|
46
|
-
|
|
47
|
-
mount_options: Optional[List[StrictStr]] = None
|
|
48
|
-
__properties: ClassVar[List[str]] = ["id", "name", "cluster_id", "backend", "access_mode", "status", "pvc_name", "created_at", "provider", "bucket", "region", "prefix", "read_only", "volume_attributes", "mount_options"]
|
|
46
|
+
__properties: ClassVar[List[str]] = ["id", "name", "cluster_id", "backend", "access_mode", "status", "pvc_name", "created_at", "provider", "bucket", "region", "prefix", "read_only"]
|
|
49
47
|
|
|
50
48
|
@field_validator('backend')
|
|
51
49
|
def backend_validate_enum(cls, value):
|
|
@@ -98,16 +96,6 @@ class GetObjectVolumeResponse(BaseModel):
|
|
|
98
96
|
if self.prefix is None and "prefix" in self.model_fields_set:
|
|
99
97
|
_dict['prefix'] = None
|
|
100
98
|
|
|
101
|
-
# set to None if volume_attributes (nullable) is None
|
|
102
|
-
# and model_fields_set contains the field
|
|
103
|
-
if self.volume_attributes is None and "volume_attributes" in self.model_fields_set:
|
|
104
|
-
_dict['volume_attributes'] = None
|
|
105
|
-
|
|
106
|
-
# set to None if mount_options (nullable) is None
|
|
107
|
-
# and model_fields_set contains the field
|
|
108
|
-
if self.mount_options is None and "mount_options" in self.model_fields_set:
|
|
109
|
-
_dict['mount_options'] = None
|
|
110
|
-
|
|
111
99
|
return _dict
|
|
112
100
|
|
|
113
101
|
@classmethod
|
|
@@ -132,9 +120,7 @@ class GetObjectVolumeResponse(BaseModel):
|
|
|
132
120
|
"bucket": obj.get("bucket"),
|
|
133
121
|
"region": obj.get("region"),
|
|
134
122
|
"prefix": obj.get("prefix"),
|
|
135
|
-
"read_only": obj.get("read_only")
|
|
136
|
-
"volume_attributes": obj.get("volume_attributes"),
|
|
137
|
-
"mount_options": obj.get("mount_options")
|
|
123
|
+
"read_only": obj.get("read_only")
|
|
138
124
|
})
|
|
139
125
|
return _obj
|
|
140
126
|
|
|
@@ -32,10 +32,10 @@ class HardwareInstanceResponse(BaseModel):
|
|
|
32
32
|
num_gpu: StrictInt
|
|
33
33
|
cpu: StrictInt
|
|
34
34
|
memory: StrictInt
|
|
35
|
-
cost_per_hr: StrictInt
|
|
36
35
|
cluster_id: StrictInt
|
|
37
36
|
accelerator_memory: Optional[StrictInt] = None
|
|
38
|
-
|
|
37
|
+
cost_per_hr: StrictInt
|
|
38
|
+
__properties: ClassVar[List[str]] = ["id", "name", "gpu_type", "num_gpu", "cpu", "memory", "cluster_id", "accelerator_memory", "cost_per_hr"]
|
|
39
39
|
|
|
40
40
|
model_config = ConfigDict(
|
|
41
41
|
populate_by_name=True,
|
|
@@ -67,8 +67,10 @@ class HardwareInstanceResponse(BaseModel):
|
|
|
67
67
|
* `None` is only added to the output dict for nullable fields that
|
|
68
68
|
were set at model initialization. Other fields with value `None`
|
|
69
69
|
are ignored.
|
|
70
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
70
71
|
"""
|
|
71
72
|
excluded_fields: Set[str] = set([
|
|
73
|
+
"cost_per_hr",
|
|
72
74
|
])
|
|
73
75
|
|
|
74
76
|
_dict = self.model_dump(
|
|
@@ -99,9 +101,9 @@ class HardwareInstanceResponse(BaseModel):
|
|
|
99
101
|
"num_gpu": obj.get("num_gpu"),
|
|
100
102
|
"cpu": obj.get("cpu"),
|
|
101
103
|
"memory": obj.get("memory"),
|
|
102
|
-
"cost_per_hr": obj.get("cost_per_hr"),
|
|
103
104
|
"cluster_id": obj.get("cluster_id"),
|
|
104
|
-
"accelerator_memory": obj.get("accelerator_memory")
|
|
105
|
+
"accelerator_memory": obj.get("accelerator_memory"),
|
|
106
|
+
"cost_per_hr": obj.get("cost_per_hr")
|
|
105
107
|
})
|
|
106
108
|
return _obj
|
|
107
109
|
|