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.
Files changed (79) hide show
  1. platform_api_python_client/__init__.py +43 -10
  2. platform_api_python_client/api/external_api.py +6332 -1348
  3. platform_api_python_client/api_client.py +1 -1
  4. platform_api_python_client/configuration.py +1 -1
  5. platform_api_python_client/models/__init__.py +42 -9
  6. platform_api_python_client/models/ccl_dynamo_pools.py +116 -0
  7. platform_api_python_client/models/{create_c_serve_v2_deployment_response.py → ccl_main_pools.py} +12 -13
  8. platform_api_python_client/models/cloud_provider.py +5 -0
  9. platform_api_python_client/models/cluster_credential.py +2 -2
  10. platform_api_python_client/models/create_compute_deployment_request.py +40 -7
  11. platform_api_python_client/models/create_dynamo_deployment_request.py +97 -6
  12. platform_api_python_client/models/create_inference_v3_deployment_request.py +59 -2
  13. platform_api_python_client/models/create_job_deployment_request.py +43 -10
  14. platform_api_python_client/models/create_object_volume_request.py +19 -19
  15. platform_api_python_client/models/deployment_response.py +23 -23
  16. platform_api_python_client/models/deployment_type.py +14 -0
  17. platform_api_python_client/models/{c_serve_recipe_perf.py → dynamo_communications_input.py} +12 -19
  18. platform_api_python_client/models/dynamo_communications_output.py +91 -0
  19. platform_api_python_client/models/dynamo_image.py +105 -0
  20. platform_api_python_client/models/dynamo_kv_transfer_configuration.py +88 -0
  21. platform_api_python_client/models/dynamo_kv_transfer_policy.py +37 -0
  22. platform_api_python_client/models/dynamo_weight_transfer_configuration.py +88 -0
  23. platform_api_python_client/models/dynamo_weight_transfer_policy.py +36 -0
  24. platform_api_python_client/models/dynamo_worker_pool_config.py +37 -17
  25. platform_api_python_client/models/dynamo_worker_pools.py +23 -16
  26. platform_api_python_client/models/env.py +89 -0
  27. platform_api_python_client/models/get_cluster_response.py +4 -2
  28. platform_api_python_client/models/get_compute_deployment_response.py +45 -4
  29. platform_api_python_client/models/get_deployment_response.py +26 -2
  30. platform_api_python_client/models/get_deployment_usage_response.py +19 -4
  31. platform_api_python_client/models/get_dynamo_deployment_response.py +89 -5
  32. platform_api_python_client/models/get_inference_deployment_response.py +25 -1
  33. platform_api_python_client/models/get_inference_v3_deployment_response.py +67 -2
  34. platform_api_python_client/models/get_job_deployment_response.py +52 -11
  35. platform_api_python_client/models/get_object_volume_response.py +2 -16
  36. platform_api_python_client/models/hardware_instance_response.py +6 -4
  37. platform_api_python_client/models/image.py +112 -0
  38. platform_api_python_client/models/ingress.py +103 -0
  39. platform_api_python_client/models/insight_list_item_response.py +108 -0
  40. platform_api_python_client/models/insight_resource.py +97 -0
  41. platform_api_python_client/models/insight_resource_type.py +37 -0
  42. platform_api_python_client/models/insight_response.py +133 -0
  43. platform_api_python_client/models/insight_severity.py +40 -0
  44. platform_api_python_client/models/insight_status.py +39 -0
  45. platform_api_python_client/models/{c_serve_recipe_response.py → insight_status_change_response.py} +28 -24
  46. platform_api_python_client/models/list_insights_response.py +95 -0
  47. platform_api_python_client/models/metric.py +13 -0
  48. platform_api_python_client/models/pool.py +116 -0
  49. platform_api_python_client/models/unified_get_compute_deployment_response.py +177 -0
  50. platform_api_python_client/models/unified_get_deployment_logs_response.py +95 -0
  51. platform_api_python_client/models/{create_c_serve_v3_deployment_response.py → unified_get_deployment_pods_response.py} +8 -13
  52. platform_api_python_client/models/unified_get_deployment_response.py +164 -0
  53. platform_api_python_client/models/unified_get_deployment_revision_response.py +109 -0
  54. platform_api_python_client/models/unified_get_deployment_rollout_response.py +90 -0
  55. platform_api_python_client/models/unified_get_deployment_usage_response.py +110 -0
  56. platform_api_python_client/models/unified_get_dynamo_deployment_response.py +218 -0
  57. platform_api_python_client/models/unified_get_inference_v3_deployment_response.py +228 -0
  58. platform_api_python_client/models/unified_get_job_deployment_response.py +204 -0
  59. platform_api_python_client/models/{list_c_serve_recipe_response.py → unified_list_deployment_revisions_response.py} +7 -7
  60. platform_api_python_client/models/unified_update_deployment_rollout_request.py +87 -0
  61. platform_api_python_client/models/unified_write_compute_deployment_request.py +154 -0
  62. platform_api_python_client/models/unified_write_deployment_request.py +164 -0
  63. platform_api_python_client/models/{c_serve_v2_recipe.py → unified_write_deployment_response.py} +27 -27
  64. platform_api_python_client/models/unified_write_dynamo_deployment_request.py +197 -0
  65. platform_api_python_client/models/unified_write_inference_v3_deployment_request.py +207 -0
  66. platform_api_python_client/models/unified_write_job_deployment_request.py +183 -0
  67. platform_api_python_client/models/update_insight_status_request.py +106 -0
  68. platform_api_python_client/models/upsert_user_vault_item_request.py +1 -1
  69. platform_api_python_client/models/usage_availability.py +40 -0
  70. platform_api_python_client/models/usage_component.py +39 -0
  71. platform_api_python_client/models/validation_error.py +12 -3
  72. platform_api_python_client/models/volume_mount.py +1 -1
  73. {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/METADATA +1 -1
  74. {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/RECORD +76 -43
  75. {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/WHEEL +1 -1
  76. platform_api_python_client/models/create_c_serve_v3_deployment_request.py +0 -182
  77. platform_api_python_client/models/get_c_serve_v2_deployment_response.py +0 -169
  78. platform_api_python_client/models/get_c_serve_v3_deployment_response.py +0 -170
  79. {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/top_level.txt +0 -0
@@ -21,14 +21,17 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, Strict
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing_extensions import Annotated
23
23
  from platform_api_python_client.models.backend_protocol import BackendProtocol
24
+ from platform_api_python_client.models.dynamo_communications_input import DynamoCommunicationsInput
24
25
  from platform_api_python_client.models.dynamo_serving_mode import DynamoServingMode
26
+ from platform_api_python_client.models.dynamo_weight_transfer_configuration import DynamoWeightTransferConfiguration
25
27
  from platform_api_python_client.models.dynamo_worker_pools import DynamoWorkerPools
28
+ from platform_api_python_client.models.volume_mount import VolumeMount
26
29
  from typing import Optional, Set
27
30
  from typing_extensions import Self
28
31
 
29
32
  class CreateDynamoDeploymentRequest(BaseModel):
30
33
  """
31
- Create a Dynamo deployment. Aggregated mode requires ``hardware_instance_id``; disaggregated mode requires fixed-size ``worker_pools``.
34
+ Create a Dynamo deployment. Hardware and scaling live under ``worker_pools``: aggregated mode uses exactly ``worker_pools.worker``; disaggregated mode uses exactly ``worker_pools.prefill`` and ``worker_pools.decode`` (fixed-size until per-role autoscaling ships). The top-level ``hardware_instance_id`` / ``min_replicas`` / ``max_replicas`` / ``concurrency`` / ``cooldown_period`` fields are the deprecated aggregated-only spelling; they stay accepted and may accompany ``worker_pools`` when they agree with it. ``parse_dynamo_topology`` owns every topology rule for both spellings.
32
35
  """ # noqa: E501
33
36
  max_surge: Optional[StrictInt] = None
34
37
  max_unavailable: Optional[StrictInt] = None
@@ -37,23 +40,33 @@ class CreateDynamoDeploymentRequest(BaseModel):
37
40
  hardware_instance_id: Optional[StrictInt] = None
38
41
  user_annotations: Optional[Dict[str, StrictStr]] = None
39
42
  chart_revision: Optional[StrictStr] = None
43
+ volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
44
+ priority: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None
40
45
  serving_mode: Optional[DynamoServingMode] = None
41
46
  worker_pools: Optional[DynamoWorkerPools] = None
47
+ communications: Optional[DynamoCommunicationsInput] = None
48
+ weight_transfer: Optional[DynamoWeightTransferConfiguration] = None
42
49
  model: StrictStr
50
+ model_revision: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None
43
51
  served_model_name: Optional[StrictStr] = None
44
- min_replicas: Optional[StrictInt] = 1
45
- max_replicas: Optional[StrictInt] = 1
52
+ runtime_version: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Dynamo runtime image tag (for example 1.4.0). Defaults to the platform's current release; GET /prebuilt-images?type=dynamo lists the versions the platform has validated, but any tag may be requested. require_gpu_direct_rdma needs an EFA-capable image. Changing it restarts every component of a running deployment.")
53
+ min_replicas: Optional[StrictInt] = None
54
+ max_replicas: Optional[StrictInt] = None
46
55
  concurrency: Optional[StrictInt] = None
47
56
  cooldown_period: Optional[StrictInt] = None
48
57
  extra_args: Optional[StrictStr] = None
49
58
  hf_token: Optional[StrictStr] = None
59
+ hf_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
50
60
  env_vars: Optional[Dict[str, StrictStr]] = None
61
+ env_vars_refs: Optional[Dict[str, Any]] = None
51
62
  endpoint_bearer_token: Optional[StrictStr] = None
63
+ bearer_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
52
64
  endpoint_certificate_authority: Optional[StrictStr] = None
65
+ image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
53
66
  enable_logging: Optional[StrictBool] = True
54
67
  enable_node_model_cache: Optional[StrictBool] = False
55
68
  backend_protocol: Optional[BackendProtocol] = None
56
- __properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "serving_mode", "worker_pools", "model", "served_model_name", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "hf_token", "env_vars", "endpoint_bearer_token", "endpoint_certificate_authority", "enable_logging", "enable_node_model_cache", "backend_protocol"]
69
+ __properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "serving_mode", "worker_pools", "communications", "weight_transfer", "model", "model_revision", "served_model_name", "runtime_version", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "hf_token", "hf_token_ref", "env_vars", "env_vars_refs", "endpoint_bearer_token", "bearer_token_ref", "endpoint_certificate_authority", "image_pull_ref", "enable_logging", "enable_node_model_cache", "backend_protocol"]
57
70
 
58
71
  @field_validator('name')
59
72
  def name_validate_regular_expression(cls, value):
@@ -62,6 +75,16 @@ class CreateDynamoDeploymentRequest(BaseModel):
62
75
  raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
63
76
  return value
64
77
 
78
+ @field_validator('runtime_version')
79
+ def runtime_version_validate_regular_expression(cls, value):
80
+ """Validates the regular expression"""
81
+ if value is None:
82
+ return value
83
+
84
+ if not re.match(r"^[A-Za-z0-9_][A-Za-z0-9._-]{0,127}$", value):
85
+ raise ValueError(r"must validate the regular expression /^[A-Za-z0-9_][A-Za-z0-9._-]{0,127}$/")
86
+ return value
87
+
65
88
  model_config = ConfigDict(
66
89
  populate_by_name=True,
67
90
  validate_assignment=True,
@@ -101,9 +124,22 @@ class CreateDynamoDeploymentRequest(BaseModel):
101
124
  exclude=excluded_fields,
102
125
  exclude_none=True,
103
126
  )
127
+ # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
128
+ _items = []
129
+ if self.volume_mounts:
130
+ for _item_volume_mounts in self.volume_mounts:
131
+ if _item_volume_mounts:
132
+ _items.append(_item_volume_mounts.to_dict())
133
+ _dict['volume_mounts'] = _items
104
134
  # override the default output from pydantic by calling `to_dict()` of worker_pools
105
135
  if self.worker_pools:
106
136
  _dict['worker_pools'] = self.worker_pools.to_dict()
137
+ # override the default output from pydantic by calling `to_dict()` of communications
138
+ if self.communications:
139
+ _dict['communications'] = self.communications.to_dict()
140
+ # override the default output from pydantic by calling `to_dict()` of weight_transfer
141
+ if self.weight_transfer:
142
+ _dict['weight_transfer'] = self.weight_transfer.to_dict()
107
143
  # set to None if max_surge (nullable) is None
108
144
  # and model_fields_set contains the field
109
145
  if self.max_surge is None and "max_surge" in self.model_fields_set:
@@ -124,16 +160,46 @@ class CreateDynamoDeploymentRequest(BaseModel):
124
160
  if self.user_annotations is None and "user_annotations" in self.model_fields_set:
125
161
  _dict['user_annotations'] = None
126
162
 
163
+ # set to None if priority (nullable) is None
164
+ # and model_fields_set contains the field
165
+ if self.priority is None and "priority" in self.model_fields_set:
166
+ _dict['priority'] = None
167
+
127
168
  # set to None if worker_pools (nullable) is None
128
169
  # and model_fields_set contains the field
129
170
  if self.worker_pools is None and "worker_pools" in self.model_fields_set:
130
171
  _dict['worker_pools'] = None
131
172
 
173
+ # set to None if communications (nullable) is None
174
+ # and model_fields_set contains the field
175
+ if self.communications is None and "communications" in self.model_fields_set:
176
+ _dict['communications'] = None
177
+
178
+ # set to None if weight_transfer (nullable) is None
179
+ # and model_fields_set contains the field
180
+ if self.weight_transfer is None and "weight_transfer" in self.model_fields_set:
181
+ _dict['weight_transfer'] = None
182
+
183
+ # set to None if model_revision (nullable) is None
184
+ # and model_fields_set contains the field
185
+ if self.model_revision is None and "model_revision" in self.model_fields_set:
186
+ _dict['model_revision'] = None
187
+
132
188
  # set to None if served_model_name (nullable) is None
133
189
  # and model_fields_set contains the field
134
190
  if self.served_model_name is None and "served_model_name" in self.model_fields_set:
135
191
  _dict['served_model_name'] = None
136
192
 
193
+ # set to None if min_replicas (nullable) is None
194
+ # and model_fields_set contains the field
195
+ if self.min_replicas is None and "min_replicas" in self.model_fields_set:
196
+ _dict['min_replicas'] = None
197
+
198
+ # set to None if max_replicas (nullable) is None
199
+ # and model_fields_set contains the field
200
+ if self.max_replicas is None and "max_replicas" in self.model_fields_set:
201
+ _dict['max_replicas'] = None
202
+
137
203
  # set to None if concurrency (nullable) is None
138
204
  # and model_fields_set contains the field
139
205
  if self.concurrency is None and "concurrency" in self.model_fields_set:
@@ -154,16 +220,31 @@ class CreateDynamoDeploymentRequest(BaseModel):
154
220
  if self.hf_token is None and "hf_token" in self.model_fields_set:
155
221
  _dict['hf_token'] = None
156
222
 
223
+ # set to None if hf_token_ref (nullable) is None
224
+ # and model_fields_set contains the field
225
+ if self.hf_token_ref is None and "hf_token_ref" in self.model_fields_set:
226
+ _dict['hf_token_ref'] = None
227
+
157
228
  # set to None if endpoint_bearer_token (nullable) is None
158
229
  # and model_fields_set contains the field
159
230
  if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set:
160
231
  _dict['endpoint_bearer_token'] = None
161
232
 
233
+ # set to None if bearer_token_ref (nullable) is None
234
+ # and model_fields_set contains the field
235
+ if self.bearer_token_ref is None and "bearer_token_ref" in self.model_fields_set:
236
+ _dict['bearer_token_ref'] = None
237
+
162
238
  # set to None if endpoint_certificate_authority (nullable) is None
163
239
  # and model_fields_set contains the field
164
240
  if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set:
165
241
  _dict['endpoint_certificate_authority'] = None
166
242
 
243
+ # set to None if image_pull_ref (nullable) is None
244
+ # and model_fields_set contains the field
245
+ if self.image_pull_ref is None and "image_pull_ref" in self.model_fields_set:
246
+ _dict['image_pull_ref'] = None
247
+
167
248
  return _dict
168
249
 
169
250
  @classmethod
@@ -183,19 +264,29 @@ class CreateDynamoDeploymentRequest(BaseModel):
183
264
  "hardware_instance_id": obj.get("hardware_instance_id"),
184
265
  "user_annotations": obj.get("user_annotations"),
185
266
  "chart_revision": obj.get("chart_revision"),
267
+ "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
268
+ "priority": obj.get("priority"),
186
269
  "serving_mode": obj.get("serving_mode"),
187
270
  "worker_pools": DynamoWorkerPools.from_dict(obj["worker_pools"]) if obj.get("worker_pools") is not None else None,
271
+ "communications": DynamoCommunicationsInput.from_dict(obj["communications"]) if obj.get("communications") is not None else None,
272
+ "weight_transfer": DynamoWeightTransferConfiguration.from_dict(obj["weight_transfer"]) if obj.get("weight_transfer") is not None else None,
188
273
  "model": obj.get("model"),
274
+ "model_revision": obj.get("model_revision"),
189
275
  "served_model_name": obj.get("served_model_name"),
190
- "min_replicas": obj.get("min_replicas") if obj.get("min_replicas") is not None else 1,
191
- "max_replicas": obj.get("max_replicas") if obj.get("max_replicas") is not None else 1,
276
+ "runtime_version": obj.get("runtime_version"),
277
+ "min_replicas": obj.get("min_replicas"),
278
+ "max_replicas": obj.get("max_replicas"),
192
279
  "concurrency": obj.get("concurrency"),
193
280
  "cooldown_period": obj.get("cooldown_period"),
194
281
  "extra_args": obj.get("extra_args"),
195
282
  "hf_token": obj.get("hf_token"),
283
+ "hf_token_ref": obj.get("hf_token_ref"),
196
284
  "env_vars": obj.get("env_vars"),
285
+ "env_vars_refs": obj.get("env_vars_refs"),
197
286
  "endpoint_bearer_token": obj.get("endpoint_bearer_token"),
287
+ "bearer_token_ref": obj.get("bearer_token_ref"),
198
288
  "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"),
289
+ "image_pull_ref": obj.get("image_pull_ref"),
199
290
  "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
200
291
  "enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False,
201
292
  "backend_protocol": obj.get("backend_protocol")
@@ -24,6 +24,7 @@ from platform_api_python_client.models.backend_protocol import BackendProtocol
24
24
  from platform_api_python_client.models.config_file_mount import ConfigFileMount
25
25
  from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
26
26
  from platform_api_python_client.models.metrics_config import MetricsConfig
27
+ from platform_api_python_client.models.volume_mount import VolumeMount
27
28
  from typing import Optional, Set
28
29
  from typing_extensions import Self
29
30
 
@@ -38,26 +39,33 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
38
39
  hardware_instance_id: StrictInt
39
40
  user_annotations: Optional[Dict[str, StrictStr]] = None
40
41
  chart_revision: Optional[StrictStr] = None
42
+ volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
43
+ priority: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None
44
+ hf_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
41
45
  image_url: StrictStr
42
46
  image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
47
+ image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
48
+ 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.")
43
49
  port: Annotated[int, Field(le=65535, strict=True, ge=1)]
44
50
  min_replicas: StrictInt
45
51
  max_replicas: StrictInt
46
52
  concurrency: Optional[StrictInt] = None
47
- cooldown_period: Optional[StrictInt] = None
53
+ cooldown_period: Optional[Annotated[int, Field(le=3600, strict=True, ge=0)]] = None
48
54
  healthcheck: Optional[StrictStr] = None
49
55
  env_vars: Optional[Dict[str, StrictStr]] = None
50
56
  command: Optional[StrictStr] = None
51
57
  endpoint_bearer_token: Optional[StrictStr] = None
58
+ bearer_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
52
59
  endpoint_certificate_authority: Optional[StrictStr] = None
53
60
  hf_token: Optional[StrictStr] = None
61
+ env_vars_refs: Optional[Dict[str, Any]] = None
54
62
  backend_protocol: Optional[BackendProtocol] = None
55
63
  enable_logging: Optional[StrictBool] = False
56
64
  enable_node_model_cache: Optional[StrictBool] = False
57
65
  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.")
58
66
  config_file: Optional[ConfigFileMount] = None
59
67
  metrics: Optional[MetricsConfig] = None
60
- __properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "image_url", "image_pull_secret_credentials", "port", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "healthcheck", "env_vars", "command", "endpoint_bearer_token", "endpoint_certificate_authority", "hf_token", "backend_protocol", "enable_logging", "enable_node_model_cache", "session_affinity", "config_file", "metrics"]
68
+ __properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "hf_token_ref", "image_url", "image_pull_secret_credentials", "image_pull_ref", "image_pull_secret_name", "port", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "healthcheck", "env_vars", "command", "endpoint_bearer_token", "bearer_token_ref", "endpoint_certificate_authority", "hf_token", "env_vars_refs", "backend_protocol", "enable_logging", "enable_node_model_cache", "session_affinity", "config_file", "metrics"]
61
69
 
