diff --git a/README.md b/README.md index 0570b05..2f47960 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.0.9 +- Package version: 4.0.10 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -97,7 +97,6 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**create_api_key_credentials_api_key_post**](docs/EXTERNALApi.md#create_api_key_credentials_api_key_post) | **POST** /credentials/api-key | Create Api Key *EXTERNALApi* | [**create_checkout_payments_checkout_post**](docs/EXTERNALApi.md#create_checkout_payments_checkout_post) | **POST** /payments/checkout | Create Checkout *EXTERNALApi* | [**create_compute_deployment_deployments_compute_post**](docs/EXTERNALApi.md#create_compute_deployment_deployments_compute_post) | **POST** /deployments/compute | Create Compute Deployment -*EXTERNALApi* | [**create_cserve_deployment_deployments_cserve_post**](docs/EXTERNALApi.md#create_cserve_deployment_deployments_cserve_post) | **POST** /deployments/cserve | Create Cserve Deployment *EXTERNALApi* | [**create_cserve_v2_deployment_deployments_cserve_v2_post**](docs/EXTERNALApi.md#create_cserve_v2_deployment_deployments_cserve_v2_post) | **POST** /deployments/cserve_v2 | Create Cserve V2 Deployment *EXTERNALApi* | [**create_inference_deployment_deployments_inference_post**](docs/EXTERNALApi.md#create_inference_deployment_deployments_inference_post) | **POST** /deployments/inference | Create Inference Deployment *EXTERNALApi* | [**create_rag_deployment_deployments_rag_post**](docs/EXTERNALApi.md#create_rag_deployment_deployments_rag_post) | **POST** /deployments/rag | Create Rag Deployment @@ -114,7 +113,6 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**get_clusters_clusters_get**](docs/EXTERNALApi.md#get_clusters_clusters_get) | **GET** /clusters | Get Clusters *EXTERNALApi* | [**get_compute_deployment_deployments_compute_deployment_id_get**](docs/EXTERNALApi.md#get_compute_deployment_deployments_compute_deployment_id_get) | **GET** /deployments/compute/{deployment_id} | Get Compute Deployment *EXTERNALApi* | [**get_credits_credits_get**](docs/EXTERNALApi.md#get_credits_credits_get) | **GET** /credits | Get Credits -*EXTERNALApi* | [**get_cserve_deployment_deployments_cserve_deployment_id_get**](docs/EXTERNALApi.md#get_cserve_deployment_deployments_cserve_deployment_id_get) | **GET** /deployments/cserve/{deployment_id} | Get Cserve Deployment *EXTERNALApi* | [**get_cserve_recipe_deployments_cserve_recipes_get**](docs/EXTERNALApi.md#get_cserve_recipe_deployments_cserve_recipes_get) | **GET** /deployments/cserve/recipes | Get Cserve Recipe *EXTERNALApi* | [**get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get**](docs/EXTERNALApi.md#get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get) | **GET** /deployments/cserve_v2/{deployment_id} | Get Cserve V2 Deployment *EXTERNALApi* | [**get_deployment_logs_deployments_logs_deployment_id_get**](docs/EXTERNALApi.md#get_deployment_logs_deployments_logs_deployment_id_get) | **GET** /deployments/logs/{deployment_id} | Get Deployment Logs @@ -143,12 +141,9 @@ Class | Method | HTTP request | Description - [APIKeyRequest](docs/APIKeyRequest.md) - [APIKeyResponse](docs/APIKeyResponse.md) - - [CServeRecipe](docs/CServeRecipe.md) - [CServeRecipePerf](docs/CServeRecipePerf.md) - [CServeRecipeResponse](docs/CServeRecipeResponse.md) - [CServeV2Recipe](docs/CServeV2Recipe.md) - - [CreateCServeDeploymentRequest](docs/CreateCServeDeploymentRequest.md) - - [CreateCServeDeploymentResponse](docs/CreateCServeDeploymentResponse.md) - [CreateCServeV2DeploymentRequest](docs/CreateCServeV2DeploymentRequest.md) - [CreateCServeV2DeploymentResponse](docs/CreateCServeV2DeploymentResponse.md) - [CreateCheckoutRequest](docs/CreateCheckoutRequest.md) @@ -170,7 +165,6 @@ Class | Method | HTTP request | Description - [DeploymentType](docs/DeploymentType.md) - [DeploymentUsageValue](docs/DeploymentUsageValue.md) - [GetAutochargePreferencesResponse](docs/GetAutochargePreferencesResponse.md) - - [GetCServeDeploymentResponse](docs/GetCServeDeploymentResponse.md) - [GetCServeV2DeploymentResponse](docs/GetCServeV2DeploymentResponse.md) - [GetClusterResponse](docs/GetClusterResponse.md) - [GetComputeDeploymentResponse](docs/GetComputeDeploymentResponse.md) diff --git a/docs/CServeRecipe.md b/docs/CServeRecipe.md deleted file mode 100644 index f2c63e9..0000000 --- a/docs/CServeRecipe.md +++ /dev/null @@ -1,54 +0,0 @@ -# CServeRecipe - -Base class for deployment planner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**model** | **str** | | -**revision** | **str** | | [optional] -**is_embedding_model** | **bool** | | [optional] [default to False] -**tensor_parallel_size** | **int** | | -**pipeline_parallel_size** | **int** | | -**block_size** | **int** | | [optional] [default to 32] -**swap_space** | **int** | | [optional] [default to 0] -**gpu_mem_util** | **float** | | [optional] [default to 0.95] -**max_num_seqs** | **int** | | [optional] [default to 256] -**offloading_num** | **int** | | [optional] [default to 0] -**use_prefix_caching** | **bool** | | [optional] -**use_chunked_prefill** | **bool** | | [optional] -**chunked_prefill_size** | **int** | | [optional] -**eager_execution** | **bool** | | [optional] -**num_scheduler_steps** | **int** | | [optional] -**use_flashinfer** | **bool** | | [optional] [default to False] -**max_model_len** | **int** | | [optional] -**dtype** | **str** | | [optional] [default to 'auto'] -**tokenizer** | **str** | | [optional] -**spec_proposer** | **str** | | [optional] -**spec_draft_model** | **str** | | [optional] -**spec_tokens** | **int** | | [optional] -**spec_prompt_lookup_min** | **int** | | [optional] -**spec_prompt_lookup_max** | **int** | | [optional] -**seed** | **int** | | [optional] [default to 0] - -## Example - -```python -from platform_api_python_client.models.c_serve_recipe import CServeRecipe - -# TODO update the JSON string below -json = "{}" -# create an instance of CServeRecipe from a JSON string -c_serve_recipe_instance = CServeRecipe.from_json(json) -# print the JSON string representation of the object -print(CServeRecipe.to_json()) - -# convert the object into a dict -c_serve_recipe_dict = c_serve_recipe_instance.to_dict() -# create an instance of CServeRecipe from a dict -c_serve_recipe_from_dict = CServeRecipe.from_dict(c_serve_recipe_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateCServeDeploymentRequest.md b/docs/CreateCServeDeploymentRequest.md deleted file mode 100644 index ae0f73e..0000000 --- a/docs/CreateCServeDeploymentRequest.md +++ /dev/null @@ -1,38 +0,0 @@ -# CreateCServeDeploymentRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**cluster_id** | **int** | | -**hardware_instance_id** | **int** | | -**recipe** | [**CServeRecipe**](CServeRecipe.md) | | -**hf_token** | **str** | | [optional] -**endpoint_certificate_authority** | **str** | | [optional] -**min_scale** | **int** | | -**max_scale** | **int** | | -**concurrency** | **int** | | [optional] -**env_vars** | **Dict[str, str]** | | [optional] - -## Example - -```python -from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateCServeDeploymentRequest from a JSON string -create_c_serve_deployment_request_instance = CreateCServeDeploymentRequest.from_json(json) -# print the JSON string representation of the object -print(CreateCServeDeploymentRequest.to_json()) - -# convert the object into a dict -create_c_serve_deployment_request_dict = create_c_serve_deployment_request_instance.to_dict() -# create an instance of CreateCServeDeploymentRequest from a dict -create_c_serve_deployment_request_from_dict = CreateCServeDeploymentRequest.from_dict(create_c_serve_deployment_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateCServeDeploymentResponse.md b/docs/CreateCServeDeploymentResponse.md deleted file mode 100644 index 4d5de2e..0000000 --- a/docs/CreateCServeDeploymentResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# CreateCServeDeploymentResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**created_at** | **datetime** | | -**endpoint_url** | **str** | | - -## Example - -```python -from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateCServeDeploymentResponse from a JSON string -create_c_serve_deployment_response_instance = CreateCServeDeploymentResponse.from_json(json) -# print the JSON string representation of the object -print(CreateCServeDeploymentResponse.to_json()) - -# convert the object into a dict -create_c_serve_deployment_response_dict = create_c_serve_deployment_response_instance.to_dict() -# create an instance of CreateCServeDeploymentResponse from a dict -create_c_serve_deployment_response_from_dict = CreateCServeDeploymentResponse.from_dict(create_c_serve_deployment_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EXTERNALApi.md b/docs/EXTERNALApi.md index d6c1328..c80ca09 100644 --- a/docs/EXTERNALApi.md +++ b/docs/EXTERNALApi.md @@ -7,7 +7,6 @@ Method | HTTP request | Description [**create_api_key_credentials_api_key_post**](EXTERNALApi.md#create_api_key_credentials_api_key_post) | **POST** /credentials/api-key | Create Api Key [**create_checkout_payments_checkout_post**](EXTERNALApi.md#create_checkout_payments_checkout_post) | **POST** /payments/checkout | Create Checkout [**create_compute_deployment_deployments_compute_post**](EXTERNALApi.md#create_compute_deployment_deployments_compute_post) | **POST** /deployments/compute | Create Compute Deployment -[**create_cserve_deployment_deployments_cserve_post**](EXTERNALApi.md#create_cserve_deployment_deployments_cserve_post) | **POST** /deployments/cserve | Create Cserve Deployment [**create_cserve_v2_deployment_deployments_cserve_v2_post**](EXTERNALApi.md#create_cserve_v2_deployment_deployments_cserve_v2_post) | **POST** /deployments/cserve_v2 | Create Cserve V2 Deployment [**create_inference_deployment_deployments_inference_post**](EXTERNALApi.md#create_inference_deployment_deployments_inference_post) | **POST** /deployments/inference | Create Inference Deployment [**create_rag_deployment_deployments_rag_post**](EXTERNALApi.md#create_rag_deployment_deployments_rag_post) | **POST** /deployments/rag | Create Rag Deployment @@ -24,7 +23,6 @@ Method | HTTP request | Description [**get_clusters_clusters_get**](EXTERNALApi.md#get_clusters_clusters_get) | **GET** /clusters | Get Clusters [**get_compute_deployment_deployments_compute_deployment_id_get**](EXTERNALApi.md#get_compute_deployment_deployments_compute_deployment_id_get) | **GET** /deployments/compute/{deployment_id} | Get Compute Deployment [**get_credits_credits_get**](EXTERNALApi.md#get_credits_credits_get) | **GET** /credits | Get Credits -[**get_cserve_deployment_deployments_cserve_deployment_id_get**](EXTERNALApi.md#get_cserve_deployment_deployments_cserve_deployment_id_get) | **GET** /deployments/cserve/{deployment_id} | Get Cserve Deployment [**get_cserve_recipe_deployments_cserve_recipes_get**](EXTERNALApi.md#get_cserve_recipe_deployments_cserve_recipes_get) | **GET** /deployments/cserve/recipes | Get Cserve Recipe [**get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get**](EXTERNALApi.md#get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get) | **GET** /deployments/cserve_v2/{deployment_id} | Get Cserve V2 Deployment [**get_deployment_logs_deployments_logs_deployment_id_get**](EXTERNALApi.md#get_deployment_logs_deployments_logs_deployment_id_get) | **GET** /deployments/logs/{deployment_id} | Get Deployment Logs @@ -283,84 +281,6 @@ Name | Type | Description | Notes [[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) -# **create_cserve_deployment_deployments_cserve_post** -> CreateCServeDeploymentResponse create_cserve_deployment_deployments_cserve_post(create_c_serve_deployment_request) - -Create Cserve Deployment - -### Example - -* Bearer Authentication (HTTPBearer): - -```python -import platform_api_python_client -from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest -from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse -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) - create_c_serve_deployment_request = platform_api_python_client.CreateCServeDeploymentRequest() # CreateCServeDeploymentRequest | - - try: - # Create Cserve Deployment - api_response = api_instance.create_cserve_deployment_deployments_cserve_post(create_c_serve_deployment_request) - print("The response of EXTERNALApi->create_cserve_deployment_deployments_cserve_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EXTERNALApi->create_cserve_deployment_deployments_cserve_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_c_serve_deployment_request** | [**CreateCServeDeploymentRequest**](CreateCServeDeploymentRequest.md)| | - -### Return type - -[**CreateCServeDeploymentResponse**](CreateCServeDeploymentResponse.md) - -### Authorization - -[HTTPBearer](../README.md#HTTPBearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **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) - # **create_cserve_v2_deployment_deployments_cserve_v2_post** > CreateCServeV2DeploymentResponse create_cserve_v2_deployment_deployments_cserve_v2_post(create_c_serve_v2_deployment_request) @@ -1579,83 +1499,6 @@ This endpoint does not need any parameter. [[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) -# **get_cserve_deployment_deployments_cserve_deployment_id_get** -> GetCServeDeploymentResponse get_cserve_deployment_deployments_cserve_deployment_id_get(deployment_id) - -Get Cserve Deployment - -### Example - -* Bearer Authentication (HTTPBearer): - -```python -import platform_api_python_client -from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse -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) - deployment_id = 56 # int | - - try: - # Get Cserve Deployment - api_response = api_instance.get_cserve_deployment_deployments_cserve_deployment_id_get(deployment_id) - print("The response of EXTERNALApi->get_cserve_deployment_deployments_cserve_deployment_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EXTERNALApi->get_cserve_deployment_deployments_cserve_deployment_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **deployment_id** | **int**| | - -### Return type - -[**GetCServeDeploymentResponse**](GetCServeDeploymentResponse.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) - # **get_cserve_recipe_deployments_cserve_recipes_get** > ListCServeRecipeResponse get_cserve_recipe_deployments_cserve_recipes_get(model=model, hf_token=hf_token) diff --git a/docs/GetCServeDeploymentResponse.md b/docs/GetCServeDeploymentResponse.md deleted file mode 100644 index fd0e924..0000000 --- a/docs/GetCServeDeploymentResponse.md +++ /dev/null @@ -1,67 +0,0 @@ -# GetCServeDeploymentResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**model** | **str** | | -**revision** | **str** | | [optional] -**is_embedding_model** | **bool** | | [optional] [default to False] -**tensor_parallel_size** | **int** | | -**pipeline_parallel_size** | **int** | | -**block_size** | **int** | | [optional] [default to 32] -**swap_space** | **int** | | [optional] [default to 0] -**gpu_mem_util** | **float** | | [optional] [default to 0.95] -**max_num_seqs** | **int** | | [optional] [default to 256] -**offloading_num** | **int** | | [optional] [default to 0] -**use_prefix_caching** | **bool** | | [optional] -**use_chunked_prefill** | **bool** | | [optional] -**chunked_prefill_size** | **int** | | [optional] -**eager_execution** | **bool** | | [optional] -**num_scheduler_steps** | **int** | | [optional] -**use_flashinfer** | **bool** | | [optional] [default to False] -**max_model_len** | **int** | | [optional] -**dtype** | **str** | | [optional] [default to 'auto'] -**tokenizer** | **str** | | [optional] -**spec_proposer** | **str** | | [optional] -**spec_draft_model** | **str** | | [optional] -**spec_tokens** | **int** | | [optional] -**spec_prompt_lookup_min** | **int** | | [optional] -**spec_prompt_lookup_max** | **int** | | [optional] -**seed** | **int** | | [optional] [default to 0] -**cluster_id** | **int** | | -**id** | **int** | | -**name** | **str** | | -**endpoint_url** | **str** | | -**image_url** | **str** | | [optional] -**type** | [**DeploymentType**](DeploymentType.md) | | -**status** | [**DeploymentStatus**](DeploymentStatus.md) | | -**created_at** | **datetime** | | -**hardware_instance_id** | **int** | | -**min_scale** | **int** | | -**max_scale** | **int** | | -**endpoint_certificate_authority** | **str** | | [optional] -**concurrency** | **int** | | [optional] -**env_vars** | **Dict[str, str]** | | [optional] - -## Example - -```python -from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of GetCServeDeploymentResponse from a JSON string -get_c_serve_deployment_response_instance = GetCServeDeploymentResponse.from_json(json) -# print the JSON string representation of the object -print(GetCServeDeploymentResponse.to_json()) - -# convert the object into a dict -get_c_serve_deployment_response_dict = get_c_serve_deployment_response_instance.to_dict() -# create an instance of GetCServeDeploymentResponse from a dict -get_c_serve_deployment_response_from_dict = GetCServeDeploymentResponse.from_dict(get_c_serve_deployment_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index 0c1e15c..4cd7be7 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "4.0.9" +__version__ = "4.0.10" # import apis into sdk package from platform_api_python_client.api.external_api import EXTERNALApi @@ -33,12 +33,9 @@ # import models into sdk package from platform_api_python_client.models.api_key_request import APIKeyRequest from platform_api_python_client.models.api_key_response import APIKeyResponse -from platform_api_python_client.models.c_serve_recipe import CServeRecipe from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe -from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest -from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse from platform_api_python_client.models.create_c_serve_v2_deployment_request import CreateCServeV2DeploymentRequest from platform_api_python_client.models.create_c_serve_v2_deployment_response import CreateCServeV2DeploymentResponse from platform_api_python_client.models.create_checkout_request import CreateCheckoutRequest @@ -60,7 +57,6 @@ from platform_api_python_client.models.deployment_type import DeploymentType from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue from platform_api_python_client.models.get_autocharge_preferences_response import GetAutochargePreferencesResponse -from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse from platform_api_python_client.models.get_cluster_response import GetClusterResponse from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse diff --git a/platform_api_python_client/api/external_api.py b/platform_api_python_client/api/external_api.py index e2517df..86e1834 100644 --- a/platform_api_python_client/api/external_api.py +++ b/platform_api_python_client/api/external_api.py @@ -21,8 +21,6 @@ from typing import Any, Optional, Tuple, Union from platform_api_python_client.models.api_key_request import APIKeyRequest from platform_api_python_client.models.api_key_response import APIKeyResponse -from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest -from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse from platform_api_python_client.models.create_c_serve_v2_deployment_request import CreateCServeV2DeploymentRequest from platform_api_python_client.models.create_c_serve_v2_deployment_response import CreateCServeV2DeploymentResponse from platform_api_python_client.models.create_checkout_request import CreateCheckoutRequest @@ -41,7 +39,6 @@ from platform_api_python_client.models.deployment_status_response import DeploymentStatusResponse from platform_api_python_client.models.deployment_type import DeploymentType from platform_api_python_client.models.get_autocharge_preferences_response import GetAutochargePreferencesResponse -from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse @@ -907,280 +904,6 @@ def _create_compute_deployment_deployments_compute_post_serialize( - @validate_call - def create_cserve_deployment_deployments_cserve_post( - self, - create_c_serve_deployment_request: CreateCServeDeploymentRequest, - _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, - ) -> CreateCServeDeploymentResponse: - """Create Cserve Deployment - - - :param create_c_serve_deployment_request: (required) - :type create_c_serve_deployment_request: CreateCServeDeploymentRequest - :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._create_cserve_deployment_deployments_cserve_post_serialize( - create_c_serve_deployment_request=create_c_serve_deployment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateCServeDeploymentResponse", - '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 create_cserve_deployment_deployments_cserve_post_with_http_info( - self, - create_c_serve_deployment_request: CreateCServeDeploymentRequest, - _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[CreateCServeDeploymentResponse]: - """Create Cserve Deployment - - - :param create_c_serve_deployment_request: (required) - :type create_c_serve_deployment_request: CreateCServeDeploymentRequest - :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._create_cserve_deployment_deployments_cserve_post_serialize( - create_c_serve_deployment_request=create_c_serve_deployment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateCServeDeploymentResponse", - '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 create_cserve_deployment_deployments_cserve_post_without_preload_content( - self, - create_c_serve_deployment_request: CreateCServeDeploymentRequest, - _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: - """Create Cserve Deployment - - - :param create_c_serve_deployment_request: (required) - :type create_c_serve_deployment_request: CreateCServeDeploymentRequest - :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._create_cserve_deployment_deployments_cserve_post_serialize( - create_c_serve_deployment_request=create_c_serve_deployment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateCServeDeploymentResponse", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_cserve_deployment_deployments_cserve_post_serialize( - self, - create_c_serve_deployment_request, - _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 - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if create_c_serve_deployment_request is not None: - _body_params = create_c_serve_deployment_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'HTTPBearer' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/deployments/cserve', - 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 create_cserve_v2_deployment_deployments_cserve_v2_post( self, @@ -5410,267 +5133,6 @@ def _get_credits_credits_get_serialize( - @validate_call - def get_cserve_deployment_deployments_cserve_deployment_id_get( - self, - deployment_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, - ) -> GetCServeDeploymentResponse: - """Get Cserve Deployment - - - :param deployment_id: (required) - :type deployment_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._get_cserve_deployment_deployments_cserve_deployment_id_get_serialize( - deployment_id=deployment_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetCServeDeploymentResponse", - '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 get_cserve_deployment_deployments_cserve_deployment_id_get_with_http_info( - self, - deployment_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[GetCServeDeploymentResponse]: - """Get Cserve Deployment - - - :param deployment_id: (required) - :type deployment_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._get_cserve_deployment_deployments_cserve_deployment_id_get_serialize( - deployment_id=deployment_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetCServeDeploymentResponse", - '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 get_cserve_deployment_deployments_cserve_deployment_id_get_without_preload_content( - self, - deployment_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: - """Get Cserve Deployment - - - :param deployment_id: (required) - :type deployment_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._get_cserve_deployment_deployments_cserve_deployment_id_get_serialize( - deployment_id=deployment_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetCServeDeploymentResponse", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_cserve_deployment_deployments_cserve_deployment_id_get_serialize( - self, - deployment_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 deployment_id is not None: - _path_params['deployment_id'] = deployment_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='GET', - resource_path='/deployments/cserve/{deployment_id}', - 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 get_cserve_recipe_deployments_cserve_recipes_get( self, diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index 075e79d..a818d4f 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.0.9/python' + self.user_agent = 'OpenAPI-Generator/4.0.10/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 7a6c431..fcd6799 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.0.9".\ + "SDK Package Version: 4.0.10".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/platform_api_python_client/models/__init__.py b/platform_api_python_client/models/__init__.py index da86d49..61a75bc 100644 --- a/platform_api_python_client/models/__init__.py +++ b/platform_api_python_client/models/__init__.py @@ -16,12 +16,9 @@ # import models into model package from platform_api_python_client.models.api_key_request import APIKeyRequest from platform_api_python_client.models.api_key_response import APIKeyResponse -from platform_api_python_client.models.c_serve_recipe import CServeRecipe from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe -from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest -from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse from platform_api_python_client.models.create_c_serve_v2_deployment_request import CreateCServeV2DeploymentRequest from platform_api_python_client.models.create_c_serve_v2_deployment_response import CreateCServeV2DeploymentResponse from platform_api_python_client.models.create_checkout_request import CreateCheckoutRequest @@ -43,7 +40,6 @@ from platform_api_python_client.models.deployment_type import DeploymentType from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue from platform_api_python_client.models.get_autocharge_preferences_response import GetAutochargePreferencesResponse -from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse from platform_api_python_client.models.get_cluster_response import GetClusterResponse from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse diff --git a/platform_api_python_client/models/c_serve_recipe.py b/platform_api_python_client/models/c_serve_recipe.py deleted file mode 100644 index 14ed15e..0000000 --- a/platform_api_python_client/models/c_serve_recipe.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Platform External API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class CServeRecipe(BaseModel): - """ - Base class for deployment planner - """ # noqa: E501 - model: StrictStr - revision: Optional[StrictStr] = None - is_embedding_model: Optional[StrictBool] = False - tensor_parallel_size: StrictInt - pipeline_parallel_size: StrictInt - block_size: Optional[StrictInt] = 32 - swap_space: Optional[Annotated[int, Field(strict=True, ge=0)]] = 0 - gpu_mem_util: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = 0.95 - max_num_seqs: Optional[StrictInt] = 256 - offloading_num: Optional[StrictInt] = 0 - use_prefix_caching: Optional[StrictBool] = None - use_chunked_prefill: Optional[StrictBool] = None - chunked_prefill_size: Optional[StrictInt] = None - eager_execution: Optional[StrictBool] = None - num_scheduler_steps: Optional[StrictInt] = None - use_flashinfer: Optional[StrictBool] = False - max_model_len: Optional[Annotated[int, Field(strict=True, ge=128)]] = None - dtype: Optional[StrictStr] = 'auto' - tokenizer: Optional[StrictStr] = None - spec_proposer: Optional[StrictStr] = None - spec_draft_model: Optional[StrictStr] = None - spec_tokens: Optional[StrictInt] = None - spec_prompt_lookup_min: Optional[Annotated[int, Field(strict=True, ge=1)]] = None - spec_prompt_lookup_max: Optional[Annotated[int, Field(strict=True, ge=1)]] = None - seed: Optional[StrictInt] = 0 - __properties: ClassVar[List[str]] = ["model", "revision", "is_embedding_model", "tensor_parallel_size", "pipeline_parallel_size", "block_size", "swap_space", "gpu_mem_util", "max_num_seqs", "offloading_num", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "eager_execution", "num_scheduler_steps", "use_flashinfer", "max_model_len", "dtype", "tokenizer", "spec_proposer", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_min", "spec_prompt_lookup_max", "seed"] - - @field_validator('block_size') - def block_size_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set([16, 32]): - raise ValueError("must be one of enum values (16, 32)") - return value - - @field_validator('dtype') - def dtype_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['auto', 'float16', 'float32', 'bfloat16']): - raise ValueError("must be one of enum values ('auto', 'float16', 'float32', 'bfloat16')") - return value - - @field_validator('spec_proposer') - def spec_proposer_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['draft', 'prompt_lookup']): - raise ValueError("must be one of enum values ('draft', 'prompt_lookup')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CServeRecipe from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if revision (nullable) is None - # and model_fields_set contains the field - if self.revision is None and "revision" in self.model_fields_set: - _dict['revision'] = None - - # set to None if use_prefix_caching (nullable) is None - # and model_fields_set contains the field - if self.use_prefix_caching is None and "use_prefix_caching" in self.model_fields_set: - _dict['use_prefix_caching'] = None - - # set to None if use_chunked_prefill (nullable) is None - # and model_fields_set contains the field - if self.use_chunked_prefill is None and "use_chunked_prefill" in self.model_fields_set: - _dict['use_chunked_prefill'] = None - - # set to None if chunked_prefill_size (nullable) is None - # and model_fields_set contains the field - if self.chunked_prefill_size is None and "chunked_prefill_size" in self.model_fields_set: - _dict['chunked_prefill_size'] = None - - # set to None if eager_execution (nullable) is None - # and model_fields_set contains the field - if self.eager_execution is None and "eager_execution" in self.model_fields_set: - _dict['eager_execution'] = None - - # set to None if num_scheduler_steps (nullable) is None - # and model_fields_set contains the field - if self.num_scheduler_steps is None and "num_scheduler_steps" in self.model_fields_set: - _dict['num_scheduler_steps'] = None - - # set to None if max_model_len (nullable) is None - # and model_fields_set contains the field - if self.max_model_len is None and "max_model_len" in self.model_fields_set: - _dict['max_model_len'] = None - - # set to None if tokenizer (nullable) is None - # and model_fields_set contains the field - if self.tokenizer is None and "tokenizer" in self.model_fields_set: - _dict['tokenizer'] = None - - # set to None if spec_proposer (nullable) is None - # and model_fields_set contains the field - if self.spec_proposer is None and "spec_proposer" in self.model_fields_set: - _dict['spec_proposer'] = None - - # set to None if spec_draft_model (nullable) is None - # and model_fields_set contains the field - if self.spec_draft_model is None and "spec_draft_model" in self.model_fields_set: - _dict['spec_draft_model'] = None - - # set to None if spec_tokens (nullable) is None - # and model_fields_set contains the field - if self.spec_tokens is None and "spec_tokens" in self.model_fields_set: - _dict['spec_tokens'] = None - - # set to None if spec_prompt_lookup_min (nullable) is None - # and model_fields_set contains the field - if self.spec_prompt_lookup_min is None and "spec_prompt_lookup_min" in self.model_fields_set: - _dict['spec_prompt_lookup_min'] = None - - # set to None if spec_prompt_lookup_max (nullable) is None - # and model_fields_set contains the field - if self.spec_prompt_lookup_max is None and "spec_prompt_lookup_max" in self.model_fields_set: - _dict['spec_prompt_lookup_max'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CServeRecipe from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "model": obj.get("model"), - "revision": obj.get("revision"), - "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False, - "tensor_parallel_size": obj.get("tensor_parallel_size"), - "pipeline_parallel_size": obj.get("pipeline_parallel_size"), - "block_size": obj.get("block_size") if obj.get("block_size") is not None else 32, - "swap_space": obj.get("swap_space") if obj.get("swap_space") is not None else 0, - "gpu_mem_util": obj.get("gpu_mem_util") if obj.get("gpu_mem_util") is not None else 0.95, - "max_num_seqs": obj.get("max_num_seqs") if obj.get("max_num_seqs") is not None else 256, - "offloading_num": obj.get("offloading_num") if obj.get("offloading_num") is not None else 0, - "use_prefix_caching": obj.get("use_prefix_caching"), - "use_chunked_prefill": obj.get("use_chunked_prefill"), - "chunked_prefill_size": obj.get("chunked_prefill_size"), - "eager_execution": obj.get("eager_execution"), - "num_scheduler_steps": obj.get("num_scheduler_steps"), - "use_flashinfer": obj.get("use_flashinfer") if obj.get("use_flashinfer") is not None else False, - "max_model_len": obj.get("max_model_len"), - "dtype": obj.get("dtype") if obj.get("dtype") is not None else 'auto', - "tokenizer": obj.get("tokenizer"), - "spec_proposer": obj.get("spec_proposer"), - "spec_draft_model": obj.get("spec_draft_model"), - "spec_tokens": obj.get("spec_tokens"), - "spec_prompt_lookup_min": obj.get("spec_prompt_lookup_min"), - "spec_prompt_lookup_max": obj.get("spec_prompt_lookup_max"), - "seed": obj.get("seed") if obj.get("seed") is not None else 0 - }) - return _obj - - diff --git a/platform_api_python_client/models/create_c_serve_deployment_request.py b/platform_api_python_client/models/create_c_serve_deployment_request.py deleted file mode 100644 index 02d643f..0000000 --- a/platform_api_python_client/models/create_c_serve_deployment_request.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Platform External API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from platform_api_python_client.models.c_serve_recipe import CServeRecipe -from typing import Optional, Set -from typing_extensions import Self - -class CreateCServeDeploymentRequest(BaseModel): - """ - CreateCServeDeploymentRequest - """ # noqa: E501 - name: Annotated[str, Field(min_length=1, strict=True, max_length=20)] - cluster_id: StrictInt - hardware_instance_id: StrictInt - recipe: CServeRecipe - hf_token: Optional[StrictStr] = None - endpoint_certificate_authority: Optional[StrictStr] = None - min_scale: StrictInt - max_scale: StrictInt - concurrency: Optional[StrictInt] = None - env_vars: Optional[Dict[str, StrictStr]] = None - __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "recipe", "hf_token", "endpoint_certificate_authority", "min_scale", "max_scale", "concurrency", "env_vars"] - - @field_validator('name') - def name_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^[a-z][a-z0-9-]*$", value): - raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateCServeDeploymentRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of recipe - if self.recipe: - _dict['recipe'] = self.recipe.to_dict() - # 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 - - # set to None if endpoint_certificate_authority (nullable) is None - # and model_fields_set contains the field - 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 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 - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateCServeDeploymentRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "cluster_id": obj.get("cluster_id"), - "hardware_instance_id": obj.get("hardware_instance_id"), - "recipe": CServeRecipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, - "hf_token": obj.get("hf_token"), - "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), - "min_scale": obj.get("min_scale"), - "max_scale": obj.get("max_scale"), - "concurrency": obj.get("concurrency"), - "env_vars": obj.get("env_vars") - }) - return _obj - - diff --git a/platform_api_python_client/models/create_c_serve_deployment_response.py b/platform_api_python_client/models/create_c_serve_deployment_response.py deleted file mode 100644 index f33fb54..0000000 --- a/platform_api_python_client/models/create_c_serve_deployment_response.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Platform External API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class CreateCServeDeploymentResponse(BaseModel): - """ - CreateCServeDeploymentResponse - """ # noqa: E501 - id: StrictInt - created_at: datetime - endpoint_url: StrictStr - __properties: ClassVar[List[str]] = ["id", "created_at", "endpoint_url"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateCServeDeploymentResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateCServeDeploymentResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "endpoint_url": obj.get("endpoint_url") - }) - return _obj - - diff --git a/platform_api_python_client/models/get_c_serve_deployment_response.py b/platform_api_python_client/models/get_c_serve_deployment_response.py deleted file mode 100644 index cdfffaf..0000000 --- a/platform_api_python_client/models/get_c_serve_deployment_response.py +++ /dev/null @@ -1,277 +0,0 @@ -# coding: utf-8 - -""" - Platform External API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated -from platform_api_python_client.models.deployment_status import DeploymentStatus -from platform_api_python_client.models.deployment_type import DeploymentType -from typing import Optional, Set -from typing_extensions import Self - -class GetCServeDeploymentResponse(BaseModel): - """ - GetCServeDeploymentResponse - """ # noqa: E501 - model: StrictStr - revision: Optional[StrictStr] = None - is_embedding_model: Optional[StrictBool] = False - tensor_parallel_size: StrictInt - pipeline_parallel_size: StrictInt - block_size: Optional[StrictInt] = 32 - swap_space: Optional[Annotated[int, Field(strict=True, ge=0)]] = 0 - gpu_mem_util: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = 0.95 - max_num_seqs: Optional[StrictInt] = 256 - offloading_num: Optional[StrictInt] = 0 - use_prefix_caching: Optional[StrictBool] = None - use_chunked_prefill: Optional[StrictBool] = None - chunked_prefill_size: Optional[StrictInt] = None - eager_execution: Optional[StrictBool] = None - num_scheduler_steps: Optional[StrictInt] = None - use_flashinfer: Optional[StrictBool] = False - max_model_len: Optional[Annotated[int, Field(strict=True, ge=128)]] = None - dtype: Optional[StrictStr] = 'auto' - tokenizer: Optional[StrictStr] = None - spec_proposer: Optional[StrictStr] = None - spec_draft_model: Optional[StrictStr] = None - spec_tokens: Optional[StrictInt] = None - spec_prompt_lookup_min: Optional[Annotated[int, Field(strict=True, ge=1)]] = None - spec_prompt_lookup_max: Optional[Annotated[int, Field(strict=True, ge=1)]] = None - seed: Optional[StrictInt] = 0 - cluster_id: StrictInt - id: StrictInt - name: StrictStr - endpoint_url: StrictStr - image_url: Optional[StrictStr] = None - type: DeploymentType - status: DeploymentStatus - created_at: datetime - hardware_instance_id: StrictInt - min_scale: StrictInt - max_scale: StrictInt - endpoint_certificate_authority: Optional[StrictStr] = None - concurrency: Optional[StrictInt] = None - env_vars: Optional[Dict[str, StrictStr]] = None - __properties: ClassVar[List[str]] = ["model", "revision", "is_embedding_model", "tensor_parallel_size", "pipeline_parallel_size", "block_size", "swap_space", "gpu_mem_util", "max_num_seqs", "offloading_num", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "eager_execution", "num_scheduler_steps", "use_flashinfer", "max_model_len", "dtype", "tokenizer", "spec_proposer", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_min", "spec_prompt_lookup_max", "seed", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] - - @field_validator('block_size') - def block_size_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set([16, 32]): - raise ValueError("must be one of enum values (16, 32)") - return value - - @field_validator('dtype') - def dtype_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['auto', 'float16', 'float32', 'bfloat16']): - raise ValueError("must be one of enum values ('auto', 'float16', 'float32', 'bfloat16')") - return value - - @field_validator('spec_proposer') - def spec_proposer_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['draft', 'prompt_lookup']): - raise ValueError("must be one of enum values ('draft', 'prompt_lookup')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GetCServeDeploymentResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if revision (nullable) is None - # and model_fields_set contains the field - if self.revision is None and "revision" in self.model_fields_set: - _dict['revision'] = None - - # set to None if use_prefix_caching (nullable) is None - # and model_fields_set contains the field - if self.use_prefix_caching is None and "use_prefix_caching" in self.model_fields_set: - _dict['use_prefix_caching'] = None - - # set to None if use_chunked_prefill (nullable) is None - # and model_fields_set contains the field - if self.use_chunked_prefill is None and "use_chunked_prefill" in self.model_fields_set: - _dict['use_chunked_prefill'] = None - - # set to None if chunked_prefill_size (nullable) is None - # and model_fields_set contains the field - if self.chunked_prefill_size is None and "chunked_prefill_size" in self.model_fields_set: - _dict['chunked_prefill_size'] = None - - # set to None if eager_execution (nullable) is None - # and model_fields_set contains the field - if self.eager_execution is None and "eager_execution" in self.model_fields_set: - _dict['eager_execution'] = None - - # set to None if num_scheduler_steps (nullable) is None - # and model_fields_set contains the field - if self.num_scheduler_steps is None and "num_scheduler_steps" in self.model_fields_set: - _dict['num_scheduler_steps'] = None - - # set to None if max_model_len (nullable) is None - # and model_fields_set contains the field - if self.max_model_len is None and "max_model_len" in self.model_fields_set: - _dict['max_model_len'] = None - - # set to None if tokenizer (nullable) is None - # and model_fields_set contains the field - if self.tokenizer is None and "tokenizer" in self.model_fields_set: - _dict['tokenizer'] = None - - # set to None if spec_proposer (nullable) is None - # and model_fields_set contains the field - if self.spec_proposer is None and "spec_proposer" in self.model_fields_set: - _dict['spec_proposer'] = None - - # set to None if spec_draft_model (nullable) is None - # and model_fields_set contains the field - if self.spec_draft_model is None and "spec_draft_model" in self.model_fields_set: - _dict['spec_draft_model'] = None - - # set to None if spec_tokens (nullable) is None - # and model_fields_set contains the field - if self.spec_tokens is None and "spec_tokens" in self.model_fields_set: - _dict['spec_tokens'] = None - - # set to None if spec_prompt_lookup_min (nullable) is None - # and model_fields_set contains the field - if self.spec_prompt_lookup_min is None and "spec_prompt_lookup_min" in self.model_fields_set: - _dict['spec_prompt_lookup_min'] = None - - # set to None if spec_prompt_lookup_max (nullable) is None - # and model_fields_set contains the field - if self.spec_prompt_lookup_max is None and "spec_prompt_lookup_max" in self.model_fields_set: - _dict['spec_prompt_lookup_max'] = None - - # set to None if image_url (nullable) is None - # and model_fields_set contains the field - if self.image_url is None and "image_url" in self.model_fields_set: - _dict['image_url'] = None - - # set to None if endpoint_certificate_authority (nullable) is None - # and model_fields_set contains the field - 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 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 - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetCServeDeploymentResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "model": obj.get("model"), - "revision": obj.get("revision"), - "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False, - "tensor_parallel_size": obj.get("tensor_parallel_size"), - "pipeline_parallel_size": obj.get("pipeline_parallel_size"), - "block_size": obj.get("block_size") if obj.get("block_size") is not None else 32, - "swap_space": obj.get("swap_space") if obj.get("swap_space") is not None else 0, - "gpu_mem_util": obj.get("gpu_mem_util") if obj.get("gpu_mem_util") is not None else 0.95, - "max_num_seqs": obj.get("max_num_seqs") if obj.get("max_num_seqs") is not None else 256, - "offloading_num": obj.get("offloading_num") if obj.get("offloading_num") is not None else 0, - "use_prefix_caching": obj.get("use_prefix_caching"), - "use_chunked_prefill": obj.get("use_chunked_prefill"), - "chunked_prefill_size": obj.get("chunked_prefill_size"), - "eager_execution": obj.get("eager_execution"), - "num_scheduler_steps": obj.get("num_scheduler_steps"), - "use_flashinfer": obj.get("use_flashinfer") if obj.get("use_flashinfer") is not None else False, - "max_model_len": obj.get("max_model_len"), - "dtype": obj.get("dtype") if obj.get("dtype") is not None else 'auto', - "tokenizer": obj.get("tokenizer"), - "spec_proposer": obj.get("spec_proposer"), - "spec_draft_model": obj.get("spec_draft_model"), - "spec_tokens": obj.get("spec_tokens"), - "spec_prompt_lookup_min": obj.get("spec_prompt_lookup_min"), - "spec_prompt_lookup_max": obj.get("spec_prompt_lookup_max"), - "seed": obj.get("seed") if obj.get("seed") is not None else 0, - "cluster_id": obj.get("cluster_id"), - "id": obj.get("id"), - "name": obj.get("name"), - "endpoint_url": obj.get("endpoint_url"), - "image_url": obj.get("image_url"), - "type": obj.get("type"), - "status": obj.get("status"), - "created_at": obj.get("created_at"), - "hardware_instance_id": obj.get("hardware_instance_id"), - "min_scale": obj.get("min_scale"), - "max_scale": obj.get("max_scale"), - "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), - "concurrency": obj.get("concurrency"), - "env_vars": obj.get("env_vars") - }) - return _obj - - diff --git a/pyproject.toml b/pyproject.toml index d77ab8f..e028a76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "platform_api_python_client" -version = "4.0.9" +version = "4.0.10" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index 1228074..3018dc4 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.0.9" +VERSION = "4.0.10" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/test/test_c_serve_recipe.py b/test/test_c_serve_recipe.py deleted file mode 100644 index e7655e1..0000000 --- a/test/test_c_serve_recipe.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - Platform External API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from platform_api_python_client.models.c_serve_recipe import CServeRecipe - -class TestCServeRecipe(unittest.TestCase): - """CServeRecipe unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CServeRecipe: - """Test CServeRecipe - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CServeRecipe` - """ - model = CServeRecipe() - if include_optional: - return CServeRecipe( - model = '', - revision = '', - is_embedding_model = True, - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - block_size = 16, - swap_space = 0.0, - gpu_mem_util = 0.0, - max_num_seqs = 56, - offloading_num = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - eager_execution = True, - num_scheduler_steps = 56, - use_flashinfer = True, - max_model_len = 128.0, - dtype = 'auto', - tokenizer = '', - spec_proposer = 'draft', - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_min = 1.0, - spec_prompt_lookup_max = 1.0, - seed = 56 - ) - else: - return CServeRecipe( - model = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - ) - """ - - def testCServeRecipe(self): - """Test CServeRecipe""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_create_c_serve_deployment_request.py b/test/test_create_c_serve_deployment_request.py deleted file mode 100644 index 76702cb..0000000 --- a/test/test_create_c_serve_deployment_request.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - Platform External API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest - -class TestCreateCServeDeploymentRequest(unittest.TestCase): - """CreateCServeDeploymentRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateCServeDeploymentRequest: - """Test CreateCServeDeploymentRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateCServeDeploymentRequest` - """ - model = CreateCServeDeploymentRequest() - if include_optional: - return CreateCServeDeploymentRequest( - name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', - cluster_id = 56, - hardware_instance_id = 56, - recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( - model = '', - revision = '', - is_embedding_model = True, - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - block_size = 16, - swap_space = 0.0, - gpu_mem_util = 0.0, - max_num_seqs = 56, - offloading_num = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - eager_execution = True, - num_scheduler_steps = 56, - use_flashinfer = True, - max_model_len = 128.0, - dtype = 'auto', - tokenizer = '', - spec_proposer = 'draft', - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_min = 1.0, - spec_prompt_lookup_max = 1.0, - seed = 56, ), - hf_token = '', - endpoint_certificate_authority = '', - min_scale = 56, - max_scale = 56, - concurrency = 56, - env_vars = { - 'key' : '' - } - ) - else: - return CreateCServeDeploymentRequest( - name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', - cluster_id = 56, - hardware_instance_id = 56, - recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( - model = '', - revision = '', - is_embedding_model = True, - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - block_size = 16, - swap_space = 0.0, - gpu_mem_util = 0.0, - max_num_seqs = 56, - offloading_num = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - eager_execution = True, - num_scheduler_steps = 56, - use_flashinfer = True, - max_model_len = 128.0, - dtype = 'auto', - tokenizer = '', - spec_proposer = 'draft', - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_min = 1.0, - spec_prompt_lookup_max = 1.0, - seed = 56, ), - min_scale = 56, - max_scale = 56, - ) - """ - - def testCreateCServeDeploymentRequest(self): - """Test CreateCServeDeploymentRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_create_c_serve_deployment_response.py b/test/test_create_c_serve_deployment_response.py deleted file mode 100644 index e1fe90b..0000000 --- a/test/test_create_c_serve_deployment_response.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Platform External API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse - -class TestCreateCServeDeploymentResponse(unittest.TestCase): - """CreateCServeDeploymentResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateCServeDeploymentResponse: - """Test CreateCServeDeploymentResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateCServeDeploymentResponse` - """ - model = CreateCServeDeploymentResponse() - if include_optional: - return CreateCServeDeploymentResponse( - id = 56, - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - endpoint_url = '' - ) - else: - return CreateCServeDeploymentResponse( - id = 56, - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - endpoint_url = '', - ) - """ - - def testCreateCServeDeploymentResponse(self): - """Test CreateCServeDeploymentResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_external_api.py b/test/test_external_api.py index 2fb9821..49e47cb 100644 --- a/test/test_external_api.py +++ b/test/test_external_api.py @@ -47,13 +47,6 @@ def test_create_compute_deployment_deployments_compute_post(self) -> None: """ pass - def test_create_cserve_deployment_deployments_cserve_post(self) -> None: - """Test case for create_cserve_deployment_deployments_cserve_post - - Create Cserve Deployment - """ - pass - def test_create_cserve_v2_deployment_deployments_cserve_v2_post(self) -> None: """Test case for create_cserve_v2_deployment_deployments_cserve_v2_post @@ -166,13 +159,6 @@ def test_get_credits_credits_get(self) -> None: """ pass - def test_get_cserve_deployment_deployments_cserve_deployment_id_get(self) -> None: - """Test case for get_cserve_deployment_deployments_cserve_deployment_id_get - - Get Cserve Deployment - """ - pass - def test_get_cserve_recipe_deployments_cserve_recipes_get(self) -> None: """Test case for get_cserve_recipe_deployments_cserve_recipes_get diff --git a/test/test_get_c_serve_deployment_response.py b/test/test_get_c_serve_deployment_response.py deleted file mode 100644 index 842040f..0000000 --- a/test/test_get_c_serve_deployment_response.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - Platform External API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from platform_api_python_client.models.get_c_serve_deployment_response import GetCServeDeploymentResponse - -class TestGetCServeDeploymentResponse(unittest.TestCase): - """GetCServeDeploymentResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetCServeDeploymentResponse: - """Test GetCServeDeploymentResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetCServeDeploymentResponse` - """ - model = GetCServeDeploymentResponse() - if include_optional: - return GetCServeDeploymentResponse( - model = '', - revision = '', - is_embedding_model = True, - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - block_size = 16, - swap_space = 0.0, - gpu_mem_util = 0.0, - max_num_seqs = 56, - offloading_num = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - eager_execution = True, - num_scheduler_steps = 56, - use_flashinfer = True, - max_model_len = 128.0, - dtype = 'auto', - tokenizer = '', - spec_proposer = 'draft', - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_min = 1.0, - spec_prompt_lookup_max = 1.0, - seed = 56, - cluster_id = 56, - id = 56, - name = '', - endpoint_url = '', - image_url = '', - type = 'inference', - status = 'active', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - hardware_instance_id = 56, - min_scale = 56, - max_scale = 56, - endpoint_certificate_authority = '', - concurrency = 56, - env_vars = { - 'key' : '' - } - ) - else: - return GetCServeDeploymentResponse( - model = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - cluster_id = 56, - id = 56, - name = '', - endpoint_url = '', - type = 'inference', - status = 'active', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - hardware_instance_id = 56, - min_scale = 56, - max_scale = 56, - ) - """ - - def testGetCServeDeploymentResponse(self): - """Test GetCServeDeploymentResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main()