Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 0.1.0
- Package version: 4.21.1
- Package version: 4.22.0
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

Expand Down
10 changes: 4 additions & 6 deletions docs/CreateDynamoDeploymentRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ Name | Type | Description | Notes
**hardware_instance_id** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**chart_revision** | **str** | | [optional]
**image_url** | **str** | |
**image_pull_secret_credentials** | [**ImagePullSecretCredentials**](ImagePullSecretCredentials.md) | | [optional]
**model** | **str** | |
**served_model_name** | **str** | | [optional]
**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]
**initial_replicas** | **int** | | [optional] [default to 1]
**gpus_per_worker** | **int** | | [optional] [default to 1]
**min_replicas** | **int** | | [optional] [default to 1]
**max_replicas** | **int** | | [optional] [default to 1]
**concurrency** | **int** | | [optional]
**cooldown_period** | **int** | | [optional]
**extra_args** | **str** | | [optional]
**hf_token** | **str** | | [optional]
**hf_token_secret_name** | **str** | | [optional]
**env_vars** | **Dict[str, str]** | | [optional]
**endpoint_bearer_token** | **str** | | [optional]
**endpoint_certificate_authority** | **str** | | [optional]
Expand Down
19 changes: 9 additions & 10 deletions docs/DeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,31 @@ Name | Type | Description | Notes
**hardware_instance_id** | **int** | |
**revision_number** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | |
**cserve_version** | **str** | | [optional]
**model** | **str** | |
**served_model_name** | **str** | | [optional]
**min_replicas** | **int** | |
**max_replicas** | **int** | |
**initial_replicas** | **int** | |
**endpoint_certificate_authority** | **str** | | [optional]
**endpoint_bearer_token** | **str** | | [optional]
**concurrency** | **int** | | [optional]
**cooldown_period** | **int** | | [optional] [default to 1800]
**extra_args** | **str** | | [optional]
**env_vars** | **Dict[str, str]** | | [optional]
**endpoint_certificate_authority** | **str** | | [optional]
**endpoint_bearer_token** | **str** | | [optional]
**enable_logging** | **bool** | | [optional] [default to True]
**enable_node_model_cache** | **bool** | | [optional] [default to False]
**backend_protocol** | [**BackendProtocol**](BackendProtocol.md) | | [optional]
**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | |
**cserve_version** | **str** | | [optional]
**initial_replicas** | **int** | | [optional]
**session_affinity** | **bool** | Enable best-effort sticky routing via the `X-Session-Id` request header. Requests carrying the same header value land on the same pod, improving KV cache reuse for agentic workloads. Requests without the header are routed at random. Affinity is NOT durable: scaling, rollouts, restarts, or readiness-probe transitions will remap sessions to different pods. Do not use for irreplaceable in-pod state. | [optional] [default to False]
**container_port** | **int** | |
**healthcheck** | **str** | | [optional]
**command** | **List[str]** | | [optional]
**command_args** | **List[str]** | | [optional]
**original_command** | **str** | | [optional]
**image_pull_secret_credentials** | [**ImagePullSecretCredentials**](ImagePullSecretCredentials.md) | | [optional]
**backend_protocol** | [**BackendProtocol**](BackendProtocol.md) | | [optional]
**config_file** | [**ConfigFileMount**](ConfigFileMount.md) | | [optional]
**metrics** | [**MetricsConfig**](MetricsConfig.md) | | [optional]
**model** | **str** | |
**served_model_name** | **str** | | [optional]
**gpus_per_worker** | **int** | |
**extra_args** | **str** | | [optional]

## Example