62
70
  @field_validator('name')
63
71
  def name_validate_regular_expression(cls, value):
@@ -66,6 +74,16 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
66
74
  raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
67
75
  return value
68
76
 
77
+ @field_validator('image_pull_secret_name')
78
+ def image_pull_secret_name_validate_regular_expression(cls, value):
79
+ """Validates the regular expression"""
80
+ if value is None:
81
+ return value
82
+
83
+ if not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
84
+ 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])?)*$/")
85
+ return value
86
+
69
87
  model_config = ConfigDict(
70
88
  populate_by_name=True,
71
89
  validate_assignment=True,
@@ -105,6 +123,13 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
105
123
  exclude=excluded_fields,
106
124
  exclude_none=True,
107
125
  )
126
+ # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
127
+ _items = []
128
+ if self.volume_mounts:
129
+ for _item_volume_mounts in self.volume_mounts:
130
+ if _item_volume_mounts:
131
+ _items.append(_item_volume_mounts.to_dict())
132
+ _dict['volume_mounts'] = _items
108
133
  # override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
109
134
  if self.image_pull_secret_credentials:
110
135
  _dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
@@ -129,11 +154,31 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
129
154
  if self.user_annotations is None and "user_annotations" in self.model_fields_set:
130
155
  _dict['user_annotations'] = None
