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
3 changes: 2 additions & 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.38.0
- Package version: 4.39.0
- Generator version: 7.26.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

Expand Down Expand Up @@ -234,6 +234,7 @@ Class | Method | HTTP request | Description
- [DeploymentUsageValue](docs/DeploymentUsageValue.md)
- [DynamoCommunicationsInput](docs/DynamoCommunicationsInput.md)
- [DynamoFrontendConfig](docs/DynamoFrontendConfig.md)
- [DynamoFrontendConfigResponse](docs/DynamoFrontendConfigResponse.md)
- [DynamoImage](docs/DynamoImage.md)
- [DynamoKvTransferConfiguration](docs/DynamoKvTransferConfiguration.md)
- [DynamoKvTransferPolicy](docs/DynamoKvTransferPolicy.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/CreateDynamoDeploymentRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Name | Type | Description | Notes
**enable_logging** | **bool** | | [optional] [default to True]
**enable_node_model_cache** | **bool** | | [optional] [default to False]
**backend_protocol** | [**BackendProtocol**](BackendProtocol.md) | | [optional]
**frontend** | [**DynamoFrontendConfig**](DynamoFrontendConfig.md) | Replica bounds for the Frontend (HTTP server and router) pods serving the endpoint, which are placed on separate nodes where possible. Two keep the endpoint serving through a node loss. min_replicas and max_replicas must be equal until Frontend autoscaling is supported. Changing them restarts every component of a running deployment. | [optional]
**frontend** | [**DynamoFrontendConfig**](DynamoFrontendConfig.md) | Replica bounds and size of the Frontend (HTTP server and router) pods serving the endpoint, which are placed on separate nodes where possible. Two keep the endpoint serving through a node loss. min_replicas and max_replicas must be equal until Frontend autoscaling is supported. Changing any of these restarts every component of a running deployment. | [optional]

## Example

Expand Down
2 changes: 1 addition & 1 deletion docs/DeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Name | Type | Description | Notes
**enable_logging** | **bool** | | [optional] [default to True]
**enable_node_model_cache** | **bool** | | [optional] [default to False]
**backend_protocol** | [**BackendProtocol**](BackendProtocol.md) | | [optional]
**frontend** | [**DynamoFrontendConfig**](DynamoFrontendConfig.md) | Frontend replica bounds this revision requests; the defaults for revisions created before the field. | [optional]
**frontend** | [**DynamoFrontendConfigResponse**](DynamoFrontendConfigResponse.md) | Frontend replica bounds and size this revision requests; the defaults for revisions created before these fields. | [optional]
**container_port** | **int** | |
**healthcheck** | **str** | | [optional]
**command** | **List[str]** | | [optional]
Expand Down
4 changes: 3 additions & 1 deletion docs/DynamoFrontendConfig.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# DynamoFrontendConfig

Replica bounds for the Dynamo Frontend, shaped like a worker pool's so that Frontend autoscaling can arrive without an API change. Until it does, the Frontend runs a fixed count: ``min_replicas`` must equal ``max_replicas``.
Replica bounds and pod size for the Dynamo Frontend. A size is requested and limited alike; left unset, the chart's small default applies. The bounds are shaped like a worker pool's so that Frontend autoscaling can arrive without an API change. Until it does, the Frontend runs a fixed count: ``min_replicas`` must equal ``max_replicas``.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**min_replicas** | **int** | | [optional] [default to 3]
**max_replicas** | **int** | | [optional] [default to 3]
**cpu** | **int** | CPU for each Frontend pod, in millicores. | [optional]
**memory** | **int** | Memory for each Frontend pod, in MiB. | [optional]

## Example

Expand Down
33 changes: 33 additions & 0 deletions docs/DynamoFrontendConfigResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# DynamoFrontendConfigResponse

The Frontend a revision requests, as read back. The size bounds stay on the request: in a response they would make a client generated from an older spec reject deployments sized above its caps once the caps are raised. The replica bounds keep the shape this response already has.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**min_replicas** | **int** | | [optional] [default to 3]
**max_replicas** | **int** | | [optional] [default to 3]
**cpu** | **int** | CPU for each Frontend pod, in millicores. | [optional]
**memory** | **int** | Memory for each Frontend pod, in MiB. | [optional]

## Example

```python
from platform_api_python_client.models.dynamo_frontend_config_response import DynamoFrontendConfigResponse

# TODO update the JSON string below
json = "{}"
# create an instance of DynamoFrontendConfigResponse from a JSON string
dynamo_frontend_config_response_instance = DynamoFrontendConfigResponse.from_json(json)
# print the JSON string representation of the object
print(DynamoFrontendConfigResponse.to_json())

# convert the object into a dict
dynamo_frontend_config_response_dict = dynamo_frontend_config_response_instance.to_dict()
# create an instance of DynamoFrontendConfigResponse from a dict
dynamo_frontend_config_response_from_dict = DynamoFrontendConfigResponse.from_dict(dynamo_frontend_config_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


2 changes: 1 addition & 1 deletion docs/GetDynamoDeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Name | Type | Description | Notes
**enable_logging** | **bool** | | [optional] [default to True]
**enable_node_model_cache** | **bool** | | [optional] [default to False]
**backend_protocol** | [**BackendProtocol**](BackendProtocol.md) | | [optional]
**frontend** | [**DynamoFrontendConfig**](DynamoFrontendConfig.md) | Frontend replica bounds this revision requests; the defaults for revisions created before the field. | [optional]
**frontend** | [**DynamoFrontendConfigResponse**](DynamoFrontendConfigResponse.md) | Frontend replica bounds and size this revision requests; the defaults for revisions created before these fields. | [optional]

## Example

Expand Down
4 changes: 3 additions & 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.38.0"
__version__ = "4.39.0"

# Define package exports
__all__ = [
Expand Down Expand Up @@ -72,6 +72,7 @@
"DeploymentUsageValue",
"DynamoCommunicationsInput",
"DynamoFrontendConfig",
"DynamoFrontendConfigResponse",
"DynamoImage",
"DynamoKvTransferConfiguration",
"DynamoKvTransferPolicy",
Expand Down Expand Up @@ -255,6 +256,7 @@
from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue as DeploymentUsageValue
from platform_api_python_client.models.dynamo_communications_input import DynamoCommunicationsInput as DynamoCommunicationsInput
from platform_api_python_client.models.dynamo_frontend_config import DynamoFrontendConfig as DynamoFrontendConfig
from platform_api_python_client.models.dynamo_frontend_config_response import DynamoFrontendConfigResponse as DynamoFrontendConfigResponse
from platform_api_python_client.models.dynamo_image import DynamoImage as DynamoImage
from platform_api_python_client.models.dynamo_kv_transfer_configuration import DynamoKvTransferConfiguration as DynamoKvTransferConfiguration
from platform_api_python_client.models.dynamo_kv_transfer_policy import DynamoKvTransferPolicy as DynamoKvTransferPolicy
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 @@ -91,7 +91,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/4.38.0/python'
self.user_agent = 'OpenAPI-Generator/4.39.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 @@ -562,7 +562,7 @@ def to_debug_report(self) -> str:
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 0.1.0\n"\
"SDK Package Version: 4.38.0".\
"SDK Package Version: 4.39.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
1 change: 1 addition & 0 deletions platform_api_python_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue
from platform_api_python_client.models.dynamo_communications_input import DynamoCommunicationsInput
from platform_api_python_client.models.dynamo_frontend_config import DynamoFrontendConfig
from platform_api_python_client.models.dynamo_frontend_config_response import DynamoFrontendConfigResponse
from platform_api_python_client.models.dynamo_image import DynamoImage
from platform_api_python_client.models.dynamo_kv_transfer_configuration import DynamoKvTransferConfiguration
from platform_api_python_client.models.dynamo_kv_transfer_policy import DynamoKvTransferPolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class CreateDynamoDeploymentRequest(BaseModel):
enable_logging: Optional[StrictBool] = True
enable_node_model_cache: Optional[StrictBool] = False
backend_protocol: Optional[BackendProtocol] = None
frontend: Optional[DynamoFrontendConfig] = Field(default=None, description="Replica bounds for the Frontend (HTTP server and router) pods serving the endpoint, which are placed on separate nodes where possible. Two keep the endpoint serving through a node loss. min_replicas and max_replicas must be equal until Frontend autoscaling is supported. Changing them restarts every component of a running deployment.")
frontend: Optional[DynamoFrontendConfig] = Field(default=None, description="Replica bounds and size of the Frontend (HTTP server and router) pods serving the endpoint, which are placed on separate nodes where possible. Two keep the endpoint serving through a node loss. min_replicas and max_replicas must be equal until Frontend autoscaling is supported. Changing any of these restarts every component of a running deployment.")
__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", "frontend"]

@field_validator('name', mode="before")
Expand Down
20 changes: 17 additions & 3 deletions platform_api_python_client/models/dynamo_frontend_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@

class DynamoFrontendConfig(BaseModel):
"""
Replica bounds for the Dynamo Frontend, shaped like a worker pool's so that Frontend autoscaling can arrive without an API change. Until it does, the Frontend runs a fixed count: ``min_replicas`` must equal ``max_replicas``.
Replica bounds and pod size for the Dynamo Frontend. A size is requested and limited alike; left unset, the chart's small default applies. The bounds are shaped like a worker pool's so that Frontend autoscaling can arrive without an API change. Until it does, the Frontend runs a fixed count: ``min_replicas`` must equal ``max_replicas``.
""" # noqa: E501
min_replicas: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = 3
max_replicas: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = 3
__properties: ClassVar[List[str]] = ["min_replicas", "max_replicas"]
cpu: Optional[Annotated[int, Field(le=8000, strict=True, ge=1000)]] = Field(default=None, description="CPU for each Frontend pod, in millicores.")
memory: Optional[Annotated[int, Field(le=16384, strict=True, ge=1024)]] = Field(default=None, description="Memory for each Frontend pod, in MiB.")
__properties: ClassVar[List[str]] = ["min_replicas", "max_replicas", "cpu", "memory"]

model_config = ConfigDict(
validate_by_name=True,
Expand Down Expand Up @@ -71,6 +73,16 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# set to None if cpu (nullable) is None
# and model_fields_set contains the field
if self.cpu is None and "cpu" in self.model_fields_set:
_dict['cpu'] = None

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

return _dict

@classmethod
Expand All @@ -84,7 +96,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate({
"min_replicas": obj.get("min_replicas") if obj.get("min_replicas") is not None else 3,
"max_replicas": obj.get("max_replicas") if obj.get("max_replicas") is not None else 3
"max_replicas": obj.get("max_replicas") if obj.get("max_replicas") is not None else 3,
"cpu": obj.get("cpu"),
"memory": obj.get("memory")
})
return _obj

Expand Down
105 changes: 105 additions & 0 deletions platform_api_python_client/models/dynamo_frontend_config_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# coding: utf-8

"""
Platform External API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501


from __future__ import annotations
import pprint
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
from pydantic_core import to_jsonable_python

class DynamoFrontendConfigResponse(BaseModel):
"""
The Frontend a revision requests, as read back. The size bounds stay on the request: in a response they would make a client generated from an older spec reject deployments sized above its caps once the caps are raised. The replica bounds keep the shape this response already has.
""" # noqa: E501
min_replicas: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = 3
max_replicas: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = 3
cpu: Optional[StrictInt] = Field(default=None, description="CPU for each Frontend pod, in millicores.")
memory: Optional[StrictInt] = Field(default=None, description="Memory for each Frontend pod, in MiB.")
__properties: ClassVar[List[str]] = ["min_replicas", "max_replicas", "cpu", "memory"]

model_config = ConfigDict(
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)


def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
return json.dumps(to_jsonable_python(self.to_dict()))

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of DynamoFrontendConfigResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))

def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:

* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])

_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# set to None if cpu (nullable) is None
# and model_fields_set contains the field
if self.cpu is None and "cpu" in self.model_fields_set:
_dict['cpu'] = None

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

return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of DynamoFrontendConfigResponse from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate({
"min_replicas": obj.get("min_replicas") if obj.get("min_replicas") is not None else 3,
"max_replicas": obj.get("max_replicas") if obj.get("max_replicas") is not None else 3,
"cpu": obj.get("cpu"),
"memory": obj.get("memory")
})
return _obj


Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from platform_api_python_client.models.deployment_status import DeploymentStatus
from platform_api_python_client.models.deployment_type import DeploymentType
from platform_api_python_client.models.dynamo_communications_input import DynamoCommunicationsInput
from platform_api_python_client.models.dynamo_frontend_config import DynamoFrontendConfig
from platform_api_python_client.models.dynamo_frontend_config_response import DynamoFrontendConfigResponse
from platform_api_python_client.models.dynamo_serving_mode import DynamoServingMode
from platform_api_python_client.models.dynamo_weight_transfer_configuration import DynamoWeightTransferConfiguration
from platform_api_python_client.models.dynamo_worker_pools import DynamoWorkerPools
Expand Down Expand Up @@ -76,7 +76,7 @@ class GetDynamoDeploymentResponse(BaseModel):
enable_logging: Optional[StrictBool] = True
enable_node_model_cache: Optional[StrictBool] = False
backend_protocol: Optional[BackendProtocol] = None
frontend: Optional[DynamoFrontendConfig] = Field(default=None, description="Frontend replica bounds this revision requests; the defaults for revisions created before the field.")
frontend: Optional[DynamoFrontendConfigResponse] = Field(default=None, description="Frontend replica bounds and size this revision requests; the defaults for revisions created before these fields.")
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "hf_token_ref", "serving_mode", "worker_pools", "communications", "weight_transfer", "model", "model_revision", "served_model_name", "runtime_version", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "env_vars", "env_vars_refs", "endpoint_certificate_authority", "endpoint_bearer_token", "bearer_token_ref", "image_pull_ref", "enable_logging", "enable_node_model_cache", "backend_protocol", "frontend"]

model_config = ConfigDict(
Expand Down Expand Up @@ -276,7 +276,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
"enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False,
"backend_protocol": obj.get("backend_protocol"),
"frontend": DynamoFrontendConfig.from_dict(obj["frontend"]) if obj.get("frontend") is not None else None
"frontend": DynamoFrontendConfigResponse.from_dict(obj["frontend"]) if obj.get("frontend") is not None else None
})
return _obj

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "platform_api_python_client"
version = "4.38.0"
version = "4.39.0"
description = "Platform External API"
authors = [
{name = "OpenAPI Generator Community",email = "team@openapitools.org"},
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "platform-api-python-client"
VERSION = "4.38.0"
VERSION = "4.39.0"
PYTHON_REQUIRES = ">= 3.10"
REQUIRES = [
"urllib3 >= 2.7.0, < 3.0.0",
Expand Down
Loading
Loading