Expand Down
7 changes: 4 additions & 3 deletions docs/GetDynamoDeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ Name | Type | Description | Notes
**user_annotations** | **Dict[str, str]** | | [optional]
**model** | **str** | |
**served_model_name** | **str** | | [optional]
**container_port** | **int** | |
**initial_replicas** | **int** | |
**gpus_per_worker** | **int** | |
**min_replicas** | **int** | |
**max_replicas** | **int** | |
**concurrency** | **int** | | [optional]
**cooldown_period** | **int** | | [optional]
**extra_args** | **str** | | [optional]
**env_vars** | **Dict[str, str]** | | [optional]
**endpoint_certificate_authority** | **str** | | [optional]
Expand Down
2 changes: 1 addition & 1 deletion platform_api_python_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
""" # noqa: E501


__version__ = "4.21.1"
__version__ = "4.22.0"

# import apis into sdk package
from platform_api_python_client.api.external_api import EXTERNALApi
Expand Down
15 changes: 8 additions & 7 deletions platform_api_python_client/api/external_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
from typing_extensions import Annotated

from datetime import date
from pydantic import StrictBool, StrictInt, StrictStr
from pydantic import Field, StrictBool, StrictInt, StrictStr
from typing import Any, Optional
from typing_extensions import Annotated
from platform_api_python_client.models.cluster_config import ClusterConfig
from platform_api_python_client.models.cluster_registration_request import ClusterRegistrationRequest
from platform_api_python_client.models.cluster_registration_response import ClusterRegistrationResponse
Expand Down Expand Up @@ -8767,8 +8768,8 @@ def _get_deployment_status_v3_deployments_status_v3_deployment_id_get_serialize(
@validate_call
def get_deployments_deployments_get(
self,
offset: Optional[StrictInt] = None,
limit: Optional[StrictInt] = None,
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
type: Optional[DeploymentType] = None,
search_query: Optional[StrictStr] = None,
_request_timeout: Union[
Expand Down Expand Up @@ -8846,8 +8847,8 @@ def get_deployments_deployments_get(
@validate_call
def get_deployments_deployments_get_with_http_info(
self,
offset: Optional[StrictInt] = None,
limit: Optional[StrictInt] = None,
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
type: Optional[DeploymentType] = None,
search_query: Optional[StrictStr] = None,
_request_timeout: Union[
Expand Down Expand Up @@ -8925,8 +8926,8 @@ def get_deployments_deployments_get_with_http_info(
@validate_call
def get_deployments_deployments_get_without_preload_content(
self,
offset: Optional[StrictInt] = None,
limit: Optional[StrictInt] = None,
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
type: Optional[DeploymentType] = None,
search_query: Optional[StrictStr] = None,
_request_timeout: Union[
Expand Down
2 changes: 1 addition & 1 deletion platform_api_python_client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/4.21.1/python'
self.user_agent = 'OpenAPI-Generator/4.22.0/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
2 changes: 1 addition & 1 deletion platform_api_python_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 0.1.0\n"\
"SDK Package Version: 4.21.1".\
"SDK Package Version: 4.22.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from platform_api_python_client.models.backend_protocol import BackendProtocol
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -36,23 +35,21 @@ class CreateDynamoDeploymentRequest(BaseModel):
hardware_instance_id: StrictInt
user_annotations: Optional[Dict[str, StrictStr]] = None
chart_revision: Optional[StrictStr] = None
image_url: StrictStr
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
model: StrictStr
served_model_name: Optional[StrictStr] = None
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.")
initial_replicas: Optional[StrictInt] = 1
gpus_per_worker: Optional[StrictInt] = 1
min_replicas: Optional[StrictInt] = 1
max_replicas: Optional[StrictInt] = 1
concurrency: Optional[StrictInt] = None
cooldown_period: Optional[StrictInt] = None
extra_args: Optional[StrictStr] = None
hf_token: Optional[StrictStr] = None
hf_token_secret_name: Optional[StrictStr] = None
env_vars: Optional[Dict[str, StrictStr]] = None
endpoint_bearer_token: Optional[StrictStr] = None
endpoint_certificate_authority: Optional[StrictStr] = None
enable_logging: Optional[StrictBool] = True
enable_node_model_cache: Optional[StrictBool] = False
backend_protocol: Optional[BackendProtocol] = None
__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"]
__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"]

@field_validator('name')
def name_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -100,9 +97,6 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
if self.image_pull_secret_credentials:
_dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
# set to None if max_surge (nullable) is None
# and model_fields_set contains the field
if self.max_surge is None and "max_surge" in self.model_fields_set:
Expand All @@ -118,16 +112,21 @@ def to_dict(self) -> Dict[str, Any]:
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
_dict['user_annotations'] = None

# set to None if image_pull_secret_credentials (nullable) is None
# and model_fields_set contains the field
if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
_dict['image_pull_secret_credentials'] = None

# set to None if served_model_name (nullable) is None
# and model_fields_set contains the field
if self.served_model_name is None and "served_model_name" in self.model_fields_set:
_dict['served_model_name'] = None

# set to None if concurrency (nullable) is None
# and model_fields_set contains the field
if self.concurrency is None and "concurrency" in self.model_fields_set:
_dict['concurrency'] = None

# set to None if cooldown_period (nullable) is None
# and model_fields_set contains the field
if self.cooldown_period is None and "cooldown_period" in self.model_fields_set:
_dict['cooldown_period'] = None

# set to None if extra_args (nullable) is None
# and model_fields_set contains the field
if self.extra_args is None and "extra_args" in self.model_fields_set:
Expand All @@ -138,11 +137,6 @@ def to_dict(self) -> Dict[str, Any]:
if self.hf_token is None and "hf_token" in self.model_fields_set:
_dict['hf_token'] = None

# set to None if hf_token_secret_name (nullable) is None
# and model_fields_set contains the field
if self.hf_token_secret_name is None and "hf_token_secret_name" in self.model_fields_set:
_dict['hf_token_secret_name'] = None

# set to None if endpoint_bearer_token (nullable) is None
# and model_fields_set contains the field
if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set:
Expand Down Expand Up @@ -172,16 +166,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"hardware_instance_id": obj.get("hardware_instance_id"),
"user_annotations": obj.get("user_annotations"),
"chart_revision": obj.get("chart_revision"),
"image_url": obj.get("image_url"),
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
"model": obj.get("model"),
"served_model_name": obj.get("served_model_name"),
"container_port": obj.get("container_port") if obj.get("container_port") is not None else 8000,
"initial_replicas": obj.get("initial_replicas") if obj.get("initial_replicas") is not None else 1,
"gpus_per_worker": obj.get("gpus_per_worker") if obj.get("gpus_per_worker") is not None else 1,
"min_replicas": obj.get("min_replicas") if obj.get("min_replicas") is not None else 1,
"max_replicas": obj.get("max_replicas") if obj.get("max_replicas") is not None else 1,
"concurrency": obj.get("concurrency"),
"cooldown_period": obj.get("cooldown_period"),
"extra_args": obj.get("extra_args"),
"hf_token": obj.get("hf_token"),
"hf_token_secret_name": obj.get("hf_token_secret_name"),
"env_vars": obj.get("env_vars"),
"endpoint_bearer_token": obj.get("endpoint_bearer_token"),
"endpoint_certificate_authority": obj.get("endpoint_certificate_authority"),
Expand Down
32 changes: 16 additions & 16 deletions platform_api_python_client/models/deployment_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ class DeploymentResponse(BaseModel):
DeploymentResponse
"""