131
156
 
157
+ # set to None if priority (nullable) is None
158
+ # and model_fields_set contains the field
159
+ if self.priority is None and "priority" in self.model_fields_set:
160
+ _dict['priority'] = None
161
+
162
+ # set to None if hf_token_ref (nullable) is None
163
+ # and model_fields_set contains the field
164
+ if self.hf_token_ref is None and "hf_token_ref" in self.model_fields_set:
165
+ _dict['hf_token_ref'] = None
166
+
132
167
  # set to None if image_pull_secret_credentials (nullable) is None
133
168
  # and model_fields_set contains the field
134
169
  if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
135
170
  _dict['image_pull_secret_credentials'] = None
136
171
 
172
+ # set to None if image_pull_ref (nullable) is None
173
+ # and model_fields_set contains the field
174
+ if self.image_pull_ref is None and "image_pull_ref" in self.model_fields_set:
175
+ _dict['image_pull_ref'] = None
176
+
177
+ # set to None if image_pull_secret_name (nullable) is None
178
+ # and model_fields_set contains the field
179
+ if self.image_pull_secret_name is None and "image_pull_secret_name" in self.model_fields_set:
180
+ _dict['image_pull_secret_name'] = None
181
+
137
182
  # set to None if concurrency (nullable) is None
138
183
  # and model_fields_set contains the field
