From 99c5fd17cd76864395e1faf89894588c0501ed11 Mon Sep 17 00:00:00 2001 From: platform CI Date: Thu, 10 Sep 2026 18:42:34 +0000 Subject: [PATCH] Update clients to latest platform release (4.29.0) --- README.md | 3 +- docs/CreateDynamoDeploymentRequest.md | 7 +- docs/DeploymentResponse.md | 6 + docs/DynamoWorkerPoolConfig.md | 7 +- docs/DynamoWorkerPools.md | 5 +- docs/EXTERNALApi.md | 90 +----- docs/GetDeploymentLogResponse.md | 2 +- docs/GetDynamoDeploymentResponse.md | 6 +- docs/ValidationError.md | 2 + platform_api_python_client/__init__.py | 2 +- .../api/external_api.py | 297 +----------------- platform_api_python_client/api_client.py | 2 +- platform_api_python_client/configuration.py | 2 +- .../create_dynamo_deployment_request.py | 34 +- .../models/deployment_response.py | 27 +- .../models/dynamo_worker_pool_config.py | 43 ++- .../models/dynamo_worker_pools.py | 28 +- .../models/get_dynamo_deployment_response.py | 17 +- .../models/validation_error.py | 15 +- pyproject.toml | 2 +- setup.py | 2 +- test/test_create_dynamo_deployment_request.py | 1 + test/test_deployment_response.py | 10 +- test/test_dynamo_worker_pool_config.py | 7 +- test/test_dynamo_worker_pools.py | 3 +- test/test_external_api.py | 7 - test/test_get_deployment_log_response.py | 4 +- test/test_get_dynamo_deployment_response.py | 1 + test/test_http_validation_error.py | 4 +- test/test_validation_error.py | 4 +- 30 files changed, 210 insertions(+), 430 deletions(-) diff --git a/README.md b/README.md index d56ae32..0971b2f 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.28.0 +- Package version: 4.29.0 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -108,7 +108,6 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**create_volume_endpoint_volumes_post**](docs/EXTERNALApi.md#create_volume_endpoint_volumes_post) | **POST** /volumes | Create Volume Endpoint *EXTERNALApi* | [**delete_cluster_clusters_cluster_id_delete**](docs/EXTERNALApi.md#delete_cluster_clusters_cluster_id_delete) | **DELETE** /clusters/{cluster_id} | Delete Cluster *EXTERNALApi* | [**delete_hardware_instance_hardware_instances_hardware_instance_id_delete**](docs/EXTERNALApi.md#delete_hardware_instance_hardware_instances_hardware_instance_id_delete) | **DELETE** /hardware-instances/{hardware_instance_id} | Delete Hardware Instance -*EXTERNALApi* | [**delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete**](docs/EXTERNALApi.md#delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete) | **DELETE** /clusters/{cluster_id}/organizations/{organization_id}/gpu-quota | Delete Org Gpu Quota On Cluster *EXTERNALApi* | [**delete_service_account_service_accounts_workos_id_delete**](docs/EXTERNALApi.md#delete_service_account_service_accounts_workos_id_delete) | **DELETE** /service-accounts/{workos_id} | Delete Service Account *EXTERNALApi* | [**delete_user_vault_item_by_id_endpoint_user_vault_secret_id_delete**](docs/EXTERNALApi.md#delete_user_vault_item_by_id_endpoint_user_vault_secret_id_delete) | **DELETE** /user_vault/{secret_id} | Delete User Vault Item By Id Endpoint *EXTERNALApi* | [**delete_user_vault_item_endpoint_user_vault_delete**](docs/EXTERNALApi.md#delete_user_vault_item_endpoint_user_vault_delete) | **DELETE** /user_vault | Delete User Vault Item Endpoint diff --git a/docs/CreateDynamoDeploymentRequest.md b/docs/CreateDynamoDeploymentRequest.md index 04ea991..d89ff8a 100644 --- a/docs/CreateDynamoDeploymentRequest.md +++ b/docs/CreateDynamoDeploymentRequest.md @@ -1,6 +1,6 @@ # CreateDynamoDeploymentRequest -Create a Dynamo deployment. Aggregated mode requires ``hardware_instance_id``; disaggregated mode requires fixed-size ``worker_pools``. +Create a Dynamo deployment. Hardware and scaling live under ``worker_pools``: aggregated mode uses exactly ``worker_pools.worker``; disaggregated mode uses exactly ``worker_pools.prefill`` and ``worker_pools.decode`` (fixed-size until per-role autoscaling ships). The top-level ``hardware_instance_id`` / ``min_replicas`` / ``max_replicas`` / ``concurrency`` / ``cooldown_period`` fields are the deprecated aggregated-only spelling; they stay accepted and may accompany ``worker_pools`` when they agree with it. ``parse_dynamo_topology`` owns every topology rule for both spellings. ## Properties @@ -17,8 +17,9 @@ Name | Type | Description | Notes **worker_pools** | [**DynamoWorkerPools**](DynamoWorkerPools.md) | | [optional] **model** | **str** | | **served_model_name** | **str** | | [optional] -**min_replicas** | **int** | | [optional] [default to 1] -**max_replicas** | **int** | | [optional] [default to 1] +**runtime_version** | **str** | Dynamo runtime image tag (for example 1.4.0). Defaults to the platform's current release; GET /prebuilt-images?type=dynamo lists the versions the platform has validated, but any tag may be requested. Changing it restarts every component of a running deployment. | [optional] +**min_replicas** | **int** | | [optional] +**max_replicas** | **int** | | [optional] **concurrency** | **int** | | [optional] **cooldown_period** | **int** | | [optional] **extra_args** | **str** | | [optional] diff --git a/docs/DeploymentResponse.md b/docs/DeploymentResponse.md index e1916eb..4ae965e 100644 --- a/docs/DeploymentResponse.md +++ b/docs/DeploymentResponse.md @@ -21,6 +21,7 @@ Name | Type | Description | Notes **worker_pools** | [**DynamoWorkerPools**](DynamoWorkerPools.md) | | [optional] **model** | **str** | | **served_model_name** | **str** | | [optional] +**runtime_version** | **str** | | [optional] **min_replicas** | **int** | | **max_replicas** | **int** | | **concurrency** | **int** | | [optional] @@ -47,6 +48,11 @@ Name | Type | Description | Notes **volume_mounts** | [**List[VolumeMount]**](VolumeMount.md) | | [optional] **ssh_public_key** | **str** | | [optional] **ssh_password** | **str** | | [optional] +**args** | **List[str]** | | [optional] +**completions** | **int** | | [optional] [default to 1] +**parallelism** | **int** | | [optional] [default to 1] +**backoff_limit** | **int** | | [optional] [default to 3] +**active_deadline_seconds** | **int** | | [optional] ## Example diff --git a/docs/DynamoWorkerPoolConfig.md b/docs/DynamoWorkerPoolConfig.md index b53786f..3f094a4 100644 --- a/docs/DynamoWorkerPoolConfig.md +++ b/docs/DynamoWorkerPoolConfig.md @@ -1,12 +1,17 @@ # DynamoWorkerPoolConfig +Hardware and scaling for one Dynamo worker role. ``min_replicas``/``max_replicas`` are the canonical size. ``replicas`` is the deprecated fixed-size alias (``min == max``) still accepted on disaggregated pools. ``parse_dynamo_topology`` owns the cross-field rules (bounds ordering, autoscaling target, which roles may autoscale). ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hardware_instance_id** | **int** | | -**replicas** | **int** | | +**replicas** | **int** | | [optional] +**min_replicas** | **int** | | [optional] +**max_replicas** | **int** | | [optional] +**concurrency** | **int** | | [optional] +**cooldown_period** | **int** | | [optional] ## Example diff --git a/docs/DynamoWorkerPools.md b/docs/DynamoWorkerPools.md index 4bda08d..6023db4 100644 --- a/docs/DynamoWorkerPools.md +++ b/docs/DynamoWorkerPools.md @@ -5,8 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**prefill** | [**DynamoWorkerPoolConfig**](DynamoWorkerPoolConfig.md) | | -**decode** | [**DynamoWorkerPoolConfig**](DynamoWorkerPoolConfig.md) | | +**worker** | [**DynamoWorkerPoolConfig**](DynamoWorkerPoolConfig.md) | | [optional] +**prefill** | [**DynamoWorkerPoolConfig**](DynamoWorkerPoolConfig.md) | | [optional] +**decode** | [**DynamoWorkerPoolConfig**](DynamoWorkerPoolConfig.md) | | [optional] ## Example diff --git a/docs/EXTERNALApi.md b/docs/EXTERNALApi.md index f167fd6..a641c90 100644 --- a/docs/EXTERNALApi.md +++ b/docs/EXTERNALApi.md @@ -18,7 +18,6 @@ Method | HTTP request | Description [**create_volume_endpoint_volumes_post**](EXTERNALApi.md#create_volume_endpoint_volumes_post) | **POST** /volumes | Create Volume Endpoint [**delete_cluster_clusters_cluster_id_delete**](EXTERNALApi.md#delete_cluster_clusters_cluster_id_delete) | **DELETE** /clusters/{cluster_id} | Delete Cluster [**delete_hardware_instance_hardware_instances_hardware_instance_id_delete**](EXTERNALApi.md#delete_hardware_instance_hardware_instances_hardware_instance_id_delete) | **DELETE** /hardware-instances/{hardware_instance_id} | Delete Hardware Instance -[**delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete**](EXTERNALApi.md#delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete) | **DELETE** /clusters/{cluster_id}/organizations/{organization_id}/gpu-quota | Delete Org Gpu Quota On Cluster [**delete_service_account_service_accounts_workos_id_delete**](EXTERNALApi.md#delete_service_account_service_accounts_workos_id_delete) | **DELETE** /service-accounts/{workos_id} | Delete Service Account [**delete_user_vault_item_by_id_endpoint_user_vault_secret_id_delete**](EXTERNALApi.md#delete_user_vault_item_by_id_endpoint_user_vault_secret_id_delete) | **DELETE** /user_vault/{secret_id} | Delete User Vault Item By Id Endpoint [**delete_user_vault_item_endpoint_user_vault_delete**](EXTERNALApi.md#delete_user_vault_item_endpoint_user_vault_delete) | **DELETE** /user_vault | Delete User Vault Item Endpoint @@ -81,6 +80,8 @@ Method | HTTP request | Description Create Cluster +Register a cluster row for the caller's parent org. Infra provisioning is not wired yet; ``request.credential`` is validated but not consumed. + ### Example * Bearer Authentication (HTTPBearer): @@ -1132,87 +1133,6 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete** -> OrganizationGpuQuotaResponse delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete(cluster_id, organization_id) - -Delete Org Gpu Quota On Cluster - -Set persisted quota to unlimited (-1). Creates a row if none exists. Does not remove the row or the KAI Queue CR. - -### Example - -* Bearer Authentication (HTTPBearer): - -```python -import platform_api_python_client -from platform_api_python_client.models.organization_gpu_quota_response import OrganizationGpuQuotaResponse -from platform_api_python_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = platform_api_python_client.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: HTTPBearer -configuration = platform_api_python_client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with platform_api_python_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = platform_api_python_client.EXTERNALApi(api_client) - cluster_id = 56 # int | - organization_id = 56 # int | - - try: - # Delete Org Gpu Quota On Cluster - api_response = api_instance.delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete(cluster_id, organization_id) - print("The response of EXTERNALApi->delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EXTERNALApi->delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cluster_id** | **int**| | - **organization_id** | **int**| | - -### Return type - -[**OrganizationGpuQuotaResponse**](OrganizationGpuQuotaResponse.md) - -### Authorization - -[HTTPBearer](../README.md#HTTPBearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Validation Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **delete_service_account_service_accounts_workos_id_delete** > delete_service_account_service_accounts_workos_id_delete(workos_id) @@ -4331,7 +4251,7 @@ This endpoint does not need any parameter. Put Org Gpu Quota On Cluster -Persist desired organization GPU quota on this cluster. Does not apply KAI Queue CRs. ``gpu_quota`` of -1 is unlimited. Rows are never removed. +Persist organization GPU quota on this cluster and apply KAI Queue CRs. ``gpu_quota`` of -1 is unlimited; a positive value is a hard cap. Rows are never removed. Requires ``CATALOG_TARGET_REVISION`` to contain ``catalog/src/catalog/kai_gpu_queues``. A 200 means the quota row was saved and an Argo CD sync was requested (not that Queue CRs are already healthy). A 502 means the row was saved but the Application upsert/sync request failed; re-issue this idempotent PUT to retry. ### Example @@ -4570,6 +4490,8 @@ This endpoint does not need any parameter. Update Cluster +Validate a cluster component configuration for an org-owned cluster. Infra provisioning is not wired yet; ``config.components`` is validated only. + ### Example * Bearer Authentication (HTTPBearer): @@ -4649,7 +4571,7 @@ Name | Type | Description | Notes Update Cluster Metadata -Update DB metadata for an org-owned cluster. Does not drive infra stack updates. Global clusters (parent_id IS NULL) are not mutable here. +Update DB metadata for an org-owned cluster. Global clusters (parent_id IS NULL) are not mutable here. ### Example diff --git a/docs/GetDeploymentLogResponse.md b/docs/GetDeploymentLogResponse.md index ea0b847..430d646 100644 --- a/docs/GetDeploymentLogResponse.md +++ b/docs/GetDeploymentLogResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**events** | **List[object]** | | +**events** | **List[Dict[str, object]]** | | **next_page_token** | **str** | | [optional] ## Example diff --git a/docs/GetDynamoDeploymentResponse.md b/docs/GetDynamoDeploymentResponse.md index 243c969..7b6364b 100644 --- a/docs/GetDynamoDeploymentResponse.md +++ b/docs/GetDynamoDeploymentResponse.md @@ -1,5 +1,6 @@ # GetDynamoDeploymentResponse +Dynamo deployment read model. ``worker_pools`` is the authoritative hardware/scaling view for both serving modes. The inherited ``hardware_instance_id`` is the single-hardware projection (worker for aggregated, decode for disaggregated) and the top-level scaling fields mirror ``worker_pools.worker``; both remain for consumers that predate ``worker_pools``. ## Properties @@ -21,8 +22,9 @@ Name | Type | Description | Notes **worker_pools** | [**DynamoWorkerPools**](DynamoWorkerPools.md) | | [optional] **model** | **str** | | **served_model_name** | **str** | | [optional] -**min_replicas** | **int** | | -**max_replicas** | **int** | | +**runtime_version** | **str** | | [optional] +**min_replicas** | **int** | Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree. | +**max_replicas** | **int** | Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree. | **concurrency** | **int** | | [optional] **cooldown_period** | **int** | | [optional] **extra_args** | **str** | | [optional] diff --git a/docs/ValidationError.md b/docs/ValidationError.md index 0a9d146..86c31bb 100644 --- a/docs/ValidationError.md +++ b/docs/ValidationError.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes **loc** | [**List[ValidationErrorLocInner]**](ValidationErrorLocInner.md) | | **msg** | **str** | | **type** | **str** | | +**input** | **object** | | [optional] +**ctx** | **object** | | [optional] ## Example diff --git a/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index db0e637..7c912a4 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "4.28.0" +__version__ = "4.29.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 97b40a1..9b5409c 100644 --- a/platform_api_python_client/api/external_api.py +++ b/platform_api_python_client/api/external_api.py @@ -126,6 +126,7 @@ def create_cluster_clusters_post( ) -> ClusterRegistrationResponse: """Create Cluster + Register a cluster row for the caller's parent org. Infra provisioning is not wired yet; ``request.credential`` is validated but not consumed. :param cluster_registration_request: (required) :type cluster_registration_request: ClusterRegistrationRequest @@ -193,6 +194,7 @@ def create_cluster_clusters_post_with_http_info( ) -> ApiResponse[ClusterRegistrationResponse]: """Create Cluster + Register a cluster row for the caller's parent org. Infra provisioning is not wired yet; ``request.credential`` is validated but not consumed. :param cluster_registration_request: (required) :type cluster_registration_request: ClusterRegistrationRequest @@ -260,6 +262,7 @@ def create_cluster_clusters_post_without_preload_content( ) -> RESTResponseType: """Create Cluster + Register a cluster row for the caller's parent org. Infra provisioning is not wired yet; ``request.credential`` is validated but not consumed. :param cluster_registration_request: (required) :type cluster_registration_request: ClusterRegistrationRequest @@ -3862,285 +3865,6 @@ def _delete_hardware_instance_hardware_instances_hardware_instance_id_delete_ser - @validate_call - def delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete( - self, - cluster_id: StrictInt, - organization_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OrganizationGpuQuotaResponse: - """Delete Org Gpu Quota On Cluster - - Set persisted quota to unlimited (-1). Creates a row if none exists. Does not remove the row or the KAI Queue CR. - - :param cluster_id: (required) - :type cluster_id: int - :param organization_id: (required) - :type organization_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete_serialize( - cluster_id=cluster_id, - organization_id=organization_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationGpuQuotaResponse", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete_with_http_info( - self, - cluster_id: StrictInt, - organization_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OrganizationGpuQuotaResponse]: - """Delete Org Gpu Quota On Cluster - - Set persisted quota to unlimited (-1). Creates a row if none exists. Does not remove the row or the KAI Queue CR. - - :param cluster_id: (required) - :type cluster_id: int - :param organization_id: (required) - :type organization_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete_serialize( - cluster_id=cluster_id, - organization_id=organization_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationGpuQuotaResponse", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete_without_preload_content( - self, - cluster_id: StrictInt, - organization_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Delete Org Gpu Quota On Cluster - - Set persisted quota to unlimited (-1). Creates a row if none exists. Does not remove the row or the KAI Queue CR. - - :param cluster_id: (required) - :type cluster_id: int - :param organization_id: (required) - :type organization_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete_serialize( - cluster_id=cluster_id, - organization_id=organization_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationGpuQuotaResponse", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete_serialize( - self, - cluster_id, - organization_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if cluster_id is not None: - _path_params['cluster_id'] = cluster_id - if organization_id is not None: - _path_params['organization_id'] = organization_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'HTTPBearer' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/clusters/{cluster_id}/organizations/{organization_id}/gpu-quota', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - @validate_call def delete_service_account_service_accounts_workos_id_delete( self, @@ -15049,7 +14773,7 @@ def put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_ ) -> OrganizationGpuQuotaResponse: """Put Org Gpu Quota On Cluster - Persist desired organization GPU quota on this cluster. Does not apply KAI Queue CRs. ``gpu_quota`` of -1 is unlimited. Rows are never removed. + Persist organization GPU quota on this cluster and apply KAI Queue CRs. ``gpu_quota`` of -1 is unlimited; a positive value is a hard cap. Rows are never removed. Requires ``CATALOG_TARGET_REVISION`` to contain ``catalog/src/catalog/kai_gpu_queues``. A 200 means the quota row was saved and an Argo CD sync was requested (not that Queue CRs are already healthy). A 502 means the row was saved but the Application upsert/sync request failed; re-issue this idempotent PUT to retry. :param cluster_id: (required) :type cluster_id: int @@ -15125,7 +14849,7 @@ def put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_ ) -> ApiResponse[OrganizationGpuQuotaResponse]: """Put Org Gpu Quota On Cluster - Persist desired organization GPU quota on this cluster. Does not apply KAI Queue CRs. ``gpu_quota`` of -1 is unlimited. Rows are never removed. + Persist organization GPU quota on this cluster and apply KAI Queue CRs. ``gpu_quota`` of -1 is unlimited; a positive value is a hard cap. Rows are never removed. Requires ``CATALOG_TARGET_REVISION`` to contain ``catalog/src/catalog/kai_gpu_queues``. A 200 means the quota row was saved and an Argo CD sync was requested (not that Queue CRs are already healthy). A 502 means the row was saved but the Application upsert/sync request failed; re-issue this idempotent PUT to retry. :param cluster_id: (required) :type cluster_id: int @@ -15201,7 +14925,7 @@ def put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_ ) -> RESTResponseType: """Put Org Gpu Quota On Cluster - Persist desired organization GPU quota on this cluster. Does not apply KAI Queue CRs. ``gpu_quota`` of -1 is unlimited. Rows are never removed. + Persist organization GPU quota on this cluster and apply KAI Queue CRs. ``gpu_quota`` of -1 is unlimited; a positive value is a hard cap. Rows are never removed. Requires ``CATALOG_TARGET_REVISION`` to contain ``catalog/src/catalog/kai_gpu_queues``. A 200 means the quota row was saved and an Argo CD sync was requested (not that Queue CRs are already healthy). A 502 means the row was saved but the Application upsert/sync request failed; re-issue this idempotent PUT to retry. :param cluster_id: (required) :type cluster_id: int @@ -15905,6 +15629,7 @@ def update_cluster_clusters_cluster_id_put( ) -> object: """Update Cluster + Validate a cluster component configuration for an org-owned cluster. Infra provisioning is not wired yet; ``config.components`` is validated only. :param cluster_id: (required) :type cluster_id: int @@ -15976,6 +15701,7 @@ def update_cluster_clusters_cluster_id_put_with_http_info( ) -> ApiResponse[object]: """Update Cluster + Validate a cluster component configuration for an org-owned cluster. Infra provisioning is not wired yet; ``config.components`` is validated only. :param cluster_id: (required) :type cluster_id: int @@ -16047,6 +15773,7 @@ def update_cluster_clusters_cluster_id_put_without_preload_content( ) -> RESTResponseType: """Update Cluster + Validate a cluster component configuration for an org-owned cluster. Infra provisioning is not wired yet; ``config.components`` is validated only. :param cluster_id: (required) :type cluster_id: int @@ -16194,7 +15921,7 @@ def update_cluster_metadata_clusters_cluster_id_metadata_put( ) -> GetClusterResponse: """Update Cluster Metadata - Update DB metadata for an org-owned cluster. Does not drive infra stack updates. Global clusters (parent_id IS NULL) are not mutable here. + Update DB metadata for an org-owned cluster. Global clusters (parent_id IS NULL) are not mutable here. :param cluster_id: (required) :type cluster_id: int @@ -16266,7 +15993,7 @@ def update_cluster_metadata_clusters_cluster_id_metadata_put_with_http_info( ) -> ApiResponse[GetClusterResponse]: """Update Cluster Metadata - Update DB metadata for an org-owned cluster. Does not drive infra stack updates. Global clusters (parent_id IS NULL) are not mutable here. + Update DB metadata for an org-owned cluster. Global clusters (parent_id IS NULL) are not mutable here. :param cluster_id: (required) :type cluster_id: int @@ -16338,7 +16065,7 @@ def update_cluster_metadata_clusters_cluster_id_metadata_put_without_preload_con ) -> RESTResponseType: """Update Cluster Metadata - Update DB metadata for an org-owned cluster. Does not drive infra stack updates. Global clusters (parent_id IS NULL) are not mutable here. + Update DB metadata for an org-owned cluster. Global clusters (parent_id IS NULL) are not mutable here. :param cluster_id: (required) :type cluster_id: int diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index 9cca017..29d68c5 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.28.0/python' + self.user_agent = 'OpenAPI-Generator/4.29.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 448802f..83566ac 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.28.0".\ + "SDK Package Version: 4.29.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 eda0fca..ef4c008 100644 --- a/platform_api_python_client/models/create_dynamo_deployment_request.py +++ b/platform_api_python_client/models/create_dynamo_deployment_request.py @@ -28,7 +28,7 @@ class CreateDynamoDeploymentRequest(BaseModel): """ - Create a Dynamo deployment. Aggregated mode requires ``hardware_instance_id``; disaggregated mode requires fixed-size ``worker_pools``. + Create a Dynamo deployment. Hardware and scaling live under ``worker_pools``: aggregated mode uses exactly ``worker_pools.worker``; disaggregated mode uses exactly ``worker_pools.prefill`` and ``worker_pools.decode`` (fixed-size until per-role autoscaling ships). The top-level ``hardware_instance_id`` / ``min_replicas`` / ``max_replicas`` / ``concurrency`` / ``cooldown_period`` fields are the deprecated aggregated-only spelling; they stay accepted and may accompany ``worker_pools`` when they agree with it. ``parse_dynamo_topology`` owns every topology rule for both spellings. """ # noqa: E501 max_surge: Optional[StrictInt] = None max_unavailable: Optional[StrictInt] = None @@ -41,8 +41,9 @@ class CreateDynamoDeploymentRequest(BaseModel): worker_pools: Optional[DynamoWorkerPools] = None model: StrictStr served_model_name: Optional[StrictStr] = None - min_replicas: Optional[StrictInt] = 1 - max_replicas: Optional[StrictInt] = 1 + runtime_version: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Dynamo runtime image tag (for example 1.4.0). Defaults to the platform's current release; GET /prebuilt-images?type=dynamo lists the versions the platform has validated, but any tag may be requested. Changing it restarts every component of a running deployment.") + min_replicas: Optional[StrictInt] = None + max_replicas: Optional[StrictInt] = None concurrency: Optional[StrictInt] = None cooldown_period: Optional[StrictInt] = None extra_args: Optional[StrictStr] = None @@ -53,7 +54,7 @@ class CreateDynamoDeploymentRequest(BaseModel): 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", "serving_mode", "worker_pools", "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"] + __properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "serving_mode", "worker_pools", "model", "served_model_name", "runtime_version", "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): @@ -62,6 +63,16 @@ def name_validate_regular_expression(cls, value): raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/") return value + @field_validator('runtime_version') + def runtime_version_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[A-Za-z0-9_][A-Za-z0-9._-]{0,127}$", value): + raise ValueError(r"must validate the regular expression /^[A-Za-z0-9_][A-Za-z0-9._-]{0,127}$/") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -134,6 +145,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 min_replicas (nullable) is None + # and model_fields_set contains the field + if self.min_replicas is None and "min_replicas" in self.model_fields_set: + _dict['min_replicas'] = None + + # set to None if max_replicas (nullable) is None + # and model_fields_set contains the field + if self.max_replicas is None and "max_replicas" in self.model_fields_set: + _dict['max_replicas'] = 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: @@ -187,8 +208,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "worker_pools": DynamoWorkerPools.from_dict(obj["worker_pools"]) if obj.get("worker_pools") is not None else None, "model": obj.get("model"), "served_model_name": obj.get("served_model_name"), - "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, + "runtime_version": obj.get("runtime_version"), + "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"), diff --git a/platform_api_python_client/models/deployment_response.py b/platform_api_python_client/models/deployment_response.py index 5b91901..947f897 100644 --- a/platform_api_python_client/models/deployment_response.py +++ b/platform_api_python_client/models/deployment_response.py @@ -23,11 +23,12 @@ from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse from platform_api_python_client.models.get_dynamo_deployment_response import GetDynamoDeploymentResponse from platform_api_python_client.models.get_inference_v3_deployment_response import GetInferenceV3DeploymentResponse +from platform_api_python_client.models.get_job_deployment_response import GetJobDeploymentResponse from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict from typing_extensions import Literal, Self from pydantic import Field -DEPLOYMENTRESPONSE_ANY_OF_SCHEMAS = ["GetCServeV3DeploymentResponse", "GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse"] +DEPLOYMENTRESPONSE_ANY_OF_SCHEMAS = ["GetCServeV3DeploymentResponse", "GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse", "GetJobDeploymentResponse"] class DeploymentResponse(BaseModel): """ @@ -42,11 +43,13 @@ class DeploymentResponse(BaseModel): anyof_schema_3_validator: Optional[GetInferenceV3DeploymentResponse] = None # data type: GetComputeDeploymentResponse anyof_schema_4_validator: Optional[GetComputeDeploymentResponse] = None + # data type: GetJobDeploymentResponse + anyof_schema_5_validator: Optional[GetJobDeploymentResponse] = None if TYPE_CHECKING: - actual_instance: Optional[Union[GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse]] = None + actual_instance: Optional[Union[GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "GetCServeV3DeploymentResponse", "GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse" } + any_of_schemas: Set[str] = { "GetCServeV3DeploymentResponse", "GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse", "GetJobDeploymentResponse" } model_config = { "validate_assignment": True, @@ -91,9 +94,15 @@ def actual_instance_must_validate_anyof(cls, v): else: return v + # validate data type: GetJobDeploymentResponse + if not isinstance(v, GetJobDeploymentResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `GetJobDeploymentResponse`") + else: + return v + if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in DeploymentResponse with anyOf schemas: GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting the actual_instance in DeploymentResponse with anyOf schemas: GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse. Details: " + ", ".join(error_messages)) else: return v @@ -130,10 +139,16 @@ def from_json(cls, json_str: str) -> Self: return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) + # anyof_schema_5_validator: Optional[GetJobDeploymentResponse] = None + try: + instance.actual_instance = GetJobDeploymentResponse.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into DeploymentResponse with anyOf schemas: GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into DeploymentResponse with anyOf schemas: GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse. Details: " + ", ".join(error_messages)) else: return instance @@ -147,7 +162,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/platform_api_python_client/models/dynamo_worker_pool_config.py b/platform_api_python_client/models/dynamo_worker_pool_config.py index c2c9126..ee8fb6c 100644 --- a/platform_api_python_client/models/dynamo_worker_pool_config.py +++ b/platform_api_python_client/models/dynamo_worker_pool_config.py @@ -18,19 +18,23 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self class DynamoWorkerPoolConfig(BaseModel): """ - DynamoWorkerPoolConfig + Hardware and scaling for one Dynamo worker role. ``min_replicas``/``max_replicas`` are the canonical size. ``replicas`` is the deprecated fixed-size alias (``min == max``) still accepted on disaggregated pools. ``parse_dynamo_topology`` owns the cross-field rules (bounds ordering, autoscaling target, which roles may autoscale). """ # noqa: E501 hardware_instance_id: StrictInt - replicas: Annotated[int, Field(strict=True, ge=1)] + replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None + min_replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None + max_replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None + concurrency: Optional[Annotated[int, Field(strict=True, ge=1)]] = None + cooldown_period: Optional[Annotated[int, Field(le=3600, strict=True, ge=0)]] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["hardware_instance_id", "replicas"] + __properties: ClassVar[List[str]] = ["hardware_instance_id", "replicas", "min_replicas", "max_replicas", "concurrency", "cooldown_period"] model_config = ConfigDict( populate_by_name=True, @@ -78,6 +82,31 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value + # set to None if replicas (nullable) is None + # and model_fields_set contains the field + if self.replicas is None and "replicas" in self.model_fields_set: + _dict['replicas'] = None + + # set to None if min_replicas (nullable) is None + # and model_fields_set contains the field + if self.min_replicas is None and "min_replicas" in self.model_fields_set: + _dict['min_replicas'] = None + + # set to None if max_replicas (nullable) is None + # and model_fields_set contains the field + if self.max_replicas is None and "max_replicas" in self.model_fields_set: + _dict['max_replicas'] = 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 + return _dict @classmethod @@ -91,7 +120,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "hardware_instance_id": obj.get("hardware_instance_id"), - "replicas": obj.get("replicas") + "replicas": obj.get("replicas"), + "min_replicas": obj.get("min_replicas"), + "max_replicas": obj.get("max_replicas"), + "concurrency": obj.get("concurrency"), + "cooldown_period": obj.get("cooldown_period") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/platform_api_python_client/models/dynamo_worker_pools.py b/platform_api_python_client/models/dynamo_worker_pools.py index 49c97ed..6962c84 100644 --- a/platform_api_python_client/models/dynamo_worker_pools.py +++ b/platform_api_python_client/models/dynamo_worker_pools.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from platform_api_python_client.models.dynamo_worker_pool_config import DynamoWorkerPoolConfig from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,11 @@ class DynamoWorkerPools(BaseModel): """ DynamoWorkerPools """ # noqa: E501 - prefill: DynamoWorkerPoolConfig - decode: DynamoWorkerPoolConfig + worker: Optional[DynamoWorkerPoolConfig] = None + prefill: Optional[DynamoWorkerPoolConfig] = None + decode: Optional[DynamoWorkerPoolConfig] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["prefill", "decode"] + __properties: ClassVar[List[str]] = ["worker", "prefill", "decode"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +74,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of worker + if self.worker: + _dict['worker'] = self.worker.to_dict() # override the default output from pydantic by calling `to_dict()` of prefill if self.prefill: _dict['prefill'] = self.prefill.to_dict() @@ -84,6 +88,21 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value + # set to None if worker (nullable) is None + # and model_fields_set contains the field + if self.worker is None and "worker" in self.model_fields_set: + _dict['worker'] = None + + # set to None if prefill (nullable) is None + # and model_fields_set contains the field + if self.prefill is None and "prefill" in self.model_fields_set: + _dict['prefill'] = None + + # set to None if decode (nullable) is None + # and model_fields_set contains the field + if self.decode is None and "decode" in self.model_fields_set: + _dict['decode'] = None + return _dict @classmethod @@ -96,6 +115,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "worker": DynamoWorkerPoolConfig.from_dict(obj["worker"]) if obj.get("worker") is not None else None, "prefill": DynamoWorkerPoolConfig.from_dict(obj["prefill"]) if obj.get("prefill") is not None else None, "decode": DynamoWorkerPoolConfig.from_dict(obj["decode"]) if obj.get("decode") is not None else None }) 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 e8c7117..3e1b77e 100644 --- a/platform_api_python_client/models/get_dynamo_deployment_response.py +++ b/platform_api_python_client/models/get_dynamo_deployment_response.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from platform_api_python_client.models.backend_protocol import BackendProtocol from platform_api_python_client.models.deployment_status import DeploymentStatus @@ -30,7 +30,7 @@ class GetDynamoDeploymentResponse(BaseModel): """ - GetDynamoDeploymentResponse + Dynamo deployment read model. ``worker_pools`` is the authoritative hardware/scaling view for both serving modes. The inherited ``hardware_instance_id`` is the single-hardware projection (worker for aggregated, decode for disaggregated) and the top-level scaling fields mirror ``worker_pools.worker``; both remain for consumers that predate ``worker_pools``. """ # noqa: E501 creator_email: StrictStr cluster_id: StrictInt @@ -48,8 +48,9 @@ class GetDynamoDeploymentResponse(BaseModel): worker_pools: Optional[DynamoWorkerPools] = None model: StrictStr served_model_name: Optional[StrictStr] = None - min_replicas: StrictInt - max_replicas: StrictInt + runtime_version: Optional[StrictStr] = None + min_replicas: StrictInt = Field(description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.") + max_replicas: StrictInt = Field(description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.") concurrency: Optional[StrictInt] = None cooldown_period: Optional[StrictInt] = None extra_args: Optional[StrictStr] = None @@ -59,7 +60,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", "serving_mode", "worker_pools", "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"] + __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", "serving_mode", "worker_pools", "model", "served_model_name", "runtime_version", "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, @@ -123,6 +124,11 @@ 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 runtime_version (nullable) is None + # and model_fields_set contains the field + if self.runtime_version is None and "runtime_version" in self.model_fields_set: + _dict['runtime_version'] = 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: @@ -176,6 +182,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "worker_pools": DynamoWorkerPools.from_dict(obj["worker_pools"]) if obj.get("worker_pools") is not None else None, "model": obj.get("model"), "served_model_name": obj.get("served_model_name"), + "runtime_version": obj.get("runtime_version"), "min_replicas": obj.get("min_replicas"), "max_replicas": obj.get("max_replicas"), "concurrency": obj.get("concurrency"), diff --git a/platform_api_python_client/models/validation_error.py b/platform_api_python_client/models/validation_error.py index a27db44..d0c2f01 100644 --- a/platform_api_python_client/models/validation_error.py +++ b/platform_api_python_client/models/validation_error.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,9 @@ class ValidationError(BaseModel): loc: List[ValidationErrorLocInner] msg: StrictStr type: StrictStr - __properties: ClassVar[List[str]] = ["loc", "msg", "type"] + input: Optional[Any] = None + ctx: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["loc", "msg", "type", "input", "ctx"] model_config = ConfigDict( populate_by_name=True, @@ -78,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_loc: _items.append(_item_loc.to_dict()) _dict['loc'] = _items + # set to None if input (nullable) is None + # and model_fields_set contains the field + if self.input is None and "input" in self.model_fields_set: + _dict['input'] = None + return _dict @classmethod @@ -92,7 +99,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "loc": [ValidationErrorLocInner.from_dict(_item) for _item in obj["loc"]] if obj.get("loc") is not None else None, "msg": obj.get("msg"), - "type": obj.get("type") + "type": obj.get("type"), + "input": obj.get("input"), + "ctx": obj.get("ctx") }) return _obj diff --git a/pyproject.toml b/pyproject.toml index 67d275e..3ad5260 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "platform_api_python_client" -version = "4.28.0" +version = "4.29.0" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index 1b40689..ade18fb 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.28.0" +VERSION = "4.29.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 15b0a95..a7a153e 100644 --- a/test/test_create_dynamo_deployment_request.py +++ b/test/test_create_dynamo_deployment_request.py @@ -48,6 +48,7 @@ def make_instance(self, include_optional) -> CreateDynamoDeploymentRequest: worker_pools = { }, model = '', served_model_name = '', + runtime_version = 'e6bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0L', min_replicas = 56, max_replicas = 56, concurrency = 56, diff --git a/test/test_deployment_response.py b/test/test_deployment_response.py index 47ced09..40b86b9 100644 --- a/test/test_deployment_response.py +++ b/test/test_deployment_response.py @@ -53,6 +53,7 @@ def make_instance(self, include_optional) -> DeploymentResponse: worker_pools = { }, model = '', served_model_name = '', + runtime_version = '', min_replicas = 56, max_replicas = 56, concurrency = 56, @@ -96,7 +97,14 @@ def make_instance(self, include_optional) -> DeploymentResponse: read_only = True, ) ], ssh_public_key = '', - ssh_password = '' + ssh_password = '', + args = [ + '' + ], + completions = 56, + parallelism = 56, + backoff_limit = 56, + active_deadline_seconds = 56 ) else: return DeploymentResponse( diff --git a/test/test_dynamo_worker_pool_config.py b/test/test_dynamo_worker_pool_config.py index 0bddb63..799f56d 100644 --- a/test/test_dynamo_worker_pool_config.py +++ b/test/test_dynamo_worker_pool_config.py @@ -36,12 +36,15 @@ def make_instance(self, include_optional) -> DynamoWorkerPoolConfig: if include_optional: return DynamoWorkerPoolConfig( hardware_instance_id = 56, - replicas = 1.0 + replicas = 1.0, + min_replicas = 1.0, + max_replicas = 1.0, + concurrency = 1.0, + cooldown_period = 0.0 ) else: return DynamoWorkerPoolConfig( hardware_instance_id = 56, - replicas = 1.0, ) """ diff --git a/test/test_dynamo_worker_pools.py b/test/test_dynamo_worker_pools.py index b45bc79..30d7b93 100644 --- a/test/test_dynamo_worker_pools.py +++ b/test/test_dynamo_worker_pools.py @@ -35,13 +35,12 @@ def make_instance(self, include_optional) -> DynamoWorkerPools: model = DynamoWorkerPools() if include_optional: return DynamoWorkerPools( + worker = { }, prefill = { }, decode = { } ) else: return DynamoWorkerPools( - prefill = { }, - decode = { }, ) """ diff --git a/test/test_external_api.py b/test/test_external_api.py index 40a166e..8c88235 100644 --- a/test/test_external_api.py +++ b/test/test_external_api.py @@ -124,13 +124,6 @@ def test_delete_hardware_instance_hardware_instances_hardware_instance_id_delete """ pass - def test_delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete(self) -> None: - """Test case for delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete - - Delete Org Gpu Quota On Cluster - """ - pass - def test_delete_service_account_service_accounts_workos_id_delete(self) -> None: """Test case for delete_service_account_service_accounts_workos_id_delete diff --git a/test/test_get_deployment_log_response.py b/test/test_get_deployment_log_response.py index afbb0e4..7aa764b 100644 --- a/test/test_get_deployment_log_response.py +++ b/test/test_get_deployment_log_response.py @@ -36,14 +36,14 @@ def make_instance(self, include_optional) -> GetDeploymentLogResponse: if include_optional: return GetDeploymentLogResponse( events = [ - None + { } ], next_page_token = '' ) else: return GetDeploymentLogResponse( events = [ - None + { } ], ) """ diff --git a/test/test_get_dynamo_deployment_response.py b/test/test_get_dynamo_deployment_response.py index 4b3592a..5aa84ce 100644 --- a/test/test_get_dynamo_deployment_response.py +++ b/test/test_get_dynamo_deployment_response.py @@ -53,6 +53,7 @@ def make_instance(self, include_optional) -> GetDynamoDeploymentResponse: worker_pools = { }, model = '', served_model_name = '', + runtime_version = '', min_replicas = 56, max_replicas = 56, concurrency = 56, diff --git a/test/test_http_validation_error.py b/test/test_http_validation_error.py index b87c23f..b0fcfd3 100644 --- a/test/test_http_validation_error.py +++ b/test/test_http_validation_error.py @@ -41,7 +41,9 @@ def make_instance(self, include_optional) -> HTTPValidationError: null ], msg = '', - type = '', ) + type = '', + input = null, + ctx = platform_api_python_client.models.context.Context(), ) ] ) else: diff --git a/test/test_validation_error.py b/test/test_validation_error.py index bcf6cfd..7046712 100644 --- a/test/test_validation_error.py +++ b/test/test_validation_error.py @@ -39,7 +39,9 @@ def make_instance(self, include_optional) -> ValidationError: null ], msg = '', - type = '' + type = '', + input = None, + ctx = platform_api_python_client.models.context.Context() ) else: return ValidationError(