Skip to content

Commit 76b7e47

Browse files
Update clients to latest platform release (4.22.0) (#99)
Co-authored-by: platform CI <automation@centml.ai>
1 parent 41777a1 commit 76b7e47

16 files changed

Lines changed: 107 additions & 112 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: 0.1.0
7-
- Package version: 4.21.1
7+
- Package version: 4.22.0
88
- Generator version: 7.9.0
99
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1010

docs/CreateDynamoDeploymentRequest.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@ Name | Type | Description | Notes
1313
**hardware_instance_id** | **int** | |
1414
**user_annotations** | **Dict[str, str]** | | [optional]
1515
**chart_revision** | **str** | | [optional]
16-
**image_url** | **str** | |
17-
**image_pull_secret_credentials** | [**ImagePullSecretCredentials**](ImagePullSecretCredentials.md) | | [optional]
1816
**model** | **str** | |
1917
**served_model_name** | **str** | | [optional]
20-
**container_port** | **int** | Internal Dynamo Frontend listener port for the non-root runtime. The public endpoint remains on HTTPS; port 8788 is unavailable when backend_protocol is GRPC. | [optional] [default to 8000]
21-
**initial_replicas** | **int** | | [optional] [default to 1]
22-
**gpus_per_worker** | **int** | | [optional] [default to 1]
18+
**min_replicas** | **int** | | [optional] [default to 1]
19+
**max_replicas** | **int** | | [optional] [default to 1]
20+
**concurrency** | **int** | | [optional]
21+
**cooldown_period** | **int** | | [optional]
2322
**extra_args** | **str** | | [optional]
2423
**hf_token** | **str** | | [optional]
25-
**hf_token_secret_name** | **str** | | [optional]
2624
**env_vars** | **Dict[str, str]** | | [optional]
2725
**endpoint_bearer_token** | **str** | | [optional]
2826
**endpoint_certificate_authority** | **str** | | [optional]

docs/DeploymentResponse.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,31 @@ Name | Type | Description | Notes
1717
**hardware_instance_id** | **int** | |
1818
**revision_number** | **int** | |
1919
**user_annotations** | **Dict[str, str]** | | [optional]
20-
**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | |
21-
**cserve_version** | **str** | | [optional]
20+
**model** | **str** | |
21+
**served_model_name** | **str** | | [optional]
2222
**min_replicas** | **int** | |
2323
**max_replicas** | **int** | |
24-
**initial_replicas** | **int** | |
25-
**endpoint_certificate_authority** | **str** | | [optional]
26-
**endpoint_bearer_token** | **str** | | [optional]
2724
**concurrency** | **int** | | [optional]
2825
**cooldown_period** | **int** | | [optional] [default to 1800]
26+
**extra_args** | **str** | | [optional]
2927
**env_vars** | **Dict[str, str]** | | [optional]
28+
**endpoint_certificate_authority** | **str** | | [optional]
29+
**endpoint_bearer_token** | **str** | | [optional]
3030
**enable_logging** | **bool** | | [optional] [default to True]
3131
**enable_node_model_cache** | **bool** | | [optional] [default to False]
32+
**backend_protocol** | [**BackendProtocol**](BackendProtocol.md) | | [optional]
33+
**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | |
34+
**cserve_version** | **str** | | [optional]
35+
**initial_replicas** | **int** | | [optional]
3236
**session_affinity** | **bool** | Enable best-effort sticky routing via the &#x60;X-Session-Id&#x60; 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. | [optional] [default to False]
3337
**container_port** | **int** | |
3438
**healthcheck** | **str** | | [optional]
3539
**command** | **List[str]** | | [optional]
3640
**command_args** | **List[str]** | | [optional]
3741
**original_command** | **str** | | [optional]
3842
**image_pull_secret_credentials** | [**ImagePullSecretCredentials**](ImagePullSecretCredentials.md) | | [optional]
39-
**backend_protocol** | [**BackendProtocol**](BackendProtocol.md) | | [optional]
4043
**config_file** | [**ConfigFileMount**](ConfigFileMount.md) | | [optional]
4144
**metrics** | [**MetricsConfig**](MetricsConfig.md) | | [optional]
42-
**model** | **str** | |
43-
**served_model_name** | **str** | | [optional]
44-
**gpus_per_worker** | **int** | |
45-
**extra_args** | **str** | | [optional]
4645

4746
## Example
4847

docs/GetDynamoDeploymentResponse.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ Name | Type | Description | Notes
1919
**user_annotations** | **Dict[str, str]** | | [optional]
2020
**model** | **str** | |
2121
**served_model_name** | **str** | | [optional]
22-
**container_port** | **int** | |
23-
**initial_replicas** | **int** | |
24-
**gpus_per_worker** | **int** | |
22+
**min_replicas** | **int** | |
23+
**max_replicas** | **int** | |
24+
**concurrency** | **int** | | [optional]
25+
**cooldown_period** | **int** | | [optional]
2526
**extra_args** | **str** | | [optional]
2627
**env_vars** | **Dict[str, str]** | | [optional]
2728
**endpoint_certificate_authority** | **str** | | [optional]

platform_api_python_client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "4.21.1"
17+
__version__ = "4.22.0"
1818

1919
# import apis into sdk package
2020
from platform_api_python_client.api.external_api import EXTERNALApi

platform_api_python_client/api/external_api.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
from typing_extensions import Annotated
1818

1919
from datetime import date
20-
from pydantic import StrictBool, StrictInt, StrictStr
20+
from pydantic import Field, StrictBool, StrictInt, StrictStr
2121
from typing import Any, Optional
22+
from typing_extensions import Annotated
2223
from platform_api_python_client.models.cluster_config import ClusterConfig
2324
from platform_api_python_client.models.cluster_registration_request import ClusterRegistrationRequest
2425
from platform_api_python_client.models.cluster_registration_response import ClusterRegistrationResponse
@@ -8767,8 +8768,8 @@ def _get_deployment_status_v3_deployments_status_v3_deployment_id_get_serialize(
87678768
@validate_call
87688769
def get_deployments_deployments_get(
87698770
self,
8770-
offset: Optional[StrictInt] = None,
8771-
limit: Optional[StrictInt] = None,
8771+
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
8772+
limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
87728773
type: Optional[DeploymentType] = None,
87738774
search_query: Optional[StrictStr] = None,
87748775
_request_timeout: Union[
@@ -8846,8 +8847,8 @@ def get_deployments_deployments_get(
88468847
@validate_call
88478848
def get_deployments_deployments_get_with_http_info(
88488849
self,
8849-
offset: Optional[StrictInt] = None,
8850-
limit: Optional[StrictInt] = None,
8850+
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
8851+
limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
88518852
type: Optional[DeploymentType] = None,
88528853
search_query: Optional[StrictStr] = None,
88538854
_request_timeout: Union[
@@ -8925,8 +8926,8 @@ def get_deployments_deployments_get_with_http_info(
89258926
@validate_call
89268927
def get_deployments_deployments_get_without_preload_content(
89278928
self,
8928-
offset: Optional[StrictInt] = None,
8929-
limit: Optional[StrictInt] = None,
8929+
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
8930+
limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
89308931
type: Optional[DeploymentType] = None,
89318932
search_query: Optional[StrictStr] = None,
89328933
_request_timeout: Union[

platform_api_python_client/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(
9090
self.default_headers[header_name] = header_value
9191
self.cookie = cookie
9292
# Set default User-Agent.
93-
self.user_agent = 'OpenAPI-Generator/4.21.1/python'
93+
self.user_agent = 'OpenAPI-Generator/4.22.0/python'
9494
self.client_side_validation = configuration.client_side_validation
9595

9696
def __enter__(self):

platform_api_python_client/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def to_debug_report(self):
392392
"OS: {env}\n"\
393393
"Python Version: {pyversion}\n"\
394394
"Version of the API: 0.1.0\n"\
395-
"SDK Package Version: 4.21.1".\
395+
"SDK Package Version: 4.22.0".\
396396
format(env=sys.platform, pyversion=sys.version)
397397

398398
def get_host_settings(self):

platform_api_python_client/models/create_dynamo_deployment_request.py

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
from typing import Any, ClassVar, Dict, List, Optional
2222
from typing_extensions import Annotated
2323
from platform_api_python_client.models.backend_protocol import BackendProtocol
24-
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
2524
from typing import Optional, Set
2625
from typing_extensions import Self
2726

@@ -36,23 +35,21 @@ class CreateDynamoDeploymentRequest(BaseModel):
3635
hardware_instance_id: StrictInt
3736
user_annotations: Optional[Dict[str, StrictStr]] = None
3837
chart_revision: Optional[StrictStr] = None
39-
image_url: StrictStr
40-
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
4138
model: StrictStr
4239
served_model_name: Optional[StrictStr] = None
43-
container_port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=8000, description="Internal Dynamo Frontend listener port for the non-root runtime. The public endpoint remains on HTTPS; port 8788 is unavailable when backend_protocol is GRPC.")
44-
initial_replicas: Optional[StrictInt] = 1
45-
gpus_per_worker: Optional[StrictInt] = 1
40+
min_replicas: Optional[StrictInt] = 1
41+
max_replicas: Optional[StrictInt] = 1
42+
concurrency: Optional[StrictInt] = None
43+
cooldown_period: Optional[StrictInt] = None
4644
extra_args: Optional[StrictStr] = None
4745
hf_token: Optional[StrictStr] = None
48-
hf_token_secret_name: Optional[StrictStr] = None
4946
env_vars: Optional[Dict[str, StrictStr]] = None
5047
endpoint_bearer_token: Optional[StrictStr] = None
5148
endpoint_certificate_authority: Optional[StrictStr] = None
5249
enable_logging: Optional[StrictBool] = True
5350
enable_node_model_cache: Optional[StrictBool] = False
5451
backend_protocol: Optional[BackendProtocol] = None
55-
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "image_url", "image_pull_secret_credentials", "model", "served_model_name", "container_port", "initial_replicas", "gpus_per_worker", "extra_args", "hf_token", "hf_token_secret_name", "env_vars", "endpoint_bearer_token", "endpoint_certificate_authority", "enable_logging", "enable_node_model_cache", "backend_protocol"]
52+
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "model", "served_model_name", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "hf_token", "env_vars", "endpoint_bearer_token", "endpoint_certificate_authority", "enable_logging", "enable_node_model_cache", "backend_protocol"]
5653

5754
@field_validator('name')
5855
def name_validate_regular_expression(cls, value):
@@ -100,9 +97,6 @@ def to_dict(self) -> Dict[str, Any]:
10097
exclude=excluded_fields,
10198
exclude_none=True,
10299
)
103-
# override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
104-
if self.image_pull_secret_credentials:
105-
_dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
106100
# set to None if max_surge (nullable) is None
107101
# and model_fields_set contains the field
108102
if self.max_surge is None and "max_surge" in self.model_fields_set:
@@ -118,16 +112,21 @@ def to_dict(self) -> Dict[str, Any]:
118112
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
119113
_dict['user_annotations'] = None
120114

121-
# set to None if image_pull_secret_credentials (nullable) is None
122-
# and model_fields_set contains the field
123-
if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
124-
_dict['image_pull_secret_credentials'] = None
125-
126115
# set to None if served_model_name (nullable) is None
127116
# and model_fields_set contains the field
128117
if self.served_model_name is None and "served_model_name" in self.model_fields_set:
129118
_dict['served_model_name'] = None
130119

120+
# set to None if concurrency (nullable) is None
121+
# and model_fields_set contains the field
122+
if self.concurrency is None and "concurrency" in self.model_fields_set:
123+
_dict['concurrency'] = None
124+
125+
# set to None if cooldown_period (nullable) is None
126+
# and model_fields_set contains the field
127+
if self.cooldown_period is None and "cooldown_period" in self.model_fields_set:
128+
_dict['cooldown_period'] = None
129+
131130
# set to None if extra_args (nullable) is None
132131
# and model_fields_set contains the field
133132
if self.extra_args is None and "extra_args" in self.model_fields_set:
@@ -138,11 +137,6 @@ def to_dict(self) -> Dict[str, Any]:
138137
if self.hf_token is None and "hf_token" in self.model_fields_set:
139138
_dict['hf_token'] = None
140139

141-
# set to None if hf_token_secret_name (nullable) is None
142-
# and model_fields_set contains the field
143-
if self.hf_token_secret_name is None and "hf_token_secret_name" in self.model_fields_set:
144-
_dict['hf_token_secret_name'] = None
145-
146140
# set to None if endpoint_bearer_token (nullable) is None
147141
# and model_fields_set contains the field
148142
if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set:
@@ -172,16 +166,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
172166
"hardware_instance_id": obj.get("hardware_instance_id"),
173167
"user_annotations": obj.get("user_annotations"),
174168
"chart_revision": obj.get("chart_revision"),
175-
"image_url": obj.get("image_url"),
176-
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
177169
"model": obj.get("model"),
178170
"served_model_name": obj.get("served_model_name"),
179-
"container_port": obj.get("container_port") if obj.get("container_port") is not None else 8000,
180-
"initial_replicas": obj.get("initial_replicas") if obj.get("initial_replicas") is not None else 1,
181-
"gpus_per_worker": obj.get("gpus_per_worker") if obj.get("gpus_per_worker") is not None else 1,
171+
"min_replicas": obj.get("min_replicas") if obj.get("min_replicas") is not None else 1,
172+
"max_replicas": obj.get("max_replicas") if obj.get("max_replicas") is not None else 1,
173+
"concurrency": obj.get("concurrency"),
174+
"cooldown_period": obj.get("cooldown_period"),
182175
"extra_args": obj.get("extra_args"),
183176
"hf_token": obj.get("hf_token"),
184-
"hf_token_secret_name": obj.get("hf_token_secret_name"),
185177
"env_vars": obj.get("env_vars"),
186178
"endpoint_bearer_token": obj.get("endpoint_bearer_token"),
187179
"endpoint_certificate_authority": obj.get("endpoint_certificate_authority"),

platform_api_python_client/models/deployment_response.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ class DeploymentResponse(BaseModel):
3333
DeploymentResponse
3434
"""
3535

36+
# data type: GetDynamoDeploymentResponse
37+
anyof_schema_1_validator: Optional[GetDynamoDeploymentResponse] = None
3638
# data type: GetCServeV3DeploymentResponse
37-
anyof_schema_1_validator: Optional[GetCServeV3DeploymentResponse] = None
39+
anyof_schema_2_validator: Optional[GetCServeV3DeploymentResponse] = None
3840
# data type: GetInferenceV3DeploymentResponse
39-
anyof_schema_2_validator: Optional[GetInferenceV3DeploymentResponse] = None
40-
# data type: GetDynamoDeploymentResponse
41-
anyof_schema_3_validator: Optional[GetDynamoDeploymentResponse] = None
41+
anyof_schema_3_validator: Optional[GetInferenceV3DeploymentResponse] = None
4242
if TYPE_CHECKING:
4343
actual_instance: Optional[Union[GetCServeV3DeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse]] = None
4444
else:
@@ -64,6 +64,12 @@ def __init__(self, *args, **kwargs) -> None:
6464
def actual_instance_must_validate_anyof(cls, v):
6565
instance = DeploymentResponse.model_construct()
6666
error_messages = []
67+
# validate data type: GetDynamoDeploymentResponse
68+
if not isinstance(v, GetDynamoDeploymentResponse):
69+
error_messages.append(f"Error! Input type `{type(v)}` is not `GetDynamoDeploymentResponse`")
70+
else:
71+
return v
72+
6773
# validate data type: GetCServeV3DeploymentResponse
6874
if not isinstance(v, GetCServeV3DeploymentResponse):
6975
error_messages.append(f"Error! Input type `{type(v)}` is not `GetCServeV3DeploymentResponse`")
@@ -76,12 +82,6 @@ def actual_instance_must_validate_anyof(cls, v):
7682
else:
7783
return v
7884

79-
# validate data type: GetDynamoDeploymentResponse
80-
if not isinstance(v, GetDynamoDeploymentResponse):
81-
error_messages.append(f"Error! Input type `{type(v)}` is not `GetDynamoDeploymentResponse`")
82-
else:
83-
return v
84-
8585
if error_messages:
8686
# no match
8787
raise ValueError("No match found when setting the actual_instance in DeploymentResponse with anyOf schemas: GetCServeV3DeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse. Details: " + ", ".join(error_messages))
@@ -97,21 +97,21 @@ def from_json(cls, json_str: str) -> Self:
9797
"""Returns the object represented by the json string"""
9898
instance = cls.model_construct()
9999
error_messages = []
100-
# anyof_schema_1_validator: Optional[GetCServeV3DeploymentResponse] = None
100+
# anyof_schema_1_validator: Optional[GetDynamoDeploymentResponse] = None
101101
try:
102-
instance.actual_instance = GetCServeV3DeploymentResponse.from_json(json_str)
102+
instance.actual_instance = GetDynamoDeploymentResponse.from_json(json_str)
103103
return instance
104104
except (ValidationError, ValueError) as e:
105105
error_messages.append(str(e))
106-
# anyof_schema_2_validator: Optional[GetInferenceV3DeploymentResponse] = None
106+
# anyof_schema_2_validator: Optional[GetCServeV3DeploymentResponse] = None
107107
try:
108-
instance.actual_instance = GetInferenceV3DeploymentResponse.from_json(json_str)
108+
instance.actual_instance = GetCServeV3DeploymentResponse.from_json(json_str)
109109
return instance
110110
except (ValidationError, ValueError) as e:
111111
error_messages.append(str(e))
112-
# anyof_schema_3_validator: Optional[GetDynamoDeploymentResponse] = None
112+
# anyof_schema_3_validator: Optional[GetInferenceV3DeploymentResponse] = None
113113
try:
114-
instance.actual_instance = GetDynamoDeploymentResponse.from_json(json_str)
114+
instance.actual_instance = GetInferenceV3DeploymentResponse.from_json(json_str)
115115
return instance
116116
except (ValidationError, ValueError) as e:
117117
error_messages.append(str(e))

0 commit comments

Comments
 (0)