139
184
  if self.concurrency is None and "concurrency" in self.model_fields_set:
@@ -164,6 +209,11 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
164
209
  if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set:
165
210
  _dict['endpoint_bearer_token'] = None
166
211
 
212
+ # set to None if bearer_token_ref (nullable) is None
213
+ # and model_fields_set contains the field
214
+ if self.bearer_token_ref is None and "bearer_token_ref" in self.model_fields_set:
215
+ _dict['bearer_token_ref'] = None
216
+
167
217
  # set to None if endpoint_certificate_authority (nullable) is None
168
218
  # and model_fields_set contains the field
169
219
  if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set:
@@ -203,8 +253,13 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
203
253
  "hardware_instance_id": obj.get("hardware_instance_id"),
204
254
  "user_annotations": obj.get("user_annotations"),
205
255
  "chart_revision": obj.get("chart_revision"),
256
+ "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
257
+ "priority": obj.get("priority"),
258
+ "hf_token_ref": obj.get("hf_token_ref"),
206
259
  "image_url": obj.get("image_url"),
207
260
  "image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
261
+ "image_pull_ref": obj.get("image_pull_ref"),
262
+ "image_pull_secret_name": obj.get("image_pull_secret_name"),
208
263
  "port": obj.get("port"),
209
264
  "min_replicas": obj.get("min_replicas"),
