diff --git a/README.md b/README.md index 13ce31b..2cb5e30 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/CreateDynamoDeploymentRequest.md b/docs/CreateDynamoDeploymentRequest.md index 4d8b67b..75812d6 100644 --- a/docs/CreateDynamoDeploymentRequest.md +++ b/docs/CreateDynamoDeploymentRequest.md @@ -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] diff --git a/docs/DeploymentResponse.md b/docs/DeploymentResponse.md index 24d150f..09248b3 100644 --- a/docs/DeploymentResponse.md +++ b/docs/DeploymentResponse.md @@ -17,18 +17,22 @@ 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] @@ -36,13 +40,8 @@ Name | Type | Description | Notes **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 diff --git a/docs/GetDynamoDeploymentResponse.md b/docs/GetDynamoDeploymentResponse.md index 90e905d..cdde16e 100644 --- a/docs/GetDynamoDeploymentResponse.md +++ b/docs/GetDynamoDeploymentResponse.md @@ -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] diff --git a/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index 67e670c..49ed449 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -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 diff --git a/platform_api_python_client/api/external_api.py b/platform_api_python_client/api/external_api.py index 55c6893..8e49fcc 100644 --- a/platform_api_python_client/api/external_api.py +++ b/platform_api_python_client/api/external_api.py @@ -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 @@ -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[ @@ -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[ @@ -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[ diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index b2d0fc5..a9f9530 100644 --- a/platform_api_python_client/api_client.py +++ b/platform_api_python_client/api_client.py @@ -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): diff --git a/platform_api_python_client/configuration.py b/platform_api_python_client/configuration.py index 6e63380..cfde342 100644 --- a/platform_api_python_client/configuration.py +++ b/platform_api_python_client/configuration.py @@ -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): diff --git a/platform_api_python_client/models/create_dynamo_deployment_request.py b/platform_api_python_client/models/create_dynamo_deployment_request.py index 5531eb1..6a30ed2 100644 --- a/platform_api_python_client/models/create_dynamo_deployment_request.py +++ b/platform_api_python_client/models/create_dynamo_deployment_request.py @@ -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 @@ -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): @@ -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: @@ -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: @@ -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: @@ -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"), diff --git a/platform_api_python_client/models/deployment_response.py b/platform_api_python_client/models/deployment_response.py index 7ba86c9..e33543d 100644 --- a/platform_api_python_client/models/deployment_response.py +++ b/platform_api_python_client/models/deployment_response.py @@ -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: @@ -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`") @@ -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)) @@ -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)) diff --git a/platform_api_python_client/models/get_dynamo_deployment_response.py b/platform_api_python_client/models/get_dynamo_deployment_response.py index 58b92d9..ad1eb8e 100644 --- a/platform_api_python_client/models/get_dynamo_deployment_response.py +++ b/platform_api_python_client/models/get_dynamo_deployment_response.py @@ -44,9 +44,10 @@ class GetDynamoDeploymentResponse(BaseModel): user_annotations: Optional[Dict[str, StrictStr]] = None model: StrictStr served_model_name: Optional[StrictStr] = None - container_port: StrictInt - initial_replicas: StrictInt - gpus_per_worker: StrictInt + min_replicas: StrictInt + max_replicas: StrictInt + concurrency: Optional[StrictInt] = None + cooldown_period: Optional[StrictInt] = None extra_args: Optional[StrictStr] = None env_vars: Optional[Dict[str, StrictStr]] = None endpoint_certificate_authority: Optional[StrictStr] = None @@ -54,7 +55,7 @@ class GetDynamoDeploymentResponse(BaseModel): enable_logging: Optional[StrictBool] = True enable_node_model_cache: Optional[StrictBool] = False backend_protocol: Optional[BackendProtocol] = None - __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "model", "served_model_name", "container_port", "initial_replicas", "gpus_per_worker", "extra_args", "env_vars", "endpoint_certificate_authority", "endpoint_bearer_token", "enable_logging", "enable_node_model_cache", "backend_protocol"] + __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "model", "served_model_name", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "env_vars", "endpoint_certificate_authority", "endpoint_bearer_token", "enable_logging", "enable_node_model_cache", "backend_protocol"] model_config = ConfigDict( populate_by_name=True, @@ -110,6 +111,16 @@ def to_dict(self) -> Dict[str, Any]: 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: @@ -151,9 +162,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "user_annotations": obj.get("user_annotations"), "model": obj.get("model"), "served_model_name": obj.get("served_model_name"), - "container_port": obj.get("container_port"), - "initial_replicas": obj.get("initial_replicas"), - "gpus_per_worker": obj.get("gpus_per_worker"), + "min_replicas": obj.get("min_replicas"), + "max_replicas": obj.get("max_replicas"), + "concurrency": obj.get("concurrency"), + "cooldown_period": obj.get("cooldown_period"), "extra_args": obj.get("extra_args"), "env_vars": obj.get("env_vars"), "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), diff --git a/pyproject.toml b/pyproject.toml index d3849cc..60a32b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "platform_api_python_client" -version = "4.21.1" +version = "4.22.0" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index deaf8b8..59ea878 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "platform-api-python-client" -VERSION = "4.21.1" +VERSION = "4.22.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/test/test_create_dynamo_deployment_request.py b/test/test_create_dynamo_deployment_request.py index 38dd8df..8546f9a 100644 --- a/test/test_create_dynamo_deployment_request.py +++ b/test/test_create_dynamo_deployment_request.py @@ -44,18 +44,14 @@ def make_instance(self, include_optional) -> CreateDynamoDeploymentRequest: 'key' : '' }, chart_revision = '', - image_url = '', - image_pull_secret_credentials = platform_api_python_client.models.image_pull_secret_credentials.ImagePullSecretCredentials( - username = '', - password = '', ), model = '', served_model_name = '', - container_port = 1024.0, - initial_replicas = 56, - gpus_per_worker = 56, + min_replicas = 56, + max_replicas = 56, + concurrency = 56, + cooldown_period = 56, extra_args = '', hf_token = '', - hf_token_secret_name = '', env_vars = { 'key' : '' }, @@ -70,7 +66,6 @@ def make_instance(self, include_optional) -> CreateDynamoDeploymentRequest: name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', cluster_id = 56, hardware_instance_id = 56, - image_url = '', model = '', ) """ diff --git a/test/test_deployment_response.py b/test/test_deployment_response.py index 6ecdb1c..b001865 100644 --- a/test/test_deployment_response.py +++ b/test/test_deployment_response.py @@ -49,20 +49,24 @@ def make_instance(self, include_optional) -> DeploymentResponse: user_annotations = { 'key' : '' }, - recipe = { }, - cserve_version = '', + model = '', + served_model_name = '', min_replicas = 56, max_replicas = 56, - initial_replicas = 56, - endpoint_certificate_authority = '', - endpoint_bearer_token = '', concurrency = 56, cooldown_period = 56, + extra_args = '', env_vars = { 'key' : '' }, + endpoint_certificate_authority = '', + endpoint_bearer_token = '', enable_logging = True, enable_node_model_cache = True, + backend_protocol = 'HTTP', + recipe = { }, + cserve_version = '', + initial_replicas = 56, session_affinity = True, container_port = 56, healthcheck = '', @@ -76,18 +80,13 @@ def make_instance(self, include_optional) -> DeploymentResponse: image_pull_secret_credentials = platform_api_python_client.models.image_pull_secret_credentials.ImagePullSecretCredentials( username = '', password = '', ), - backend_protocol = 'HTTP', config_file = platform_api_python_client.models.config_file_mount.ConfigFileMount( filename = '20', mount_path = '0', content = '0', ), metrics = platform_api_python_client.models.metrics_config.MetricsConfig( port = 1.0, - path = '/W(,j>6>eow3jCO&}nl`:&~', ), - model = '', - served_model_name = '', - gpus_per_worker = 56, - extra_args = '' + path = '/W(,j>6>eow3jCO&}nl`:&~', ) ) else: return DeploymentResponse( @@ -101,13 +100,11 @@ def make_instance(self, include_optional) -> DeploymentResponse: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), hardware_instance_id = 56, revision_number = 56, - recipe = { }, + model = '', min_replicas = 56, max_replicas = 56, - initial_replicas = 56, + recipe = { }, container_port = 56, - model = '', - gpus_per_worker = 56, ) """ diff --git a/test/test_get_dynamo_deployment_response.py b/test/test_get_dynamo_deployment_response.py index b07abc1..b56be37 100644 --- a/test/test_get_dynamo_deployment_response.py +++ b/test/test_get_dynamo_deployment_response.py @@ -51,9 +51,10 @@ def make_instance(self, include_optional) -> GetDynamoDeploymentResponse: }, model = '', served_model_name = '', - container_port = 56, - initial_replicas = 56, - gpus_per_worker = 56, + min_replicas = 56, + max_replicas = 56, + concurrency = 56, + cooldown_period = 56, extra_args = '', env_vars = { 'key' : '' @@ -77,9 +78,8 @@ def make_instance(self, include_optional) -> GetDynamoDeploymentResponse: hardware_instance_id = 56, revision_number = 56, model = '', - container_port = 56, - initial_replicas = 56, - gpus_per_worker = 56, + min_replicas = 56, + max_replicas = 56, ) """