platform-api-python-client 4.25.0__py3-none-any.whl → 4.28.0__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 +7 -1
- platform_api_python_client/api/external_api.py +2063 -485
- platform_api_python_client/api_client.py +1 -1
- platform_api_python_client/configuration.py +1 -1
- platform_api_python_client/models/__init__.py +6 -0
- platform_api_python_client/models/create_c_serve_v3_deployment_request.py +1 -8
- platform_api_python_client/models/create_compute_deployment_request.py +12 -2
- platform_api_python_client/models/create_inference_v3_deployment_request.py +1 -8
- platform_api_python_client/models/create_job_deployment_request.py +12 -2
- platform_api_python_client/models/get_c_serve_v3_deployment_response.py +1 -8
- platform_api_python_client/models/get_compute_deployment_response.py +11 -1
- platform_api_python_client/models/get_inference_v3_deployment_response.py +1 -8
- platform_api_python_client/models/get_job_deployment_response.py +12 -2
- platform_api_python_client/models/hardware_preset_response.py +96 -0
- platform_api_python_client/models/list_hardware_preset_response.py +95 -0
- platform_api_python_client/models/list_organization_gpu_quota_response.py +95 -0
- platform_api_python_client/models/organization_gpu_quota_request.py +88 -0
- platform_api_python_client/models/organization_gpu_quota_response.py +91 -0
- platform_api_python_client/models/volume_mount.py +92 -0
- {platform_api_python_client-4.25.0.dist-info → platform_api_python_client-4.28.0.dist-info}/METADATA +1 -1
- {platform_api_python_client-4.25.0.dist-info → platform_api_python_client-4.28.0.dist-info}/RECORD +23 -17
- {platform_api_python_client-4.25.0.dist-info → platform_api_python_client-4.28.0.dist-info}/WHEEL +0 -0
- {platform_api_python_client-4.25.0.dist-info → platform_api_python_client-4.28.0.dist-info}/top_level.txt +0 -0
|
@@ -90,7 +90,7 @@ class ApiClient:
|
|
|
90
90
|
self.default_headers[header_name] = header_value
|
|
91
91
|
self.cookie = cookie
|
|
92
92
|
# Set default User-Agent.
|
|
93
|
-
self.user_agent = 'OpenAPI-Generator/4.
|
|
93
|
+
self.user_agent = 'OpenAPI-Generator/4.28.0/python'
|
|
94
94
|
self.client_side_validation = configuration.client_side_validation
|
|
95
95
|
|
|
96
96
|
def __enter__(self):
|
|
@@ -392,7 +392,7 @@ class Configuration:
|
|
|
392
392
|
"OS: {env}\n"\
|
|
393
393
|
"Python Version: {pyversion}\n"\
|
|
394
394
|
"Version of the API: 0.1.0\n"\
|
|
395
|
-
"SDK Package Version: 4.
|
|
395
|
+
"SDK Package Version: 4.28.0".\
|
|
396
396
|
format(env=sys.platform, pyversion=sys.version)
|
|
397
397
|
|
|
398
398
|
def get_host_settings(self):
|
|
@@ -88,6 +88,7 @@ from platform_api_python_client.models.gpu_operator import GpuOperator
|
|
|
88
88
|
from platform_api_python_client.models.gpu_type_capacity import GpuTypeCapacity
|
|
89
89
|
from platform_api_python_client.models.http_validation_error import HTTPValidationError
|
|
90
90
|
from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse
|
|
91
|
+
from platform_api_python_client.models.hardware_preset_response import HardwarePresetResponse
|
|
91
92
|
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
|
|
92
93
|
from platform_api_python_client.models.ingress_nginx import IngressNginx
|
|
93
94
|
from platform_api_python_client.models.invite_user_request import InviteUserRequest
|
|
@@ -104,6 +105,8 @@ from platform_api_python_client.models.list_deployment_revisions_response import
|
|
|
104
105
|
from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse
|
|
105
106
|
from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse
|
|
106
107
|
from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse
|
|
108
|
+
from platform_api_python_client.models.list_hardware_preset_response import ListHardwarePresetResponse
|
|
109
|
+
from platform_api_python_client.models.list_organization_gpu_quota_response import ListOrganizationGpuQuotaResponse
|
|
107
110
|
from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse
|
|
108
111
|
from platform_api_python_client.models.list_service_accounts_response import ListServiceAccountsResponse
|
|
109
112
|
from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse
|
|
@@ -115,6 +118,8 @@ from platform_api_python_client.models.metrics_server import MetricsServer
|
|
|
115
118
|
from platform_api_python_client.models.network_operator import NetworkOperator
|
|
116
119
|
from platform_api_python_client.models.object_storage_provider import ObjectStorageProvider
|
|
117
120
|
from platform_api_python_client.models.opentelemetry_collector import OpentelemetryCollector
|
|
121
|
+
from platform_api_python_client.models.organization_gpu_quota_request import OrganizationGpuQuotaRequest
|
|
122
|
+
from platform_api_python_client.models.organization_gpu_quota_response import OrganizationGpuQuotaResponse
|
|
118
123
|
from platform_api_python_client.models.pod_details import PodDetails
|
|
119
124
|
from platform_api_python_client.models.pod_status import PodStatus
|
|
120
125
|
from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse
|
|
@@ -139,5 +144,6 @@ from platform_api_python_client.models.validation_error_loc_inner import Validat
|
|
|
139
144
|
from platform_api_python_client.models.vault_scope import VaultScope
|
|
140
145
|
from platform_api_python_client.models.volume_access_mode import VolumeAccessMode
|
|
141
146
|
from platform_api_python_client.models.volume_backend import VolumeBackend
|
|
147
|
+
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
142
148
|
from platform_api_python_client.models.volume_status import VolumeStatus
|
|
143
149
|
from platform_api_python_client.models.volume_status_response import VolumeStatusResponse
|
|
@@ -42,14 +42,13 @@ class CreateCServeV3DeploymentRequest(BaseModel):
|
|
|
42
42
|
endpoint_certificate_authority: Optional[StrictStr] = None
|
|
43
43
|
min_replicas: StrictInt
|
|
44
44
|
max_replicas: StrictInt
|
|
45
|
-
initial_replicas: Optional[StrictInt] = None
|
|
46
45
|
concurrency: Optional[StrictInt] = None
|
|
47
46
|
cooldown_period: Optional[StrictInt] = None
|
|
48
47
|
env_vars: Optional[Dict[str, StrictStr]] = None
|
|
49
48
|
enable_logging: Optional[StrictBool] = True
|
|
50
49
|
enable_node_model_cache: Optional[StrictBool] = False
|
|
51
50
|
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.")
|
|
52
|
-
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_replicas", "max_replicas", "
|
|
51
|
+
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "env_vars", "enable_logging", "enable_node_model_cache", "session_affinity"]
|
|
53
52
|
|
|
54
53
|
@field_validator('name')
|
|
55
54
|
def name_validate_regular_expression(cls, value):
|
|
@@ -135,11 +134,6 @@ class CreateCServeV3DeploymentRequest(BaseModel):
|
|
|
135
134
|
if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set:
|
|
136
135
|
_dict['endpoint_certificate_authority'] = None
|
|
137
136
|
|
|
138
|
-
# set to None if initial_replicas (nullable) is None
|
|
139
|
-
# and model_fields_set contains the field
|
|
140
|
-
if self.initial_replicas is None and "initial_replicas" in self.model_fields_set:
|
|
141
|
-
_dict['initial_replicas'] = None
|
|
142
|
-
|
|
143
137
|
# set to None if concurrency (nullable) is None
|
|
144
138
|
# and model_fields_set contains the field
|
|
145
139
|
if self.concurrency is None and "concurrency" in self.model_fields_set:
|
|
@@ -176,7 +170,6 @@ class CreateCServeV3DeploymentRequest(BaseModel):
|
|
|
176
170
|
"endpoint_certificate_authority": obj.get("endpoint_certificate_authority"),
|
|
177
171
|
"min_replicas": obj.get("min_replicas"),
|
|
178
172
|
"max_replicas": obj.get("max_replicas"),
|
|
179
|
-
"initial_replicas": obj.get("initial_replicas"),
|
|
180
173
|
"concurrency": obj.get("concurrency"),
|
|
181
174
|
"cooldown_period": obj.get("cooldown_period"),
|
|
182
175
|
"env_vars": obj.get("env_vars"),
|
|
@@ -21,6 +21,7 @@ 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.image_pull_secret_credentials import ImagePullSecretCredentials
|
|
24
|
+
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
26
27
|
|
|
@@ -37,7 +38,8 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
37
38
|
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
|
|
38
39
|
ssh_public_key: StrictStr
|
|
39
40
|
enable_logging: Optional[StrictBool] = False
|
|
40
|
-
|
|
41
|
+
volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
|
|
42
|
+
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "image_url", "image_pull_secret_credentials", "ssh_public_key", "enable_logging", "volume_mounts"]
|
|
41
43
|
|
|
42
44
|
@field_validator('name')
|
|
43
45
|
def name_validate_regular_expression(cls, value):
|
|
@@ -88,6 +90,13 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
88
90
|
# override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
|
|
89
91
|
if self.image_pull_secret_credentials:
|
|
90
92
|
_dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
|
|
93
|
+
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
94
|
+
_items = []
|
|
95
|
+
if self.volume_mounts:
|
|
96
|
+
for _item_volume_mounts in self.volume_mounts:
|
|
97
|
+
if _item_volume_mounts:
|
|
98
|
+
_items.append(_item_volume_mounts.to_dict())
|
|
99
|
+
_dict['volume_mounts'] = _items
|
|
91
100
|
# set to None if user_annotations (nullable) is None
|
|
92
101
|
# and model_fields_set contains the field
|
|
93
102
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
@@ -118,7 +127,8 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
118
127
|
"image_url": obj.get("image_url"),
|
|
119
128
|
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
|
|
120
129
|
"ssh_public_key": obj.get("ssh_public_key"),
|
|
121
|
-
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else False
|
|
130
|
+
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else False,
|
|
131
|
+
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None
|
|
122
132
|
})
|
|
123
133
|
return _obj
|
|
124
134
|
|
|
@@ -43,7 +43,6 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
|
|
|
43
43
|
port: Annotated[int, Field(le=65535, strict=True, ge=1)]
|
|
44
44
|
min_replicas: StrictInt
|
|
45
45
|
max_replicas: StrictInt
|
|
46
|
-
initial_replicas: Optional[StrictInt] = None
|
|
47
46
|
concurrency: Optional[StrictInt] = None
|
|
48
47
|
cooldown_period: Optional[StrictInt] = None
|
|
49
48
|
healthcheck: Optional[StrictStr] = None
|
|
@@ -58,7 +57,7 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
|
|
|
58
57
|
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.")
|
|
59
58
|
config_file: Optional[ConfigFileMount] = None
|
|
60
59
|
metrics: Optional[MetricsConfig] = None
|
|
61
|
-
__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", "
|
|
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"]
|
|
62
61
|
|
|
63
62
|
@field_validator('name')
|
|
64
63
|
def name_validate_regular_expression(cls, value):
|
|
@@ -135,11 +134,6 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
|
|
|
135
134
|
if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
|
|
136
135
|
_dict['image_pull_secret_credentials'] = None
|
|
137
136
|
|
|
138
|
-
# set to None if initial_replicas (nullable) is None
|
|
139
|
-
# and model_fields_set contains the field
|
|
140
|
-
if self.initial_replicas is None and "initial_replicas" in self.model_fields_set:
|
|
141
|
-
_dict['initial_replicas'] = None
|
|
142
|
-
|
|
143
137
|
# set to None if concurrency (nullable) is None
|
|
144
138
|
# and model_fields_set contains the field
|
|
145
139
|
if self.concurrency is None and "concurrency" in self.model_fields_set:
|
|
@@ -214,7 +208,6 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
|
|
|
214
208
|
"port": obj.get("port"),
|
|
215
209
|
"min_replicas": obj.get("min_replicas"),
|
|
216
210
|
"max_replicas": obj.get("max_replicas"),
|
|
217
|
-
"initial_replicas": obj.get("initial_replicas"),
|
|
218
211
|
"concurrency": obj.get("concurrency"),
|
|
219
212
|
"cooldown_period": obj.get("cooldown_period"),
|
|
220
213
|
"healthcheck": obj.get("healthcheck"),
|
|
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from platform_api_python_client.models.config_file_mount import ConfigFileMount
|
|
24
24
|
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
|
|
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
|
|
|
@@ -44,7 +45,8 @@ class CreateJobDeploymentRequest(BaseModel):
|
|
|
44
45
|
active_deadline_seconds: Optional[StrictInt] = None
|
|
45
46
|
enable_logging: Optional[StrictBool] = True
|
|
46
47
|
config_file: Optional[ConfigFileMount] = None
|
|
47
|
-
|
|
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"]
|
|
48
50
|
|
|
49
51
|
@field_validator('name')
|
|
50
52
|
def name_validate_regular_expression(cls, value):
|
|
@@ -98,6 +100,13 @@ class CreateJobDeploymentRequest(BaseModel):
|
|
|
98
100
|
# override the default output from pydantic by calling `to_dict()` of config_file
|
|
99
101
|
if self.config_file:
|
|
100
102
|
_dict['config_file'] = self.config_file.to_dict()
|
|
103
|
+
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
104
|
+
_items = []
|
|
105
|
+
if self.volume_mounts:
|
|
106
|
+
for _item_volume_mounts in self.volume_mounts:
|
|
107
|
+
if _item_volume_mounts:
|
|
108
|
+
_items.append(_item_volume_mounts.to_dict())
|
|
109
|
+
_dict['volume_mounts'] = _items
|
|
101
110
|
# set to None if user_annotations (nullable) is None
|
|
102
111
|
# and model_fields_set contains the field
|
|
103
112
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
@@ -154,7 +163,8 @@ class CreateJobDeploymentRequest(BaseModel):
|
|
|
154
163
|
"backoff_limit": obj.get("backoff_limit") if obj.get("backoff_limit") is not None else 3,
|
|
155
164
|
"active_deadline_seconds": obj.get("active_deadline_seconds"),
|
|
156
165
|
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
|
|
157
|
-
"config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None
|
|
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
|
|
158
168
|
})
|
|
159
169
|
return _obj
|
|
160
170
|
|
|
@@ -46,7 +46,6 @@ class GetCServeV3DeploymentResponse(BaseModel):
|
|
|
46
46
|
cserve_version: Optional[StrictStr] = None
|
|
47
47
|
min_replicas: StrictInt
|
|
48
48
|
max_replicas: StrictInt
|
|
49
|
-
initial_replicas: Optional[StrictInt] = None
|
|
50
49
|
endpoint_certificate_authority: Optional[StrictStr] = None
|
|
51
50
|
endpoint_bearer_token: Optional[StrictStr] = None
|
|
52
51
|
concurrency: Optional[StrictInt] = None
|
|
@@ -55,7 +54,7 @@ class GetCServeV3DeploymentResponse(BaseModel):
|
|
|
55
54
|
enable_logging: Optional[StrictBool] = True
|
|
56
55
|
enable_node_model_cache: Optional[StrictBool] = False
|
|
57
56
|
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
|
-
__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", "recipe", "cserve_version", "min_replicas", "max_replicas", "
|
|
57
|
+
__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", "recipe", "cserve_version", "min_replicas", "max_replicas", "endpoint_certificate_authority", "endpoint_bearer_token", "concurrency", "cooldown_period", "env_vars", "enable_logging", "enable_node_model_cache", "session_affinity"]
|
|
59
58
|
|
|
60
59
|
model_config = ConfigDict(
|
|
61
60
|
populate_by_name=True,
|
|
@@ -114,11 +113,6 @@ class GetCServeV3DeploymentResponse(BaseModel):
|
|
|
114
113
|
if self.cserve_version is None and "cserve_version" in self.model_fields_set:
|
|
115
114
|
_dict['cserve_version'] = None
|
|
116
115
|
|
|
117
|
-
# set to None if initial_replicas (nullable) is None
|
|
118
|
-
# and model_fields_set contains the field
|
|
119
|
-
if self.initial_replicas is None and "initial_replicas" in self.model_fields_set:
|
|
120
|
-
_dict['initial_replicas'] = None
|
|
121
|
-
|
|
122
116
|
# set to None if endpoint_certificate_authority (nullable) is None
|
|
123
117
|
# and model_fields_set contains the field
|
|
124
118
|
if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set:
|
|
@@ -162,7 +156,6 @@ class GetCServeV3DeploymentResponse(BaseModel):
|
|
|
162
156
|
"cserve_version": obj.get("cserve_version"),
|
|
163
157
|
"min_replicas": obj.get("min_replicas"),
|
|
164
158
|
"max_replicas": obj.get("max_replicas"),
|
|
165
|
-
"initial_replicas": obj.get("initial_replicas"),
|
|
166
159
|
"endpoint_certificate_authority": obj.get("endpoint_certificate_authority"),
|
|
167
160
|
"endpoint_bearer_token": obj.get("endpoint_bearer_token"),
|
|
168
161
|
"concurrency": obj.get("concurrency"),
|
|
@@ -23,6 +23,7 @@ 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
25
|
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
|
|
26
|
+
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
26
27
|
from typing import Optional, Set
|
|
27
28
|
from typing_extensions import Self
|
|
28
29
|
|
|
@@ -43,12 +44,13 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
43
44
|
revision_number: StrictInt
|
|
44
45
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
45
46
|
exposed_port: StrictInt
|
|
47
|
+
volume_mounts: Optional[List[VolumeMount]] = None
|
|
46
48
|
ssh_public_key: Optional[StrictStr] = None
|
|
47
49
|
ssh_password: Optional[StrictStr] = None
|
|
48
50
|
env_vars: Optional[Dict[str, StrictStr]] = None
|
|
49
51
|
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
|
|
50
52
|
enable_logging: Optional[StrictBool] = True
|
|
51
|
-
__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", "exposed_port", "ssh_public_key", "ssh_password", "env_vars", "image_pull_secret_credentials", "enable_logging"]
|
|
53
|
+
__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", "exposed_port", "volume_mounts", "ssh_public_key", "ssh_password", "env_vars", "image_pull_secret_credentials", "enable_logging"]
|
|
52
54
|
|
|
53
55
|
model_config = ConfigDict(
|
|
54
56
|
populate_by_name=True,
|
|
@@ -89,6 +91,13 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
89
91
|
exclude=excluded_fields,
|
|
90
92
|
exclude_none=True,
|
|
91
93
|
)
|
|
94
|
+
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
95
|
+
_items = []
|
|
96
|
+
if self.volume_mounts:
|
|
97
|
+
for _item_volume_mounts in self.volume_mounts:
|
|
98
|
+
if _item_volume_mounts:
|
|
99
|
+
_items.append(_item_volume_mounts.to_dict())
|
|
100
|
+
_dict['volume_mounts'] = _items
|
|
92
101
|
# override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
|
|
93
102
|
if self.image_pull_secret_credentials:
|
|
94
103
|
_dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
|
|
@@ -147,6 +156,7 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
147
156
|
"revision_number": obj.get("revision_number"),
|
|
148
157
|
"user_annotations": obj.get("user_annotations"),
|
|
149
158
|
"exposed_port": obj.get("exposed_port"),
|
|
159
|
+
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
|
|
150
160
|
"ssh_public_key": obj.get("ssh_public_key"),
|
|
151
161
|
"ssh_password": obj.get("ssh_password"),
|
|
152
162
|
"env_vars": obj.get("env_vars"),
|
|
@@ -48,7 +48,6 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
48
48
|
container_port: StrictInt
|
|
49
49
|
min_replicas: StrictInt
|
|
50
50
|
max_replicas: StrictInt
|
|
51
|
-
initial_replicas: Optional[StrictInt] = None
|
|
52
51
|
concurrency: Optional[StrictInt] = None
|
|
53
52
|
cooldown_period: Optional[StrictInt] = 1800
|
|
54
53
|
healthcheck: Optional[StrictStr] = None
|
|
@@ -65,7 +64,7 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
65
64
|
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.")
|
|
66
65
|
config_file: Optional[ConfigFileMount] = None
|
|
67
66
|
metrics: Optional[MetricsConfig] = None
|
|
68
|
-
__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", "
|
|
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"]
|
|
69
68
|
|
|
70
69
|
model_config = ConfigDict(
|
|
71
70
|
populate_by_name=True,
|
|
@@ -125,11 +124,6 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
125
124
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
126
125
|
_dict['user_annotations'] = None
|
|
127
126
|
|
|
128
|
-
# set to None if initial_replicas (nullable) is None
|
|
129
|
-
# and model_fields_set contains the field
|
|
130
|
-
if self.initial_replicas is None and "initial_replicas" in self.model_fields_set:
|
|
131
|
-
_dict['initial_replicas'] = None
|
|
132
|
-
|
|
133
127
|
# set to None if concurrency (nullable) is None
|
|
134
128
|
# and model_fields_set contains the field
|
|
135
129
|
if self.concurrency is None and "concurrency" in self.model_fields_set:
|
|
@@ -212,7 +206,6 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
212
206
|
"container_port": obj.get("container_port"),
|
|
213
207
|
"min_replicas": obj.get("min_replicas"),
|
|
214
208
|
"max_replicas": obj.get("max_replicas"),
|
|
215
|
-
"initial_replicas": obj.get("initial_replicas"),
|
|
216
209
|
"concurrency": obj.get("concurrency"),
|
|
217
210
|
"cooldown_period": obj.get("cooldown_period") if obj.get("cooldown_period") is not None else 1800,
|
|
218
211
|
"healthcheck": obj.get("healthcheck"),
|
|
@@ -24,6 +24,7 @@ from platform_api_python_client.models.config_file_mount import ConfigFileMount
|
|
|
24
24
|
from platform_api_python_client.models.deployment_status import DeploymentStatus
|
|
25
25
|
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
26
26
|
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
|
|
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
|
|
|
@@ -54,7 +55,8 @@ class GetJobDeploymentResponse(BaseModel):
|
|
|
54
55
|
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
|
|
55
56
|
enable_logging: Optional[StrictBool] = True
|
|
56
57
|
config_file: Optional[ConfigFileMount] = None
|
|
57
|
-
|
|
58
|
+
volume_mounts: Optional[List[VolumeMount]] = None
|
|
59
|
+
__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", "env_vars", "command", "args", "original_command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "image_pull_secret_credentials", "enable_logging", "config_file", "volume_mounts"]
|
|
58
60
|
|
|
59
61
|
model_config = ConfigDict(
|
|
60
62
|
populate_by_name=True,
|
|
@@ -101,6 +103,13 @@ class GetJobDeploymentResponse(BaseModel):
|
|
|
101
103
|
# override the default output from pydantic by calling `to_dict()` of config_file
|
|
102
104
|
if self.config_file:
|
|
103
105
|
_dict['config_file'] = self.config_file.to_dict()
|
|
106
|
+
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
107
|
+
_items = []
|
|
108
|
+
if self.volume_mounts:
|
|
109
|
+
for _item_volume_mounts in self.volume_mounts:
|
|
110
|
+
if _item_volume_mounts:
|
|
111
|
+
_items.append(_item_volume_mounts.to_dict())
|
|
112
|
+
_dict['volume_mounts'] = _items
|
|
104
113
|
# set to None if image_url (nullable) is None
|
|
105
114
|
# and model_fields_set contains the field
|
|
106
115
|
if self.image_url is None and "image_url" in self.model_fields_set:
|
|
@@ -180,7 +189,8 @@ class GetJobDeploymentResponse(BaseModel):
|
|
|
180
189
|
"active_deadline_seconds": obj.get("active_deadline_seconds"),
|
|
181
190
|
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
|
|
182
191
|
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
|
|
183
|
-
"config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None
|
|
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
|
|
184
194
|
})
|
|
185
195
|
return _obj
|
|
186
196
|
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Platform External API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class HardwarePresetResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
HardwarePresetResponse
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
gpu_type: StrictStr
|
|
30
|
+
accelerator_memory: Optional[StrictInt] = None
|
|
31
|
+
is_mig: StrictBool
|
|
32
|
+
__properties: ClassVar[List[str]] = ["gpu_type", "accelerator_memory", "is_mig"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of HardwarePresetResponse from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
# set to None if accelerator_memory (nullable) is None
|
|
74
|
+
# and model_fields_set contains the field
|
|
75
|
+
if self.accelerator_memory is None and "accelerator_memory" in self.model_fields_set:
|
|
76
|
+
_dict['accelerator_memory'] = None
|
|
77
|
+
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
82
|
+
"""Create an instance of HardwarePresetResponse from a dict"""
|
|
83
|
+
if obj is None:
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
if not isinstance(obj, dict):
|
|
87
|
+
return cls.model_validate(obj)
|
|
88
|
+
|
|
89
|
+
_obj = cls.model_validate({
|
|
90
|
+
"gpu_type": obj.get("gpu_type"),
|
|
91
|
+
"accelerator_memory": obj.get("accelerator_memory"),
|
|
92
|
+
"is_mig": obj.get("is_mig")
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Platform External API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from platform_api_python_client.models.hardware_preset_response import HardwarePresetResponse
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ListHardwarePresetResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ListHardwarePresetResponse
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
results: List[HardwarePresetResponse]
|
|
31
|
+
__properties: ClassVar[List[str]] = ["results"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of ListHardwarePresetResponse from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.results:
|
|
75
|
+
for _item_results in self.results:
|
|
76
|
+
if _item_results:
|
|
77
|
+
_items.append(_item_results.to_dict())
|
|
78
|
+
_dict['results'] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of ListHardwarePresetResponse from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"results": [HardwarePresetResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|