210
265
  "max_replicas": obj.get("max_replicas"),
@@ -214,8 +269,10 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
214
269
  "env_vars": obj.get("env_vars"),
215
270
  "command": obj.get("command"),
216
271
  "endpoint_bearer_token": obj.get("endpoint_bearer_token"),
272
+ "bearer_token_ref": obj.get("bearer_token_ref"),
217
273
  "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"),
218
274
  "hf_token": obj.get("hf_token"),
275
+ "env_vars_refs": obj.get("env_vars_refs"),
219
276
  "backend_protocol": obj.get("backend_protocol"),
220
277
  "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else False,
221
278
  "enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False,
@@ -35,9 +35,14 @@ class CreateJobDeploymentRequest(BaseModel):
35
35
  hardware_instance_id: StrictInt
36
36
  user_annotations: Optional[Dict[str, StrictStr]] = None
37
37
  chart_revision: Optional[StrictStr] = None
38
+ volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
39
+ priority: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None
38
40
  image_url: StrictStr
39
41
  image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
42
+ image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
43
+ 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.")
40
44
  env_vars: Optional[Dict[str, StrictStr]] = None
45
+ env_vars_refs: Optional[Dict[str, Any]] = None
41
46
  command: Optional[StrictStr] = None
42
47
  completions: Optional[StrictInt] = 1
