platform-api-python-client 4.31.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 +39 -10
- platform_api_python_client/api/external_api.py +6460 -1203
- platform_api_python_client/api_client.py +1 -1
- platform_api_python_client/configuration.py +1 -1
- platform_api_python_client/models/__init__.py +38 -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/cluster_credential.py +2 -2
- platform_api_python_client/models/create_compute_deployment_request.py +27 -1
- platform_api_python_client/models/create_dynamo_deployment_request.py +42 -1
- platform_api_python_client/models/create_filesystem_volume_request.py +0 -13
- platform_api_python_client/models/create_inference_v3_deployment_request.py +42 -2
- platform_api_python_client/models/create_job_deployment_request.py +27 -1
- platform_api_python_client/models/create_object_volume_request.py +0 -13
- platform_api_python_client/models/deployment_response.py +12 -27
- platform_api_python_client/models/deployment_type.py +14 -0
- platform_api_python_client/models/dynamo_communications_input.py +0 -13
- platform_api_python_client/models/dynamo_communications_output.py +0 -13
- platform_api_python_client/models/dynamo_image.py +105 -0
- platform_api_python_client/models/dynamo_kv_transfer_configuration.py +0 -13
- 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 +1 -14
- platform_api_python_client/models/dynamo_worker_pools.py +0 -13
- 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 +29 -2
- platform_api_python_client/models/get_deployment_usage_response.py +19 -4
- platform_api_python_client/models/get_dynamo_deployment_response.py +43 -1
- platform_api_python_client/models/get_inference_v3_deployment_response.py +43 -2
- platform_api_python_client/models/get_job_deployment_response.py +29 -2
- platform_api_python_client/models/hardware_instance_response.py +6 -2
- 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/{c_serve_recipe_perf.py → list_insights_response.py} +16 -19
- platform_api_python_client/models/metric.py +13 -0
- platform_api_python_client/models/pool.py +116 -0
- platform_api_python_client/models/{get_c_serve_v2_deployment_response.py → unified_get_compute_deployment_response.py} +65 -81
- 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/{get_c_serve_v3_deployment_response.py → unified_get_job_deployment_response.py} +85 -75
- 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/{create_c_serve_v3_deployment_request.py → unified_write_inference_v3_deployment_request.py} +78 -70
- 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-4.31.0.dist-info → platform_api_python_client-4.37.1.dist-info}/METADATA +1 -1
- {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.37.1.dist-info}/RECORD +70 -41
- {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.37.1.dist-info}/WHEEL +1 -1
- {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.37.1.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.37.1/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.37.1".\
|
|
396
396
|
format(env=sys.platform, pyversion=sys.version)
|
|
397
397
|
|
|
398
398
|
def get_host_settings(self):
|
|
@@ -16,9 +16,8 @@
|
|
|
16
16
|
# import models into model package
|
|
17
17
|
from platform_api_python_client.models.argo_rollouts import ArgoRollouts
|
|
18
18
|
from platform_api_python_client.models.backend_protocol import BackendProtocol
|
|
19
|
-
from platform_api_python_client.models.
|
|
20
|
-
from platform_api_python_client.models.
|
|
21
|
-
from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe
|
|
19
|
+
from platform_api_python_client.models.ccl_dynamo_pools import CclDynamoPools
|
|
20
|
+
from platform_api_python_client.models.ccl_main_pools import CclMainPools
|
|
22
21
|
from platform_api_python_client.models.cert_manager import CertManager
|
|
23
22
|
from platform_api_python_client.models.cloud_provider import CloudProvider
|
|
24
23
|
from platform_api_python_client.models.cluster_capacity_response import ClusterCapacityResponse
|
|
@@ -28,9 +27,6 @@ from platform_api_python_client.models.cluster_credential import ClusterCredenti
|
|
|
28
27
|
from platform_api_python_client.models.cluster_registration_request import ClusterRegistrationRequest
|
|
29
28
|
from platform_api_python_client.models.cluster_registration_response import ClusterRegistrationResponse
|
|
30
29
|
from platform_api_python_client.models.config_file_mount import ConfigFileMount
|
|
31
|
-
from platform_api_python_client.models.create_c_serve_v2_deployment_response import CreateCServeV2DeploymentResponse
|
|
32
|
-
from platform_api_python_client.models.create_c_serve_v3_deployment_request import CreateCServeV3DeploymentRequest
|
|
33
|
-
from platform_api_python_client.models.create_c_serve_v3_deployment_response import CreateCServeV3DeploymentResponse
|
|
34
30
|
from platform_api_python_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest
|
|
35
31
|
from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse
|
|
36
32
|
from platform_api_python_client.models.create_dynamo_deployment_request import CreateDynamoDeploymentRequest
|
|
@@ -62,17 +58,19 @@ from platform_api_python_client.models.deployment_usage import DeploymentUsage
|
|
|
62
58
|
from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue
|
|
63
59
|
from platform_api_python_client.models.dynamo_communications_input import DynamoCommunicationsInput
|
|
64
60
|
from platform_api_python_client.models.dynamo_communications_output import DynamoCommunicationsOutput
|
|
61
|
+
from platform_api_python_client.models.dynamo_image import DynamoImage
|
|
65
62
|
from platform_api_python_client.models.dynamo_kv_transfer_configuration import DynamoKvTransferConfiguration
|
|
66
63
|
from platform_api_python_client.models.dynamo_kv_transfer_policy import DynamoKvTransferPolicy
|
|
67
64
|
from platform_api_python_client.models.dynamo_serving_mode import DynamoServingMode
|
|
65
|
+
from platform_api_python_client.models.dynamo_weight_transfer_configuration import DynamoWeightTransferConfiguration
|
|
66
|
+
from platform_api_python_client.models.dynamo_weight_transfer_policy import DynamoWeightTransferPolicy
|
|
68
67
|
from platform_api_python_client.models.dynamo_worker_pool_config import DynamoWorkerPoolConfig
|
|
69
68
|
from platform_api_python_client.models.dynamo_worker_pools import DynamoWorkerPools
|
|
69
|
+
from platform_api_python_client.models.env import Env
|
|
70
70
|
from platform_api_python_client.models.external_dns import ExternalDns
|
|
71
71
|
from platform_api_python_client.models.final_stack import FinalStack
|
|
72
72
|
from platform_api_python_client.models.fluent_bit import FluentBit
|
|
73
73
|
from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse
|
|
74
|
-
from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse
|
|
75
|
-
from platform_api_python_client.models.get_c_serve_v3_deployment_response import GetCServeV3DeploymentResponse
|
|
76
74
|
from platform_api_python_client.models.get_cluster_response import GetClusterResponse
|
|
77
75
|
from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse
|
|
78
76
|
from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse
|
|
@@ -93,8 +91,17 @@ from platform_api_python_client.models.gpu_type_capacity import GpuTypeCapacity
|
|
|
93
91
|
from platform_api_python_client.models.http_validation_error import HTTPValidationError
|
|
94
92
|
from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse
|
|
95
93
|
from platform_api_python_client.models.hardware_preset_response import HardwarePresetResponse
|
|
94
|
+
from platform_api_python_client.models.image import Image
|
|
96
95
|
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
|
|
96
|
+
from platform_api_python_client.models.ingress import Ingress
|
|
97
97
|
from platform_api_python_client.models.ingress_nginx import IngressNginx
|
|
98
|
+
from platform_api_python_client.models.insight_list_item_response import InsightListItemResponse
|
|
99
|
+
from platform_api_python_client.models.insight_resource import InsightResource
|
|
100
|
+
from platform_api_python_client.models.insight_resource_type import InsightResourceType
|
|
101
|
+
from platform_api_python_client.models.insight_response import InsightResponse
|
|
102
|
+
from platform_api_python_client.models.insight_severity import InsightSeverity
|
|
103
|
+
from platform_api_python_client.models.insight_status import InsightStatus
|
|
104
|
+
from platform_api_python_client.models.insight_status_change_response import InsightStatusChangeResponse
|
|
98
105
|
from platform_api_python_client.models.invite_user_request import InviteUserRequest
|
|
99
106
|
from platform_api_python_client.models.istio import Istio
|
|
100
107
|
from platform_api_python_client.models.istio_cni_overrides import IstioCniOverrides
|
|
@@ -102,7 +109,6 @@ from platform_api_python_client.models.istio_cni_subchart_overrides import Istio
|
|
|
102
109
|
from platform_api_python_client.models.istio_overrides import IstioOverrides
|
|
103
110
|
from platform_api_python_client.models.keda import Keda
|
|
104
111
|
from platform_api_python_client.models.kube_prometheus_stack import KubePrometheusStack
|
|
105
|
-
from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse
|
|
106
112
|
from platform_api_python_client.models.list_cluster_capacity_response import ListClusterCapacityResponse
|
|
107
113
|
from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse
|
|
108
114
|
from platform_api_python_client.models.list_deployment_revisions_response import ListDeploymentRevisionsResponse
|
|
@@ -110,6 +116,7 @@ from platform_api_python_client.models.list_get_cluster_response import ListGetC
|
|
|
110
116
|
from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse
|
|
111
117
|
from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse
|
|
112
118
|
from platform_api_python_client.models.list_hardware_preset_response import ListHardwarePresetResponse
|
|
119
|
+
from platform_api_python_client.models.list_insights_response import ListInsightsResponse
|
|
113
120
|
from platform_api_python_client.models.list_organization_gpu_quota_response import ListOrganizationGpuQuotaResponse
|
|
114
121
|
from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse
|
|
115
122
|
from platform_api_python_client.models.list_service_accounts_response import ListServiceAccountsResponse
|
|
@@ -126,6 +133,7 @@ from platform_api_python_client.models.organization_gpu_quota_request import Org
|
|
|
126
133
|
from platform_api_python_client.models.organization_gpu_quota_response import OrganizationGpuQuotaResponse
|
|
127
134
|
from platform_api_python_client.models.pod_details import PodDetails
|
|
128
135
|
from platform_api_python_client.models.pod_status import PodStatus
|
|
136
|
+
from platform_api_python_client.models.pool import Pool
|
|
129
137
|
from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse
|
|
130
138
|
from platform_api_python_client.models.prometheus_adapter import PrometheusAdapter
|
|
131
139
|
from platform_api_python_client.models.revision_pod_details import RevisionPodDetails
|
|
@@ -136,11 +144,32 @@ from platform_api_python_client.models.service_status import ServiceStatus
|
|
|
136
144
|
from platform_api_python_client.models.spire import Spire
|
|
137
145
|
from platform_api_python_client.models.spire_crds import SpireCrds
|
|
138
146
|
from platform_api_python_client.models.teleport_kube_agent import TeleportKubeAgent
|
|
147
|
+
from platform_api_python_client.models.unified_get_compute_deployment_response import UnifiedGetComputeDeploymentResponse
|
|
148
|
+
from platform_api_python_client.models.unified_get_deployment_logs_response import UnifiedGetDeploymentLogsResponse
|
|
149
|
+
from platform_api_python_client.models.unified_get_deployment_pods_response import UnifiedGetDeploymentPodsResponse
|
|
150
|
+
from platform_api_python_client.models.unified_get_deployment_response import UnifiedGetDeploymentResponse
|
|
151
|
+
from platform_api_python_client.models.unified_get_deployment_revision_response import UnifiedGetDeploymentRevisionResponse
|
|
152
|
+
from platform_api_python_client.models.unified_get_deployment_rollout_response import UnifiedGetDeploymentRolloutResponse
|
|
153
|
+
from platform_api_python_client.models.unified_get_deployment_usage_response import UnifiedGetDeploymentUsageResponse
|
|
154
|
+
from platform_api_python_client.models.unified_get_dynamo_deployment_response import UnifiedGetDynamoDeploymentResponse
|
|
155
|
+
from platform_api_python_client.models.unified_get_inference_v3_deployment_response import UnifiedGetInferenceV3DeploymentResponse
|
|
156
|
+
from platform_api_python_client.models.unified_get_job_deployment_response import UnifiedGetJobDeploymentResponse
|
|
157
|
+
from platform_api_python_client.models.unified_list_deployment_revisions_response import UnifiedListDeploymentRevisionsResponse
|
|
158
|
+
from platform_api_python_client.models.unified_update_deployment_rollout_request import UnifiedUpdateDeploymentRolloutRequest
|
|
159
|
+
from platform_api_python_client.models.unified_write_compute_deployment_request import UnifiedWriteComputeDeploymentRequest
|
|
160
|
+
from platform_api_python_client.models.unified_write_deployment_request import UnifiedWriteDeploymentRequest
|
|
161
|
+
from platform_api_python_client.models.unified_write_deployment_response import UnifiedWriteDeploymentResponse
|
|
162
|
+
from platform_api_python_client.models.unified_write_dynamo_deployment_request import UnifiedWriteDynamoDeploymentRequest
|
|
163
|
+
from platform_api_python_client.models.unified_write_inference_v3_deployment_request import UnifiedWriteInferenceV3DeploymentRequest
|
|
164
|
+
from platform_api_python_client.models.unified_write_job_deployment_request import UnifiedWriteJobDeploymentRequest
|
|
139
165
|
from platform_api_python_client.models.update_cluster_metadata_request import UpdateClusterMetadataRequest
|
|
140
166
|
from platform_api_python_client.models.update_deployment_response import UpdateDeploymentResponse
|
|
141
167
|
from platform_api_python_client.models.update_deployment_status_v3_request import UpdateDeploymentStatusV3Request
|
|
168
|
+
from platform_api_python_client.models.update_insight_status_request import UpdateInsightStatusRequest
|
|
142
169
|
from platform_api_python_client.models.update_service_account_request import UpdateServiceAccountRequest
|
|
143
170
|
from platform_api_python_client.models.upsert_user_vault_item_request import UpsertUserVaultItemRequest
|
|
171
|
+
from platform_api_python_client.models.usage_availability import UsageAvailability
|
|
172
|
+
from platform_api_python_client.models.usage_component import UsageComponent
|
|
144
173
|
from platform_api_python_client.models.user_vault_item import UserVaultItem
|
|
145
174
|
from platform_api_python_client.models.user_vault_type import UserVaultType
|
|
146
175
|
from platform_api_python_client.models.validation_error import ValidationError
|
|
@@ -0,0 +1,116 @@
|
|
|
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, Optional
|
|
22
|
+
from platform_api_python_client.models.pool import Pool
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class CclDynamoPools(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Hardware and scaling per worker role. Aggregated mode uses exactly `worker`; disaggregated mode uses exactly `prefill` and `decode`. Unused roles are null.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
worker: Optional[Pool] = None
|
|
31
|
+
prefill: Optional[Pool] = None
|
|
32
|
+
decode: Optional[Pool] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["worker", "prefill", "decode"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of CclDynamoPools from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of worker
|
|
75
|
+
if self.worker:
|
|
76
|
+
_dict['worker'] = self.worker.to_dict()
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of prefill
|
|
78
|
+
if self.prefill:
|
|
79
|
+
_dict['prefill'] = self.prefill.to_dict()
|
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of decode
|
|
81
|
+
if self.decode:
|
|
82
|
+
_dict['decode'] = self.decode.to_dict()
|
|
83
|
+
# set to None if worker (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.worker is None and "worker" in self.model_fields_set:
|
|
86
|
+
_dict['worker'] = None
|
|
87
|
+
|
|
88
|
+
# set to None if prefill (nullable) is None
|
|
89
|
+
# and model_fields_set contains the field
|
|
90
|
+
if self.prefill is None and "prefill" in self.model_fields_set:
|
|
91
|
+
_dict['prefill'] = None
|
|
92
|
+
|
|
93
|
+
# set to None if decode (nullable) is None
|
|
94
|
+
# and model_fields_set contains the field
|
|
95
|
+
if self.decode is None and "decode" in self.model_fields_set:
|
|
96
|
+
_dict['decode'] = None
|
|
97
|
+
|
|
98
|
+
return _dict
|
|
99
|
+
|
|
100
|
+
@classmethod
|
|
101
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
102
|
+
"""Create an instance of CclDynamoPools from a dict"""
|
|
103
|
+
if obj is None:
|
|
104
|
+
return None
|
|
105
|
+
|
|
106
|
+
if not isinstance(obj, dict):
|
|
107
|
+
return cls.model_validate(obj)
|
|
108
|
+
|
|
109
|
+
_obj = cls.model_validate({
|
|
110
|
+
"worker": Pool.from_dict(obj["worker"]) if obj.get("worker") is not None else None,
|
|
111
|
+
"prefill": Pool.from_dict(obj["prefill"]) if obj.get("prefill") is not None else None,
|
|
112
|
+
"decode": Pool.from_dict(obj["decode"]) if obj.get("decode") is not None else None
|
|
113
|
+
})
|
|
114
|
+
return _obj
|
|
115
|
+
|
|
116
|
+
|
platform_api_python_client/models/{create_c_serve_v2_deployment_response.py → ccl_main_pools.py}
RENAMED
|
@@ -17,20 +17,18 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
22
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from platform_api_python_client.models.pool import Pool
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class CclMainPools(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
CclMainPools
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
endpoint_url: StrictStr
|
|
33
|
-
__properties: ClassVar[List[str]] = ["id", "created_at", "endpoint_url"]
|
|
30
|
+
main: Pool
|
|
31
|
+
__properties: ClassVar[List[str]] = ["main"]
|
|
34
32
|
|
|
35
33
|
model_config = ConfigDict(
|
|
36
34
|
populate_by_name=True,
|
|
@@ -50,7 +48,7 @@ class CreateCServeV2DeploymentResponse(BaseModel):
|
|
|
50
48
|
|
|
51
49
|
@classmethod
|
|
52
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
-
"""Create an instance of
|
|
51
|
+
"""Create an instance of CclMainPools from a JSON string"""
|
|
54
52
|
return cls.from_dict(json.loads(json_str))
|
|
55
53
|
|
|
56
54
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -71,11 +69,14 @@ class CreateCServeV2DeploymentResponse(BaseModel):
|
|
|
71
69
|
exclude=excluded_fields,
|
|
72
70
|
exclude_none=True,
|
|
73
71
|
)
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of main
|
|
73
|
+
if self.main:
|
|
74
|
+
_dict['main'] = self.main.to_dict()
|
|
74
75
|
return _dict
|
|
75
76
|
|
|
76
77
|
@classmethod
|
|
77
78
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
-
"""Create an instance of
|
|
79
|
+
"""Create an instance of CclMainPools from a dict"""
|
|
79
80
|
if obj is None:
|
|
80
81
|
return None
|
|
81
82
|
|
|
@@ -83,9 +84,7 @@ class CreateCServeV2DeploymentResponse(BaseModel):
|
|
|
83
84
|
return cls.model_validate(obj)
|
|
84
85
|
|
|
85
86
|
_obj = cls.model_validate({
|
|
86
|
-
"
|
|
87
|
-
"created_at": obj.get("created_at"),
|
|
88
|
-
"endpoint_url": obj.get("endpoint_url")
|
|
87
|
+
"main": Pool.from_dict(obj["main"]) if obj.get("main") is not None else None
|
|
89
88
|
})
|
|
90
89
|
return _obj
|
|
91
90
|
|
|
@@ -17,7 +17,7 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
@@ -28,7 +28,7 @@ class ClusterCredential(BaseModel):
|
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
server: StrictStr
|
|
30
30
|
bearer_token: StrictStr
|
|
31
|
-
ca_cert: StrictStr
|
|
31
|
+
ca_cert: StrictStr = Field(description="Base64-encoded PEM CA certificate of the cluster's API server, as in a kubeconfig's `certificate-authority-data` or the `ca.crt` key of a service-account token Secret's `data`.")
|
|
32
32
|
__properties: ClassVar[List[str]] = ["server", "bearer_token", "ca_cert"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
@@ -38,9 +38,12 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
38
38
|
priority: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None
|
|
39
39
|
image_url: StrictStr
|
|
40
40
|
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
|
|
41
|
+
image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
42
|
+
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
|
+
env_vars_refs: Optional[Dict[str, Any]] = None
|
|
41
44
|
ssh_public_key: StrictStr
|
|
42
45
|
enable_logging: Optional[StrictBool] = False
|
|
43
|
-
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "image_url", "image_pull_secret_credentials", "ssh_public_key", "enable_logging"]
|
|
46
|
+
__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_refs", "ssh_public_key", "enable_logging"]
|
|
44
47
|
|
|
45
48
|
@field_validator('name')
|
|
46
49
|
def name_validate_regular_expression(cls, value):
|
|
@@ -49,6 +52,16 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
49
52
|
raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
|
|
50
53
|
return value
|
|
51
54
|
|
|
55
|
+
@field_validator('image_pull_secret_name')
|
|
56
|
+
def image_pull_secret_name_validate_regular_expression(cls, value):
|
|
57
|
+
"""Validates the regular expression"""
|
|
58
|
+
if value is None:
|
|
59
|
+
return value
|
|
60
|
+
|
|
61
|
+
if not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
|
|
62
|
+
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])?)*$/")
|
|
63
|
+
return value
|
|
64
|
+
|
|
52
65
|
model_config = ConfigDict(
|
|
53
66
|
populate_by_name=True,
|
|
54
67
|
validate_assignment=True,
|
|
@@ -113,6 +126,16 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
113
126
|
if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
|
|
114
127
|
_dict['image_pull_secret_credentials'] = None
|
|
115
128
|
|
|
129
|
+
# set to None if image_pull_ref (nullable) is None
|
|
130
|
+
# and model_fields_set contains the field
|
|
131
|
+
if self.image_pull_ref is None and "image_pull_ref" in self.model_fields_set:
|
|
132
|
+
_dict['image_pull_ref'] = None
|
|
133
|
+
|
|
134
|
+
# set to None if image_pull_secret_name (nullable) is None
|
|
135
|
+
# and model_fields_set contains the field
|
|
136
|
+
if self.image_pull_secret_name is None and "image_pull_secret_name" in self.model_fields_set:
|
|
137
|
+
_dict['image_pull_secret_name'] = None
|
|
138
|
+
|
|
116
139
|
return _dict
|
|
117
140
|
|
|
118
141
|
@classmethod
|
|
@@ -134,6 +157,9 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
134
157
|
"priority": obj.get("priority"),
|
|
135
158
|
"image_url": obj.get("image_url"),
|
|
136
159
|
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
|
|
160
|
+
"image_pull_ref": obj.get("image_pull_ref"),
|
|
161
|
+
"image_pull_secret_name": obj.get("image_pull_secret_name"),
|
|
162
|
+
"env_vars_refs": obj.get("env_vars_refs"),
|
|
137
163
|
"ssh_public_key": obj.get("ssh_public_key"),
|
|
138
164
|
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else False
|
|
139
165
|
})
|
|
@@ -23,6 +23,7 @@ from typing_extensions import Annotated
|
|
|
23
23
|
from platform_api_python_client.models.backend_protocol import BackendProtocol
|
|
24
24
|
from platform_api_python_client.models.dynamo_communications_input import DynamoCommunicationsInput
|
|
25
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
|
|
26
27
|
from platform_api_python_client.models.dynamo_worker_pools import DynamoWorkerPools
|
|
27
28
|
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
28
29
|
from typing import Optional, Set
|
|
@@ -44,7 +45,9 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
44
45
|
serving_mode: Optional[DynamoServingMode] = None
|
|
45
46
|
worker_pools: Optional[DynamoWorkerPools] = None
|
|
46
47
|
communications: Optional[DynamoCommunicationsInput] = None
|
|
48
|
+
weight_transfer: Optional[DynamoWeightTransferConfiguration] = None
|
|
47
49
|
model: StrictStr
|
|
50
|
+
model_revision: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None
|
|
48
51
|
served_model_name: Optional[StrictStr] = None
|
|
49
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.")
|
|
50
53
|
min_replicas: Optional[StrictInt] = None
|
|
@@ -53,13 +56,17 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
53
56
|
cooldown_period: Optional[StrictInt] = None
|
|
54
57
|
extra_args: Optional[StrictStr] = None
|
|
55
58
|
hf_token: Optional[StrictStr] = None
|
|
59
|
+
hf_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
56
60
|
env_vars: Optional[Dict[str, StrictStr]] = None
|
|
61
|
+
env_vars_refs: Optional[Dict[str, Any]] = None
|
|
57
62
|
endpoint_bearer_token: Optional[StrictStr] = None
|
|
63
|
+
bearer_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
58
64
|
endpoint_certificate_authority: Optional[StrictStr] = None
|
|
65
|
+
image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
59
66
|
enable_logging: Optional[StrictBool] = True
|
|
60
67
|
enable_node_model_cache: Optional[StrictBool] = False
|
|
61
68
|
backend_protocol: Optional[BackendProtocol] = None
|
|
62
|
-
__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", "model", "served_model_name", "runtime_version", "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"]
|
|
63
70
|
|
|
64
71
|
@field_validator('name')
|
|
65
72
|
def name_validate_regular_expression(cls, value):
|
|
@@ -130,6 +137,9 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
130
137
|
# override the default output from pydantic by calling `to_dict()` of communications
|
|
131
138
|
if self.communications:
|
|
132
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()
|
|
133
143
|
# set to None if max_surge (nullable) is None
|
|
134
144
|
# and model_fields_set contains the field
|
|
135
145
|
if self.max_surge is None and "max_surge" in self.model_fields_set:
|
|
@@ -165,6 +175,16 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
165
175
|
if self.communications is None and "communications" in self.model_fields_set:
|
|
166
176
|
_dict['communications'] = None
|
|
167
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
|
+
|
|
168
188
|
# set to None if served_model_name (nullable) is None
|
|
169
189
|
# and model_fields_set contains the field
|
|
170
190
|
if self.served_model_name is None and "served_model_name" in self.model_fields_set:
|
|
@@ -200,16 +220,31 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
200
220
|
if self.hf_token is None and "hf_token" in self.model_fields_set:
|
|
201
221
|
_dict['hf_token'] = None
|
|
202
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
|
+
|
|
203
228
|
# set to None if endpoint_bearer_token (nullable) is None
|
|
204
229
|
# and model_fields_set contains the field
|
|
205
230
|
if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set:
|
|
206
231
|
_dict['endpoint_bearer_token'] = None
|
|
207
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
|
+
|
|
208
238
|
# set to None if endpoint_certificate_authority (nullable) is None
|
|
209
239
|
# and model_fields_set contains the field
|
|
210
240
|
if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set:
|
|
211
241
|
_dict['endpoint_certificate_authority'] = None
|
|
212
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
|
+
|
|
213
248
|
return _dict
|
|
214
249
|
|
|
215
250
|
@classmethod
|
|
@@ -234,7 +269,9 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
234
269
|
"serving_mode": obj.get("serving_mode"),
|
|
235
270
|
"worker_pools": DynamoWorkerPools.from_dict(obj["worker_pools"]) if obj.get("worker_pools") is not None else None,
|
|
236
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,
|
|
237
273
|
"model": obj.get("model"),
|
|
274
|
+
"model_revision": obj.get("model_revision"),
|
|
238
275
|
"served_model_name": obj.get("served_model_name"),
|
|
239
276
|
"runtime_version": obj.get("runtime_version"),
|
|
240
277
|
"min_replicas": obj.get("min_replicas"),
|
|
@@ -243,9 +280,13 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
243
280
|
"cooldown_period": obj.get("cooldown_period"),
|
|
244
281
|
"extra_args": obj.get("extra_args"),
|
|
245
282
|
"hf_token": obj.get("hf_token"),
|
|
283
|
+
"hf_token_ref": obj.get("hf_token_ref"),
|
|
246
284
|
"env_vars": obj.get("env_vars"),
|
|
285
|
+
"env_vars_refs": obj.get("env_vars_refs"),
|
|
247
286
|
"endpoint_bearer_token": obj.get("endpoint_bearer_token"),
|
|
287
|
+
"bearer_token_ref": obj.get("bearer_token_ref"),
|
|
248
288
|
"endpoint_certificate_authority": obj.get("endpoint_certificate_authority"),
|
|
289
|
+
"image_pull_ref": obj.get("image_pull_ref"),
|
|
249
290
|
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
|
|
250
291
|
"enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False,
|
|
251
292
|
"backend_protocol": obj.get("backend_protocol")
|
|
@@ -32,7 +32,6 @@ class CreateFilesystemVolumeRequest(BaseModel):
|
|
|
32
32
|
backend: StrictStr
|
|
33
33
|
size_gb: Optional[Annotated[int, Field(le=65536, strict=True, ge=1)]] = 100
|
|
34
34
|
storage_class: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=253)]] = None
|
|
35
|
-
additional_properties: Dict[str, Any] = {}
|
|
36
35
|
__properties: ClassVar[List[str]] = ["name", "cluster_id", "backend", "size_gb", "storage_class"]
|
|
37
36
|
|
|
38
37
|
@field_validator('name')
|
|
@@ -89,10 +88,8 @@ class CreateFilesystemVolumeRequest(BaseModel):
|
|
|
89
88
|
* `None` is only added to the output dict for nullable fields that
|
|
90
89
|
were set at model initialization. Other fields with value `None`
|
|
91
90
|
are ignored.
|
|
92
|
-
* Fields in `self.additional_properties` are added to the output dict.
|
|
93
91
|
"""
|
|
94
92
|
excluded_fields: Set[str] = set([
|
|
95
|
-
"additional_properties",
|
|
96
93
|
])
|
|
97
94
|
|
|
98
95
|
_dict = self.model_dump(
|
|
@@ -100,11 +97,6 @@ class CreateFilesystemVolumeRequest(BaseModel):
|
|
|
100
97
|
exclude=excluded_fields,
|
|
101
98
|
exclude_none=True,
|
|
102
99
|
)
|
|
103
|
-
# puts key-value pairs in additional_properties in the top level
|
|
104
|
-
if self.additional_properties is not None:
|
|
105
|
-
for _key, _value in self.additional_properties.items():
|
|
106
|
-
_dict[_key] = _value
|
|
107
|
-
|
|
108
100
|
# set to None if storage_class (nullable) is None
|
|
109
101
|
# and model_fields_set contains the field
|
|
110
102
|
if self.storage_class is None and "storage_class" in self.model_fields_set:
|
|
@@ -128,11 +120,6 @@ class CreateFilesystemVolumeRequest(BaseModel):
|
|
|
128
120
|
"size_gb": obj.get("size_gb") if obj.get("size_gb") is not None else 100,
|
|
129
121
|
"storage_class": obj.get("storage_class")
|
|
130
122
|
})
|
|
131
|
-
# store additional fields in additional_properties
|
|
132
|
-
for _key in obj.keys():
|
|
133
|
-
if _key not in cls.__properties:
|
|
134
|
-
_obj.additional_properties[_key] = obj.get(_key)
|
|
135
|
-
|
|
136
123
|
return _obj
|
|
137
124
|
|
|
138
125
|
|