Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 0.1.0
- Package version: 4.8.3
- Package version: 4.8.4
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

Expand Down
1 change: 1 addition & 0 deletions docs/CreateCServeV2DeploymentRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**name** | **str** | |
**cluster_id** | **int** | |
**hardware_instance_id** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | |
**cserve_version** | **str** | | [optional]
**hf_token** | **str** | | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/CreateCServeV3DeploymentRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**name** | **str** | |
**cluster_id** | **int** | |
**hardware_instance_id** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | |
**cserve_version** | **str** | | [optional]
**hf_token** | **str** | | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/CreateComputeDeploymentRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**name** | **str** | |
**cluster_id** | **int** | |
**hardware_instance_id** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**image_url** | **str** | |
**enable_jupyter** | **bool** | | [optional] [default to False]
**ssh_public_key** | **str** | |
Expand Down
1 change: 1 addition & 0 deletions docs/CreateInferenceDeploymentRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**name** | **str** | |
**cluster_id** | **int** | |
**hardware_instance_id** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**image_url** | **str** | |
**port** | **int** | |
**min_scale** | **int** | |
Expand Down
1 change: 1 addition & 0 deletions docs/CreateInferenceV3DeploymentRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**name** | **str** | |
**cluster_id** | **int** | |
**hardware_instance_id** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**image_url** | **str** | |
**image_pull_secret_credentials** | [**ImagePullSecretCredentials**](ImagePullSecretCredentials.md) | | [optional]
**port** | **int** | |
Expand Down
1 change: 1 addition & 0 deletions docs/CreateRagDeploymentRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**name** | **str** | |
**cluster_id** | **int** | |
**hardware_instance_id** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | |
**cserve_version** | **str** | | [optional]
**hf_token** | **str** | | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/DeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**created_at** | **datetime** | |
**hardware_instance_id** | **int** | |
**revision_number** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | |
**cserve_version** | **str** | | [optional]
**min_replicas** | **int** | |
Expand Down
1 change: 1 addition & 0 deletions docs/GetCServeV2DeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**created_at** | **datetime** | |
**hardware_instance_id** | **int** | |
**revision_number** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | |
**cserve_version** | **str** | | [optional]
**min_scale** | **int** | |
Expand Down
1 change: 1 addition & 0 deletions docs/GetCServeV3DeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**created_at** | **datetime** | |
**hardware_instance_id** | **int** | |
**revision_number** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | |
**cserve_version** | **str** | | [optional]
**min_replicas** | **int** | |
Expand Down
1 change: 1 addition & 0 deletions docs/GetComputeDeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**created_at** | **datetime** | |
**hardware_instance_id** | **int** | |
**revision_number** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**exposed_port** | **int** | |
**ssh_public_key** | **str** | | [optional]
**ssh_password** | **str** | | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/GetDeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**created_at** | **datetime** | |
**hardware_instance_id** | **int** | |
**revision_number** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]

## Example