43
48
  parallelism: Optional[StrictInt] = 1
@@ -45,8 +50,7 @@ class CreateJobDeploymentRequest(BaseModel):
45
50
  active_deadline_seconds: Optional[StrictInt] = None
46
51
  enable_logging: Optional[StrictBool] = True
47
52
  config_file: Optional[ConfigFileMount] = None
48
- volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
49
- __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "image_url", "image_pull_secret_credentials", "env_vars", "command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "enable_logging", "config_file", "volume_mounts"]
53
+ __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "image_url", "image_pull_secret_credentials", "image_pull_ref", "image_pull_secret_name", "env_vars", "env_vars_refs", "command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "enable_logging", "config_file"]
50
54
 
51
55
  @field_validator('name')
52
56
  def name_validate_regular_expression(cls, value):
@@ -55,6 +59,16 @@ class CreateJobDeploymentRequest(BaseModel):
55
59
  raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
56
60
  return value
57
61
 
62
+ @field_validator('image_pull_secret_name')
63
+ def image_pull_secret_name_validate_regular_expression(cls, value):
64
+ """Validates the regular expression"""
65
+ if value is None:
66
+ return value
67
+
68
+ if not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
69
+ 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])?)*$/")
70
+ return value
71
+
58
72
  model_config = ConfigDict(
59
73
  populate_by_name=True,
60
74
  validate_assignment=True,
@@ -94,12 +108,6 @@ class CreateJobDeploymentRequest(BaseModel):
94
108
  exclude=excluded_fields,
95
109
  exclude_none=True,
96
110
  )