# data type: GetDynamoDeploymentResponse
anyof_schema_1_validator: Optional[GetDynamoDeploymentResponse] = None
# data type: GetCServeV3DeploymentResponse
anyof_schema_1_validator: Optional[GetCServeV3DeploymentResponse] = None
anyof_schema_2_validator: Optional[GetCServeV3DeploymentResponse] = None
# data type: GetInferenceV3DeploymentResponse
anyof_schema_2_validator: Optional[GetInferenceV3DeploymentResponse] = None
# data type: GetDynamoDeploymentResponse
anyof_schema_3_validator: Optional[GetDynamoDeploymentResponse] = None
anyof_schema_3_validator: Optional[GetInferenceV3DeploymentResponse] = None
if TYPE_CHECKING:
actual_instance: Optional[Union[GetCServeV3DeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse]] = None
else:
Expand All @@ -64,6 +64,12 @@ def __init__(self, *args, **kwargs) -> None:
def actual_instance_must_validate_anyof(cls, v):
instance = DeploymentResponse.model_construct()
error_messages = []
# validate data type: GetDynamoDeploymentResponse
if not isinstance(v, GetDynamoDeploymentResponse):
error_messages.append(f"Error! Input type `{type(v)}` is not `GetDynamoDeploymentResponse`")
else:
return v

# validate data type: GetCServeV3DeploymentResponse
if not isinstance(v, GetCServeV3DeploymentResponse):
error_messages.append(f"Error! Input type `{type(v)}` is not `GetCServeV3DeploymentResponse`")
Expand All @@ -76,12 +82,6 @@ def actual_instance_must_validate_anyof(cls, v):
else:
return v

# validate data type: GetDynamoDeploymentResponse
if not isinstance(v, GetDynamoDeploymentResponse):
error_messages.append(f"Error! Input type `{type(v)}` is not `GetDynamoDeploymentResponse`")
else:
return v

if error_messages:
# no match
raise ValueError("No match found when setting the actual_instance in DeploymentResponse with anyOf schemas: GetCServeV3DeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse. Details: " + ", ".join(error_messages))
Expand All @@ -97,21 +97,21 @@ def from_json(cls, json_str: str) -> Self:
"""Returns the object represented by the json string"""
instance = cls.model_construct()
error_messages = []
# anyof_schema_1_validator: Optional[GetCServeV3DeploymentResponse] = None
# anyof_schema_1_validator: Optional[GetDynamoDeploymentResponse] = None
try:
instance.actual_instance = GetCServeV3DeploymentResponse.from_json(json_str)
instance.actual_instance = GetDynamoDeploymentResponse.from_json(json_str)
return instance
except (ValidationError, ValueError) as e:
error_messages.append(str(e))
# anyof_schema_2_validator: Optional[GetInferenceV3DeploymentResponse] = None
# anyof_schema_2_validator: Optional[GetCServeV3DeploymentResponse] = None
try:
instance.actual_instance = GetInferenceV3DeploymentResponse.from_json(json_str)
instance.actual_instance = GetCServeV3DeploymentResponse.from_json(json_str)
return instance
except (ValidationError, ValueError) as e:
error_messages.append(str(e))
# anyof_schema_3_validator: Optional[GetDynamoDeploymentResponse] = None
# anyof_schema_3_validator: Optional[GetInferenceV3DeploymentResponse] = None
try:
instance.actual_instance = GetDynamoDeploymentResponse.from_json(json_str)
instance.actual_instance = GetInferenceV3DeploymentResponse.from_json(json_str)
return instance
except (ValidationError, ValueError) as e:
error_messages.append(str(e))
Expand Down
Loading
Loading