platform-api-python-client 4.28.0__py3-none-any.whl → 4.37.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- platform_api_python_client/__init__.py +43 -10
- platform_api_python_client/api/external_api.py +6332 -1348
- platform_api_python_client/api_client.py +1 -1
- platform_api_python_client/configuration.py +1 -1
- platform_api_python_client/models/__init__.py +42 -9
- platform_api_python_client/models/ccl_dynamo_pools.py +116 -0
- platform_api_python_client/models/{create_c_serve_v2_deployment_response.py → ccl_main_pools.py} +12 -13
- platform_api_python_client/models/cloud_provider.py +5 -0
- platform_api_python_client/models/cluster_credential.py +2 -2
- platform_api_python_client/models/create_compute_deployment_request.py +40 -7
- platform_api_python_client/models/create_dynamo_deployment_request.py +97 -6
- platform_api_python_client/models/create_inference_v3_deployment_request.py +59 -2
- platform_api_python_client/models/create_job_deployment_request.py +43 -10
- platform_api_python_client/models/create_object_volume_request.py +19 -19
- platform_api_python_client/models/deployment_response.py +23 -23
- platform_api_python_client/models/deployment_type.py +14 -0
- platform_api_python_client/models/{c_serve_recipe_perf.py → dynamo_communications_input.py} +12 -19
- platform_api_python_client/models/dynamo_communications_output.py +91 -0
- platform_api_python_client/models/dynamo_image.py +105 -0
- platform_api_python_client/models/dynamo_kv_transfer_configuration.py +88 -0
- platform_api_python_client/models/dynamo_kv_transfer_policy.py +37 -0
- platform_api_python_client/models/dynamo_weight_transfer_configuration.py +88 -0
- platform_api_python_client/models/dynamo_weight_transfer_policy.py +36 -0
- platform_api_python_client/models/dynamo_worker_pool_config.py +37 -17
- platform_api_python_client/models/dynamo_worker_pools.py +23 -16
- platform_api_python_client/models/env.py +89 -0
- platform_api_python_client/models/get_cluster_response.py +4 -2
- platform_api_python_client/models/get_compute_deployment_response.py +45 -4
- platform_api_python_client/models/get_deployment_response.py +26 -2
- platform_api_python_client/models/get_deployment_usage_response.py +19 -4
- platform_api_python_client/models/get_dynamo_deployment_response.py +89 -5
- platform_api_python_client/models/get_inference_deployment_response.py +25 -1
- platform_api_python_client/models/get_inference_v3_deployment_response.py +67 -2
- platform_api_python_client/models/get_job_deployment_response.py +52 -11
- platform_api_python_client/models/get_object_volume_response.py +2 -16
- platform_api_python_client/models/hardware_instance_response.py +6 -4
- platform_api_python_client/models/image.py +112 -0
- platform_api_python_client/models/ingress.py +103 -0
- platform_api_python_client/models/insight_list_item_response.py +108 -0
- platform_api_python_client/models/insight_resource.py +97 -0
- platform_api_python_client/models/insight_resource_type.py +37 -0
- platform_api_python_client/models/insight_response.py +133 -0
- platform_api_python_client/models/insight_severity.py +40 -0
- platform_api_python_client/models/insight_status.py +39 -0
- platform_api_python_client/models/{c_serve_recipe_response.py → insight_status_change_response.py} +28 -24
- platform_api_python_client/models/list_insights_response.py +95 -0
- platform_api_python_client/models/metric.py +13 -0
- platform_api_python_client/models/pool.py +116 -0
- platform_api_python_client/models/unified_get_compute_deployment_response.py +177 -0
- platform_api_python_client/models/unified_get_deployment_logs_response.py +95 -0
- platform_api_python_client/models/{create_c_serve_v3_deployment_response.py → unified_get_deployment_pods_response.py} +8 -13
- platform_api_python_client/models/unified_get_deployment_response.py +164 -0
- platform_api_python_client/models/unified_get_deployment_revision_response.py +109 -0
- platform_api_python_client/models/unified_get_deployment_rollout_response.py +90 -0
- platform_api_python_client/models/unified_get_deployment_usage_response.py +110 -0
- platform_api_python_client/models/unified_get_dynamo_deployment_response.py +218 -0
- platform_api_python_client/models/unified_get_inference_v3_deployment_response.py +228 -0
- platform_api_python_client/models/unified_get_job_deployment_response.py +204 -0
- platform_api_python_client/models/{list_c_serve_recipe_response.py → unified_list_deployment_revisions_response.py} +7 -7
- platform_api_python_client/models/unified_update_deployment_rollout_request.py +87 -0
- platform_api_python_client/models/unified_write_compute_deployment_request.py +154 -0
- platform_api_python_client/models/unified_write_deployment_request.py +164 -0
- platform_api_python_client/models/{c_serve_v2_recipe.py → unified_write_deployment_response.py} +27 -27
- platform_api_python_client/models/unified_write_dynamo_deployment_request.py +197 -0
- platform_api_python_client/models/unified_write_inference_v3_deployment_request.py +207 -0
- platform_api_python_client/models/unified_write_job_deployment_request.py +183 -0
- platform_api_python_client/models/update_insight_status_request.py +106 -0
- platform_api_python_client/models/upsert_user_vault_item_request.py +1 -1
- platform_api_python_client/models/usage_availability.py +40 -0
- platform_api_python_client/models/usage_component.py +39 -0
- platform_api_python_client/models/validation_error.py +12 -3
- platform_api_python_client/models/volume_mount.py +1 -1
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/METADATA +1 -1
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/RECORD +76 -43
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/WHEEL +1 -1
- platform_api_python_client/models/create_c_serve_v3_deployment_request.py +0 -182
- platform_api_python_client/models/get_c_serve_v2_deployment_response.py +0 -169
- platform_api_python_client/models/get_c_serve_v3_deployment_response.py +0 -170
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/top_level.txt +0 -0
|
@@ -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
|
|
@@ -60,15 +56,21 @@ from platform_api_python_client.models.deployment_status_v3_response import Depl
|
|
|
60
56
|
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
61
57
|
from platform_api_python_client.models.deployment_usage import DeploymentUsage
|
|
62
58
|
from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue
|
|
59
|
+
from platform_api_python_client.models.dynamo_communications_input import DynamoCommunicationsInput
|
|
60
|
+
from platform_api_python_client.models.dynamo_communications_output import DynamoCommunicationsOutput
|
|
61
|
+
from platform_api_python_client.models.dynamo_image import DynamoImage
|
|
62
|
+
from platform_api_python_client.models.dynamo_kv_transfer_configuration import DynamoKvTransferConfiguration
|
|
63
|
+
from platform_api_python_client.models.dynamo_kv_transfer_policy import DynamoKvTransferPolicy
|
|
63
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
|
|
64
67
|
from platform_api_python_client.models.dynamo_worker_pool_config import DynamoWorkerPoolConfig
|
|
65
68
|
from platform_api_python_client.models.dynamo_worker_pools import DynamoWorkerPools
|
|
69
|
+
from platform_api_python_client.models.env import Env
|
|
66
70
|
from platform_api_python_client.models.external_dns import ExternalDns
|
|
67
71
|
from platform_api_python_client.models.final_stack import FinalStack
|
|
68
72
|
from platform_api_python_client.models.fluent_bit import FluentBit
|
|
69
73
|
from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse
|
|
70
|
-
from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse
|
|
71
|
-
from platform_api_python_client.models.get_c_serve_v3_deployment_response import GetCServeV3DeploymentResponse
|
|
72
74
|
from platform_api_python_client.models.get_cluster_response import GetClusterResponse
|
|
73
75
|
from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse
|
|
74
76
|
from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse
|
|
@@ -89,8 +91,17 @@ from platform_api_python_client.models.gpu_type_capacity import GpuTypeCapacity
|
|
|
89
91
|
from platform_api_python_client.models.http_validation_error import HTTPValidationError
|
|
90
92
|
from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse
|
|
91
93
|
from platform_api_python_client.models.hardware_preset_response import HardwarePresetResponse
|
|
94
|
+
from platform_api_python_client.models.image import Image
|
|
92
95
|
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
|
|
96
|
+
from platform_api_python_client.models.ingress import Ingress
|
|
93
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
|
|
94
105
|
from platform_api_python_client.models.invite_user_request import InviteUserRequest
|
|
95
106
|
from platform_api_python_client.models.istio import Istio
|
|
96
107
|
from platform_api_python_client.models.istio_cni_overrides import IstioCniOverrides
|
|
@@ -98,7 +109,6 @@ from platform_api_python_client.models.istio_cni_subchart_overrides import Istio
|
|
|
98
109
|
from platform_api_python_client.models.istio_overrides import IstioOverrides
|
|
99
110
|
from platform_api_python_client.models.keda import Keda
|
|
100
111
|
from platform_api_python_client.models.kube_prometheus_stack import KubePrometheusStack
|
|
101
|
-
from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse
|
|
102
112
|
from platform_api_python_client.models.list_cluster_capacity_response import ListClusterCapacityResponse
|
|
103
113
|
from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse
|
|
104
114
|
from platform_api_python_client.models.list_deployment_revisions_response import ListDeploymentRevisionsResponse
|
|
@@ -106,6 +116,7 @@ from platform_api_python_client.models.list_get_cluster_response import ListGetC
|
|
|
106
116
|
from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse
|
|
107
117
|
from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse
|
|
108
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
|
|
109
120
|
from platform_api_python_client.models.list_organization_gpu_quota_response import ListOrganizationGpuQuotaResponse
|
|
110
121
|
from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse
|
|
111
122
|
from platform_api_python_client.models.list_service_accounts_response import ListServiceAccountsResponse
|
|
@@ -122,6 +133,7 @@ from platform_api_python_client.models.organization_gpu_quota_request import Org
|
|
|
122
133
|
from platform_api_python_client.models.organization_gpu_quota_response import OrganizationGpuQuotaResponse
|
|
123
134
|
from platform_api_python_client.models.pod_details import PodDetails
|
|
124
135
|
from platform_api_python_client.models.pod_status import PodStatus
|
|
136
|
+
from platform_api_python_client.models.pool import Pool
|
|
125
137
|
from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse
|
|
126
138
|
from platform_api_python_client.models.prometheus_adapter import PrometheusAdapter
|
|
127
139
|
from platform_api_python_client.models.revision_pod_details import RevisionPodDetails
|
|
@@ -132,11 +144,32 @@ from platform_api_python_client.models.service_status import ServiceStatus
|
|
|
132
144
|
from platform_api_python_client.models.spire import Spire
|
|
133
145
|
from platform_api_python_client.models.spire_crds import SpireCrds
|
|
134
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
|
|
135
165
|
from platform_api_python_client.models.update_cluster_metadata_request import UpdateClusterMetadataRequest
|
|
136
166
|
from platform_api_python_client.models.update_deployment_response import UpdateDeploymentResponse
|
|
137
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
|
|
138
169
|
from platform_api_python_client.models.update_service_account_request import UpdateServiceAccountRequest
|
|
139
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
|
|
140
173
|
from platform_api_python_client.models.user_vault_item import UserVaultItem
|
|
141
174
|
from platform_api_python_client.models.user_vault_type import UserVaultType
|
|
142
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
|
|
|
@@ -30,6 +30,11 @@ class CloudProvider(str, Enum):
|
|
|
30
30
|
AWS = 'aws'
|
|
31
31
|
AZURE = 'azure'
|
|
32
32
|
NEBIUS = 'nebius'
|
|
33
|
+
LAMBDA = 'lambda'
|
|
34
|
+
VULTR = 'vultr'
|
|
35
|
+
INTEL = 'intel'
|
|
36
|
+
COREWEAVE = 'coreweave'
|
|
37
|
+
UNKNOWN = 'unknown'
|
|
33
38
|
|
|
34
39
|
@classmethod
|
|
35
40
|
def from_json(cls, json_str: str) -> Self:
|
|
@@ -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(
|
|
@@ -34,12 +34,16 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
34
34
|
hardware_instance_id: StrictInt
|
|
35
35
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
36
36
|
chart_revision: Optional[StrictStr] = None
|
|
37
|
+
volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
|
|
38
|
+
priority: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None
|
|
37
39
|
image_url: StrictStr
|
|
38
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
|
|
39
44
|
ssh_public_key: StrictStr
|
|
40
45
|
enable_logging: Optional[StrictBool] = False
|
|
41
|
-
|
|
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"]
|
|
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"]
|
|
43
47
|
|
|
44
48
|
@field_validator('name')
|
|
45
49
|
def name_validate_regular_expression(cls, value):
|
|
@@ -48,6 +52,16 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
48
52
|
raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
|
|
49
53
|
return value
|
|
50
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
|
+
|
|
51
65
|
model_config = ConfigDict(
|
|
52
66
|
populate_by_name=True,
|
|
53
67
|
validate_assignment=True,
|
|
@@ -87,9 +101,6 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
87
101
|
exclude=excluded_fields,
|
|
88
102
|
exclude_none=True,
|
|
89
103
|
)
|
|
90
|
-
# override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
|
|
91
|
-
if self.image_pull_secret_credentials:
|
|
92
|
-
_dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
|
|
93
104
|
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
94
105
|
_items = []
|
|
95
106
|
if self.volume_mounts:
|
|
@@ -97,16 +108,34 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
97
108
|
if _item_volume_mounts:
|
|
98
109
|
_items.append(_item_volume_mounts.to_dict())
|
|
99
110
|
_dict['volume_mounts'] = _items
|
|
111
|
+
# override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
|
|
112
|
+
if self.image_pull_secret_credentials:
|
|
113
|
+
_dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
|
|
100
114
|
# set to None if user_annotations (nullable) is None
|
|
101
115
|
# and model_fields_set contains the field
|
|
102
116
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
103
117
|
_dict['user_annotations'] = None
|
|
104
118
|
|
|
119
|
+
# set to None if priority (nullable) is None
|
|
120
|
+
# and model_fields_set contains the field
|
|
121
|
+
if self.priority is None and "priority" in self.model_fields_set:
|
|
122
|
+
_dict['priority'] = None
|
|
123
|
+
|
|
105
124
|
# set to None if image_pull_secret_credentials (nullable) is None
|
|
106
125
|
# and model_fields_set contains the field
|
|
107
126
|
if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
|
|
108
127
|
_dict['image_pull_secret_credentials'] = None
|
|
109
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
|
+
|
|
110
139
|
return _dict
|
|
111
140
|
|
|
112
141
|
@classmethod
|
|
@@ -124,11 +153,15 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
124
153
|
"hardware_instance_id": obj.get("hardware_instance_id"),
|
|
125
154
|
"user_annotations": obj.get("user_annotations"),
|
|
126
155
|
"chart_revision": obj.get("chart_revision"),
|
|
156
|
+
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
|
|
157
|
+
"priority": obj.get("priority"),
|
|
127
158
|
"image_url": obj.get("image_url"),
|
|
128
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"),
|
|
129
163
|
"ssh_public_key": obj.get("ssh_public_key"),
|
|
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
|
|
164
|
+
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else False
|
|
132
165
|
})
|
|
133
166
|
return _obj
|
|
134
167
|
|