97
- # override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
98
- if self.image_pull_secret_credentials:
99
- _dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
100
- # override the default output from pydantic by calling `to_dict()` of config_file
101
- if self.config_file:
102
- _dict['config_file'] = self.config_file.to_dict()
103
111
  # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
104
112
  _items = []
105
113
  if self.volume_mounts:
@@ -107,16 +115,37 @@ class CreateJobDeploymentRequest(BaseModel):
107
115
  if _item_volume_mounts:
108
116
  _items.append(_item_volume_mounts.to_dict())
109
117
  _dict['volume_mounts'] = _items
118
+ # override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
119
+ if self.image_pull_secret_credentials:
120
+ _dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
121
+ # override the default output from pydantic by calling `to_dict()` of config_file
122
+ if self.config_file:
123
+ _dict['config_file'] = self.config_file.to_dict()
110
124
  # set to None if user_annotations (nullable) is None
111
125
  # and model_fields_set contains the field
112
126
  if self.user_annotations is None and "user_annotations" in self.model_fields_set:
113
127
  _dict['user_annotations'] = None
114
128
 
129
+ # set to None if priority (nullable) is None
130
+ # and model_fields_set contains the field
131
+ if self.priority is None and "priority" in self.model_fields_set:
132
+ _dict['priority'] = None
133
+
115
134
  # set to None if image_pull_secret_credentials (nullable) is None
116
135
  # and model_fields_set contains the field
117
136
  if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
118
137
  _dict['image_pull_secret_credentials'] = None
119
138
 
139
+ # set to None if image_pull_ref (nullable) is None
140
+ # and model_fields_set contains the field
141
+ if self.image_pull_ref is None and "image_pull_ref" in self.model_fields_set:
142
+ _dict['image_pull_ref'] = None
143
+
144
+ # set to None if image_pull_secret_name (nullable) is None
145
+ # and model_fields_set contains the field
146
+ if self.image_pull_secret_name is None and "image_pull_secret_name" in self.model_fields_set:
147
+ _dict['image_pull_secret_name'] = None
148
+
120
149
  # set to None if env_vars (nullable) is None
121
150
  # and model_fields_set contains the field
122
151
  if self.env_vars is None and "env_vars" in self.model_fields_set:
@@ -154,17 +183,21 @@ class CreateJobDeploymentRequest(BaseModel):
154
183
  "hardware_instance_id": obj.get("hardware_instance_id"),
155
184
  "user_annotations": obj.get("user_annotations"),
