diff --git a/README.md b/README.md index 0121c75..37c2a30 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.9.2 +- Package version: 4.9.4 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen diff --git a/docs/CreateCServeV3DeploymentRequest.md b/docs/CreateCServeV3DeploymentRequest.md index 480f34f..cd18c8f 100644 --- a/docs/CreateCServeV3DeploymentRequest.md +++ b/docs/CreateCServeV3DeploymentRequest.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **max_replicas** | **int** | | **initial_replicas** | **int** | | [optional] **concurrency** | **int** | | [optional] +**cooldown_period** | **int** | | [optional] **env_vars** | **Dict[str, str]** | | [optional] **enable_logging** | **bool** | | [optional] [default to True] **enable_node_model_cache** | **bool** | | [optional] [default to False] diff --git a/docs/CreateInferenceV3DeploymentRequest.md b/docs/CreateInferenceV3DeploymentRequest.md index f7e6990..2871a4c 100644 --- a/docs/CreateInferenceV3DeploymentRequest.md +++ b/docs/CreateInferenceV3DeploymentRequest.md @@ -18,11 +18,13 @@ Name | Type | Description | Notes **max_replicas** | **int** | | **initial_replicas** | **int** | | [optional] **concurrency** | **int** | | [optional] +**cooldown_period** | **int** | | [optional] **healthcheck** | **str** | | [optional] **env_vars** | **Dict[str, str]** | | [optional] **command** | **str** | | [optional] **endpoint_bearer_token** | **str** | | [optional] **endpoint_certificate_authority** | **str** | | [optional] +**hf_token** | **str** | | [optional] **backend_protocol** | [**BackendProtocol**](BackendProtocol.md) | | [optional] **enable_logging** | **bool** | | [optional] [default to False] diff --git a/docs/DeploymentResponse.md b/docs/DeploymentResponse.md index dc67525..9c9a951 100644 --- a/docs/DeploymentResponse.md +++ b/docs/DeploymentResponse.md @@ -25,6 +25,7 @@ Name | Type | Description | Notes **endpoint_certificate_authority** | **str** | | [optional] **endpoint_bearer_token** | **str** | | [optional] **concurrency** | **int** | | [optional] +**cooldown_period** | **int** | | [optional] [default to 1800] **env_vars** | **Dict[str, str]** | | [optional] **enable_logging** | **bool** | | [optional] [default to True] **enable_node_model_cache** | **bool** | | [optional] [default to False] diff --git a/docs/GetCServeV3DeploymentResponse.md b/docs/GetCServeV3DeploymentResponse.md index a1bc138..f57a675 100644 --- a/docs/GetCServeV3DeploymentResponse.md +++ b/docs/GetCServeV3DeploymentResponse.md @@ -25,6 +25,7 @@ Name | Type | Description | Notes **endpoint_certificate_authority** | **str** | | [optional] **endpoint_bearer_token** | **str** | | [optional] **concurrency** | **int** | | [optional] +**cooldown_period** | **int** | | [optional] [default to 1800] **env_vars** | **Dict[str, str]** | | [optional] **enable_logging** | **bool** | | [optional] [default to True] **enable_node_model_cache** | **bool** | | [optional] [default to False] diff --git a/docs/GetInferenceV3DeploymentResponse.md b/docs/GetInferenceV3DeploymentResponse.md index 2f40cac..491e2be 100644 --- a/docs/GetInferenceV3DeploymentResponse.md +++ b/docs/GetInferenceV3DeploymentResponse.md @@ -22,6 +22,7 @@ Name | Type | Description | Notes **max_replicas** | **int** | | **initial_replicas** | **int** | | [optional] **concurrency** | **int** | | [optional] +**cooldown_period** | **int** | | [optional] [default to 1800] **healthcheck** | **str** | | [optional] **endpoint_certificate_authority** | **str** | | [optional] **endpoint_bearer_token** | **str** | | [optional] diff --git a/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index 11c0eee..881bf2e 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "4.9.2" +__version__ = "4.9.4" # import apis into sdk package from platform_api_python_client.api.external_api import EXTERNALApi diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index f1b0595..d63c661 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.9.2/python' + self.user_agent = 'OpenAPI-Generator/4.9.4/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 1ec1432..5fb5a5c 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.9.2".\ + "SDK Package Version: 4.9.4".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/platform_api_python_client/models/create_c_serve_v3_deployment_request.py b/platform_api_python_client/models/create_c_serve_v3_deployment_request.py index bb413b1..0049573 100644 --- a/platform_api_python_client/models/create_c_serve_v3_deployment_request.py +++ b/platform_api_python_client/models/create_c_serve_v3_deployment_request.py @@ -43,10 +43,11 @@ class CreateCServeV3DeploymentRequest(BaseModel): max_replicas: StrictInt initial_replicas: Optional[StrictInt] = None concurrency: Optional[StrictInt] = None + cooldown_period: Optional[StrictInt] = None env_vars: Optional[Dict[str, StrictStr]] = None enable_logging: Optional[StrictBool] = True enable_node_model_cache: Optional[StrictBool] = False - __properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "env_vars", "enable_logging", "enable_node_model_cache"] + __properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "cooldown_period", "env_vars", "enable_logging", "enable_node_model_cache"] @field_validator('name') def name_validate_regular_expression(cls, value): @@ -142,6 +143,11 @@ def to_dict(self) -> Dict[str, Any]: 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 + return _dict @classmethod @@ -169,6 +175,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "max_replicas": obj.get("max_replicas"), "initial_replicas": obj.get("initial_replicas"), "concurrency": obj.get("concurrency"), + "cooldown_period": obj.get("cooldown_period"), "env_vars": obj.get("env_vars"), "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 diff --git a/platform_api_python_client/models/create_inference_v3_deployment_request.py b/platform_api_python_client/models/create_inference_v3_deployment_request.py index 4bde2b2..996c5ca 100644 --- a/platform_api_python_client/models/create_inference_v3_deployment_request.py +++ b/platform_api_python_client/models/create_inference_v3_deployment_request.py @@ -42,14 +42,16 @@ class CreateInferenceV3DeploymentRequest(BaseModel): max_replicas: StrictInt initial_replicas: Optional[StrictInt] = None concurrency: Optional[StrictInt] = None + cooldown_period: Optional[StrictInt] = None healthcheck: Optional[StrictStr] = None env_vars: Optional[Dict[str, StrictStr]] = None command: Optional[StrictStr] = None endpoint_bearer_token: Optional[StrictStr] = None endpoint_certificate_authority: Optional[StrictStr] = None + hf_token: Optional[StrictStr] = None backend_protocol: Optional[BackendProtocol] = None enable_logging: Optional[StrictBool] = False - __properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "image_url", "image_pull_secret_credentials", "port", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "healthcheck", "env_vars", "command", "endpoint_bearer_token", "endpoint_certificate_authority", "backend_protocol", "enable_logging"] + __properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "image_url", "image_pull_secret_credentials", "port", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "cooldown_period", "healthcheck", "env_vars", "command", "endpoint_bearer_token", "endpoint_certificate_authority", "hf_token", "backend_protocol", "enable_logging"] @field_validator('name') def name_validate_regular_expression(cls, value): @@ -130,6 +132,11 @@ def to_dict(self) -> Dict[str, Any]: 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 healthcheck (nullable) is None # and model_fields_set contains the field if self.healthcheck is None and "healthcheck" in self.model_fields_set: @@ -155,6 +162,11 @@ def to_dict(self) -> Dict[str, Any]: if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: _dict['endpoint_certificate_authority'] = None + # set to None if hf_token (nullable) is None + # and model_fields_set contains the field + if self.hf_token is None and "hf_token" in self.model_fields_set: + _dict['hf_token'] = None + return _dict @classmethod @@ -180,11 +192,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "max_replicas": obj.get("max_replicas"), "initial_replicas": obj.get("initial_replicas"), "concurrency": obj.get("concurrency"), + "cooldown_period": obj.get("cooldown_period"), "healthcheck": obj.get("healthcheck"), "env_vars": obj.get("env_vars"), "command": obj.get("command"), "endpoint_bearer_token": obj.get("endpoint_bearer_token"), "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), + "hf_token": obj.get("hf_token"), "backend_protocol": obj.get("backend_protocol"), "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else False }) diff --git a/platform_api_python_client/models/get_c_serve_v3_deployment_response.py b/platform_api_python_client/models/get_c_serve_v3_deployment_response.py index 49752f9..90e79fb 100644 --- a/platform_api_python_client/models/get_c_serve_v3_deployment_response.py +++ b/platform_api_python_client/models/get_c_serve_v3_deployment_response.py @@ -50,10 +50,11 @@ class GetCServeV3DeploymentResponse(BaseModel): endpoint_certificate_authority: Optional[StrictStr] = None endpoint_bearer_token: Optional[StrictStr] = None concurrency: Optional[StrictInt] = None + cooldown_period: Optional[StrictInt] = 1800 env_vars: Optional[Dict[str, StrictStr]] = None enable_logging: Optional[StrictBool] = True enable_node_model_cache: Optional[StrictBool] = False - __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", "recipe", "cserve_version", "min_replicas", "max_replicas", "initial_replicas", "endpoint_certificate_authority", "endpoint_bearer_token", "concurrency", "env_vars", "enable_logging", "enable_node_model_cache"] + __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", "recipe", "cserve_version", "min_replicas", "max_replicas", "initial_replicas", "endpoint_certificate_authority", "endpoint_bearer_token", "concurrency", "cooldown_period", "env_vars", "enable_logging", "enable_node_model_cache"] model_config = ConfigDict( populate_by_name=True, @@ -164,6 +165,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), "endpoint_bearer_token": obj.get("endpoint_bearer_token"), "concurrency": obj.get("concurrency"), + "cooldown_period": obj.get("cooldown_period") if obj.get("cooldown_period") is not None else 1800, "env_vars": obj.get("env_vars"), "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 diff --git a/platform_api_python_client/models/get_inference_v3_deployment_response.py b/platform_api_python_client/models/get_inference_v3_deployment_response.py index 75f8bed..09320d9 100644 --- a/platform_api_python_client/models/get_inference_v3_deployment_response.py +++ b/platform_api_python_client/models/get_inference_v3_deployment_response.py @@ -48,6 +48,7 @@ class GetInferenceV3DeploymentResponse(BaseModel): max_replicas: StrictInt initial_replicas: Optional[StrictInt] = None concurrency: Optional[StrictInt] = None + cooldown_period: Optional[StrictInt] = 1800 healthcheck: Optional[StrictStr] = None endpoint_certificate_authority: Optional[StrictStr] = None endpoint_bearer_token: Optional[StrictStr] = None @@ -58,7 +59,7 @@ class GetInferenceV3DeploymentResponse(BaseModel): image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None backend_protocol: Optional[BackendProtocol] = None enable_logging: Optional[StrictBool] = True - __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", "container_port", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "healthcheck", "endpoint_certificate_authority", "endpoint_bearer_token", "env_vars", "command", "command_args", "original_command", "image_pull_secret_credentials", "backend_protocol", "enable_logging"] + __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", "container_port", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "cooldown_period", "healthcheck", "endpoint_certificate_authority", "endpoint_bearer_token", "env_vars", "command", "command_args", "original_command", "image_pull_secret_credentials", "backend_protocol", "enable_logging"] model_config = ConfigDict( populate_by_name=True, @@ -191,6 +192,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "max_replicas": obj.get("max_replicas"), "initial_replicas": obj.get("initial_replicas"), "concurrency": obj.get("concurrency"), + "cooldown_period": obj.get("cooldown_period") if obj.get("cooldown_period") is not None else 1800, "healthcheck": obj.get("healthcheck"), "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), "endpoint_bearer_token": obj.get("endpoint_bearer_token"), diff --git a/pyproject.toml b/pyproject.toml index bc5c187..897a190 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "platform_api_python_client" -version = "4.9.2" +version = "4.9.4" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index 56a7541..2e34716 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.9.2" +VERSION = "4.9.4" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/test/test_create_c_serve_v3_deployment_request.py b/test/test_create_c_serve_v3_deployment_request.py index ac6ff73..fb3205b 100644 --- a/test/test_create_c_serve_v3_deployment_request.py +++ b/test/test_create_c_serve_v3_deployment_request.py @@ -52,6 +52,7 @@ def make_instance(self, include_optional) -> CreateCServeV3DeploymentRequest: max_replicas = 56, initial_replicas = 56, concurrency = 56, + cooldown_period = 56, env_vars = { 'key' : '' }, diff --git a/test/test_create_inference_v3_deployment_request.py b/test/test_create_inference_v3_deployment_request.py index 65e81bf..f0d204b 100644 --- a/test/test_create_inference_v3_deployment_request.py +++ b/test/test_create_inference_v3_deployment_request.py @@ -52,6 +52,7 @@ def make_instance(self, include_optional) -> CreateInferenceV3DeploymentRequest: max_replicas = 56, initial_replicas = 56, concurrency = 56, + cooldown_period = 56, healthcheck = '', env_vars = { 'key' : '' @@ -59,6 +60,7 @@ def make_instance(self, include_optional) -> CreateInferenceV3DeploymentRequest: command = '', endpoint_bearer_token = '', endpoint_certificate_authority = '', + hf_token = '', backend_protocol = 'HTTP', enable_logging = True ) diff --git a/test/test_deployment_response.py b/test/test_deployment_response.py index c72a97b..3794e3d 100644 --- a/test/test_deployment_response.py +++ b/test/test_deployment_response.py @@ -57,6 +57,7 @@ def make_instance(self, include_optional) -> DeploymentResponse: endpoint_certificate_authority = '', endpoint_bearer_token = '', concurrency = 56, + cooldown_period = 56, env_vars = { 'key' : '' }, diff --git a/test/test_get_c_serve_v3_deployment_response.py b/test/test_get_c_serve_v3_deployment_response.py index 1215630..b8553c8 100644 --- a/test/test_get_c_serve_v3_deployment_response.py +++ b/test/test_get_c_serve_v3_deployment_response.py @@ -57,6 +57,7 @@ def make_instance(self, include_optional) -> GetCServeV3DeploymentResponse: endpoint_certificate_authority = '', endpoint_bearer_token = '', concurrency = 56, + cooldown_period = 56, env_vars = { 'key' : '' }, diff --git a/test/test_get_inference_v3_deployment_response.py b/test/test_get_inference_v3_deployment_response.py index 1f7c45b..e9803fa 100644 --- a/test/test_get_inference_v3_deployment_response.py +++ b/test/test_get_inference_v3_deployment_response.py @@ -54,6 +54,7 @@ def make_instance(self, include_optional) -> GetInferenceV3DeploymentResponse: max_replicas = 56, initial_replicas = 56, concurrency = 56, + cooldown_period = 56, healthcheck = '', endpoint_certificate_authority = '', endpoint_bearer_token = '',