Expand Down
1 change: 1 addition & 0 deletions docs/GetInferenceDeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**created_at** | **datetime** | |
**hardware_instance_id** | **int** | |
**revision_number** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**container_port** | **int** | |
**min_scale** | **int** | |
**max_scale** | **int** | |
Expand Down
1 change: 1 addition & 0 deletions docs/GetInferenceV3DeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**created_at** | **datetime** | |
**hardware_instance_id** | **int** | |
**revision_number** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**container_port** | **int** | |
**min_replicas** | **int** | |
**max_replicas** | **int** | |
Expand Down
1 change: 1 addition & 0 deletions docs/GetRagDeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**created_at** | **datetime** | |
**hardware_instance_id** | **int** | |
**revision_number** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | |
**cserve_version** | **str** | | [optional]
**llm_model** | **str** | |
Expand Down
2 changes: 1 addition & 1 deletion platform_api_python_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
""" # noqa: E501


__version__ = "4.8.3"
__version__ = "4.8.4"

# import apis into sdk package
from platform_api_python_client.api.external_api import EXTERNALApi
Expand Down
2 changes: 1 addition & 1 deletion platform_api_python_client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.8.3/python'
self.user_agent = 'OpenAPI-Generator/4.8.4/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
2 changes: 1 addition & 1 deletion platform_api_python_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.8.3".\
"SDK Package Version: 4.8.4".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class CreateCServeV2DeploymentRequest(BaseModel):
name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
cluster_id: StrictInt
hardware_instance_id: StrictInt
user_annotations: Optional[Dict[str, StrictStr]] = None
recipe: CServeV2Recipe
cserve_version: Optional[StrictStr] = None
hf_token: Optional[StrictStr] = None
Expand All @@ -41,7 +42,7 @@ class CreateCServeV2DeploymentRequest(BaseModel):
initial_scale: Optional[StrictInt] = None
concurrency: Optional[StrictInt] = None
env_vars: Optional[Dict[str, StrictStr]] = None
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_scale", "max_scale", "initial_scale", "concurrency", "env_vars"]
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_scale", "max_scale", "initial_scale", "concurrency", "env_vars"]

@field_validator('name')
def name_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -92,6 +93,11 @@ def to_dict(self) -> Dict[str, Any]:
# 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 user_annotations (nullable) is None
# and model_fields_set contains the field
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
_dict['user_annotations'] = None

# set to None if cserve_version (nullable) is None
# and model_fields_set contains the field
if self.cserve_version is None and "cserve_version" in self.model_fields_set:
Expand Down Expand Up @@ -137,6 +143,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"name": obj.get("name"),
"cluster_id": obj.get("cluster_id"),
"hardware_instance_id": obj.get("hardware_instance_id"),
"user_annotations": obj.get("user_annotations"),
"recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None,
"cserve_version": obj.get("cserve_version"),
"hf_token": obj.get("hf_token"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class CreateCServeV3DeploymentRequest(BaseModel):
name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
cluster_id: StrictInt
hardware_instance_id: StrictInt
user_annotations: Optional[Dict[str, StrictStr]] = None
recipe: CServeV2Recipe
cserve_version: Optional[StrictStr] = None
hf_token: Optional[StrictStr] = None
Expand All @@ -44,7 +45,7 @@ class CreateCServeV3DeploymentRequest(BaseModel):
concurrency: Optional[StrictInt] = None
env_vars: Optional[Dict[str, StrictStr]] = None
enable_logging: Optional[StrictBool] = True
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "env_vars", "enable_logging"]
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "env_vars", "enable_logging"]

@field_validator('name')
def name_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -105,6 +106,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.max_unavailable is None and "max_unavailable" in self.model_fields_set:
_dict['max_unavailable'] = None

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

# set to None if cserve_version (nullable) is None
# and model_fields_set contains the field
if self.cserve_version is None and "cserve_version" in self.model_fields_set:
Expand Down Expand Up @@ -152,6 +158,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"name": obj.get("name"),
"cluster_id": obj.get("cluster_id"),
"hardware_instance_id": obj.get("hardware_instance_id"),
"user_annotations": obj.get("user_annotations"),
"recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None,
"cserve_version": obj.get("cserve_version"),
"hf_token": obj.get("hf_token"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ class CreateComputeDeploymentRequest(BaseModel):
name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
cluster_id: StrictInt
hardware_instance_id: StrictInt
user_annotations: Optional[Dict[str, StrictStr]] = None
image_url: StrictStr
enable_jupyter: Optional[StrictBool] = False
ssh_public_key: StrictStr
enable_logging: Optional[StrictBool] = False
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "image_url", "enable_jupyter", "ssh_public_key", "enable_logging"]
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "image_url", "enable_jupyter", "ssh_public_key", "enable_logging"]

@field_validator('name')
def name_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -82,6 +83,11 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# set to None if user_annotations (nullable) is None
# and model_fields_set contains the field
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
_dict['user_annotations'] = None

return _dict

@classmethod
Expand All @@ -97,6 +103,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"name": obj.get("name"),
"cluster_id": obj.get("cluster_id"),
"hardware_instance_id": obj.get("hardware_instance_id"),
"user_annotations": obj.get("user_annotations"),
"image_url": obj.get("image_url"),
"enable_jupyter": obj.get("enable_jupyter") if obj.get("enable_jupyter") is not None else False,
"ssh_public_key": obj.get("ssh_public_key"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class CreateInferenceDeploymentRequest(BaseModel):
name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
cluster_id: StrictInt
hardware_instance_id: StrictInt
user_annotations: Optional[Dict[str, StrictStr]] = None
image_url: StrictStr
port: StrictInt
min_scale: StrictInt
Expand All @@ -41,7 +42,7 @@ class CreateInferenceDeploymentRequest(BaseModel):
command: Optional[StrictStr] = None
endpoint_bearer_token: Optional[StrictStr] = None
endpoint_certificate_authority: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "image_url", "port", "min_scale", "max_scale", "initial_scale", "concurrency", "healthcheck", "env_vars", "command", "endpoint_bearer_token", "endpoint_certificate_authority"]
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "image_url", "port", "min_scale", "max_scale", "initial_scale", "concurrency", "healthcheck", "env_vars", "command", "endpoint_bearer_token", "endpoint_certificate_authority"]

@field_validator('name')
def name_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -89,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# set to None if user_annotations (nullable) is None
# and model_fields_set contains the field
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
_dict['user_annotations'] = None

# set to None if initial_scale (nullable) is None
# and model_fields_set contains the field
if self.initial_scale is None and "initial_scale" in self.model_fields_set:
Expand Down Expand Up @@ -139,6 +145,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"name": obj.get("name"),
"cluster_id": obj.get("cluster_id"),
"hardware_instance_id": obj.get("hardware_instance_id"),
"user_annotations": obj.get("user_annotations"),
"image_url": obj.get("image_url"),
"port": obj.get("port"),
"min_scale": obj.get("min_scale"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
cluster_id: StrictInt
hardware_instance_id: StrictInt
user_annotations: Optional[Dict[str, StrictStr]] = None
image_url: StrictStr
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
port: StrictInt
Expand All @@ -48,7 +49,7 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
endpoint_certificate_authority: Optional[StrictStr] = None
backend_protocol: Optional[BackendProtocol] = None
enable_logging: Optional[StrictBool] = False
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "image_url", "image_pull_secret_credentials", "port", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "healthcheck", "env_vars", "command", "endpoint_bearer_token", "endpoint_certificate_authority", "backend_protocol", "enable_logging"]
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "image_url", "image_pull_secret_credentials", "port", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "healthcheck", "env_vars", "command", "endpoint_bearer_token", "endpoint_certificate_authority", "backend_protocol", "enable_logging"]

@field_validator('name')
def name_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -109,6 +110,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.max_unavailable is None and "max_unavailable" in self.model_fields_set:
_dict['max_unavailable'] = None

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

# set to None if image_pull_secret_credentials (nullable) is None
# and model_fields_set contains the field
if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
Expand Down Expand Up @@ -166,6 +172,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"name": obj.get("name"),
"cluster_id": obj.get("cluster_id"),
"hardware_instance_id": obj.get("hardware_instance_id"),
"user_annotations": obj.get("user_annotations"),
"image_url": obj.get("image_url"),
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
"port": obj.get("port"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class CreateRagDeploymentRequest(BaseModel):
name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
cluster_id: StrictInt
hardware_instance_id: StrictInt
user_annotations: Optional[Dict[str, StrictStr]] = None
recipe: CServeV2Recipe
cserve_version: Optional[StrictStr] = None
hf_token: Optional[StrictStr] = None
Expand All @@ -43,7 +44,7 @@ class CreateRagDeploymentRequest(BaseModel):
endpoint_certificate_authority: Optional[StrictStr] = None
concurrency: Optional[StrictInt] = None
env_vars: Optional[Dict[str, StrictStr]] = None
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "recipe", "cserve_version", "hf_token", "llm_model", "centml_api_key", "min_scale", "max_scale", "initial_scale", "endpoint_bearer_token", "endpoint_certificate_authority", "concurrency", "env_vars"]
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "recipe", "cserve_version", "hf_token", "llm_model", "centml_api_key", "min_scale", "max_scale", "initial_scale", "endpoint_bearer_token", "endpoint_certificate_authority", "concurrency", "env_vars"]

@field_validator('name')
def name_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -94,6 +95,11 @@ def to_dict(self) -> Dict[str, Any]:
# 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 user_annotations (nullable) is None
# and model_fields_set contains the field
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
_dict['user_annotations'] = None

# set to None if cserve_version (nullable) is None
# and model_fields_set contains the field
if self.cserve_version is None and "cserve_version" in self.model_fields_set:
Expand Down Expand Up @@ -139,6 +145,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"name": obj.get("name"),
"cluster_id": obj.get("cluster_id"),
"hardware_instance_id": obj.get("hardware_instance_id"),
"user_annotations": obj.get("user_annotations"),
"recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None,
"cserve_version": obj.get("cserve_version"),
"hf_token": obj.get("hf_token"),
Expand Down
Loading
Loading