156
185
  "chart_revision": obj.get("chart_revision"),
186
+ "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
187
+ "priority": obj.get("priority"),
157
188
  "image_url": obj.get("image_url"),
158
189
  "image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
190
+ "image_pull_ref": obj.get("image_pull_ref"),
191
+ "image_pull_secret_name": obj.get("image_pull_secret_name"),
159
192
  "env_vars": obj.get("env_vars"),
193
+ "env_vars_refs": obj.get("env_vars_refs"),
160
194
  "command": obj.get("command"),
161
195
  "completions": obj.get("completions") if obj.get("completions") is not None else 1,
162
196
  "parallelism": obj.get("parallelism") if obj.get("parallelism") is not None else 1,
163
197
  "backoff_limit": obj.get("backoff_limit") if obj.get("backoff_limit") is not None else 3,
164
198
  "active_deadline_seconds": obj.get("active_deadline_seconds"),
165
199
  "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
166
- "config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None,
167
- "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None
200
+ "config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None
168
201
  })
169
202
  return _obj
170
203
 
@@ -32,13 +32,11 @@ class CreateObjectVolumeRequest(BaseModel):
32
32
  cluster_id: StrictInt
33
33
  backend: StrictStr
34
34
  provider: Optional[ObjectStorageProvider] = None
35
- bucket: Annotated[str, Field(min_length=3, strict=True, max_length=253)]
36
- region: Annotated[str, Field(min_length=1, strict=True)]
37
- prefix: Optional[StrictStr] = None
35
+ bucket: Annotated[str, Field(min_length=3, strict=True, max_length=255)]
36
+ region: Annotated[str, Field(min_length=1, strict=True, max_length=63)]
37
+ prefix: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = None
38
38
  read_only: Optional[StrictBool] = False
39
- volume_attributes: Optional[Dict[str, StrictStr]] = None
40
- mount_options: Optional[List[StrictStr]] = None
41
- __properties: ClassVar[List[str]] = ["name", "cluster_id", "backend", "provider", "bucket", "region", "prefix", "read_only", "volume_attributes", "mount_options"]
39
+ __properties: ClassVar[List[str]] = ["name", "cluster_id", "backend", "provider", "bucket", "region", "prefix", "read_only"]
42
40
 
43
41
  @field_validator('name')
44
42
  def name_validate_regular_expression(cls, value):
@@ -54,6 +52,20 @@ class CreateObjectVolumeRequest(BaseModel):
54
52
  raise ValueError("must be one of enum values ('object')")
55
53
  return value
56
54
 
55
+ @field_validator('bucket')
56
+ def bucket_validate_regular_expression(cls, value):
57
+ """Validates the regular expression"""
58
+ if not re.match(r"^(?:[0-9A-Za-z._-]+|arn:[a-z0-9-]+:s3(?:-outposts|-object-lambda)?:[0-9A-Za-z._:\/+=,@-]+)$", value):
59
+ raise ValueError(r"must validate the regular expression /^(?:[0-9A-Za-z._-]+|arn:[a-z0-9-]+:s3(?:-outposts|-object-lambda)?:[0-9A-Za-z._:\/+=,@-]+)$/")
60
+ return value
61
+
62
+ @field_validator('region')
63
+ def region_validate_regular_expression(cls, value):
64
+ """Validates the regular expression"""
65
+ if not re.match(r"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$", value):
66
+ raise ValueError(r"must validate the regular expression /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/")
67
+ return value
68
+
57
69
  model_config = ConfigDict(
58
70
  populate_by_name=True,
59
71
  validate_assignment=True,
@@ -98,16 +110,6 @@ class CreateObjectVolumeRequest(BaseModel):
98
110
  if self.prefix is None and "prefix" in self.model_fields_set:
99
111
  _dict['prefix'] = None
100
112
 
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
113
  return _dict
112
114
 
113
115
  @classmethod
@@ -127,9 +129,7 @@ class CreateObjectVolumeRequest(BaseModel):
127
129
  "bucket": obj.get("bucket"),
128
130
  "region": obj.get("region"),
129
131
  "prefix": obj.get("prefix"),
130
- "read_only": obj.get("read_only") if obj.get("read_only") is not None else False,
131
- "volume_attributes": obj.get("volume_attributes"),
132
- "mount_options": obj.get("mount_options")
132
+ "read_only": obj.get("read_only") if obj.get("read_only") is not None else False
133
133
  })
134
134
  return _obj
135
135