Skip to content
Closed
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.15.0
- Package version: 4.16.0
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

Expand Down
1 change: 1 addition & 0 deletions docs/CreateCServeV3DeploymentRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Name | Type | Description | Notes
**cluster_id** | **int** | |
**hardware_instance_id** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**chart_revision** | **str** | | [optional]
**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | |
**cserve_version** | **str** | | [optional]
**hf_token** | **str** | | [optional]
Expand Down
3 changes: 2 additions & 1 deletion docs/CreateComputeDeploymentRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Name | Type | Description | Notes
**cluster_id** | **int** | |
**hardware_instance_id** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**chart_revision** | **str** | | [optional]
**image_url** | **str** | |
**enable_jupyter** | **bool** | | [optional] [default to False]
**image_pull_secret_credentials** | [**ImagePullSecretCredentials**](ImagePullSecretCredentials.md) | | [optional]
**ssh_public_key** | **str** | |
**enable_logging** | **bool** | | [optional] [default to False]

Expand Down
1 change: 0 additions & 1 deletion docs/CreateComputeDeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Name | Type | Description | Notes
**created_at** | **datetime** | |
**endpoint_url** | **str** | |
**port** | **int** | |
**jupyter_token** | **str** | | [optional]

## Example

Expand Down
1 change: 1 addition & 0 deletions docs/CreateInferenceV3DeploymentRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Name | Type | Description | Notes
**cluster_id** | **int** | |
**hardware_instance_id** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**chart_revision** | **str** | | [optional]
**image_url** | **str** | |
**image_pull_secret_credentials** | [**ImagePullSecretCredentials**](ImagePullSecretCredentials.md) | | [optional]
**port** | **int** | |
Expand Down
1 change: 1 addition & 0 deletions docs/CreateJobDeploymentRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**cluster_id** | **int** | |
**hardware_instance_id** | **int** | |
**user_annotations** | **Dict[str, str]** | | [optional]
**chart_revision** | **str** | | [optional]
**image_url** | **str** | |
**image_pull_secret_credentials** | [**ImagePullSecretCredentials**](ImagePullSecretCredentials.md) | | [optional]
**env_vars** | **Dict[str, str]** | | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/GetComputeDeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Name | Type | Description | Notes
**ssh_public_key** | **str** | | [optional]
**ssh_password** | **str** | | [optional]
**env_vars** | **Dict[str, str]** | | [optional]
**image_pull_secret_credentials** | [**ImagePullSecretCredentials**](ImagePullSecretCredentials.md) | | [optional]
**enable_logging** | **bool** | | [optional] [default to True]

## Example
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.15.0"
__version__ = "4.16.0"

# 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.15.0/python'
self.user_agent = 'OpenAPI-Generator/4.16.0/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.15.0".\
"SDK Package Version: 4.16.0".\
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 @@ -34,6 +34,7 @@ class CreateCServeV3DeploymentRequest(BaseModel):
cluster_id: StrictInt
hardware_instance_id: StrictInt
user_annotations: Optional[Dict[str, StrictStr]] = None
chart_revision: Optional[StrictStr] = None
recipe: CServeV2Recipe
cserve_version: Optional[StrictStr] = None
hf_token: Optional[StrictStr] = None
Expand All @@ -48,7 +49,7 @@ class CreateCServeV3DeploymentRequest(BaseModel):
enable_logging: Optional[StrictBool] = True
enable_node_model_cache: Optional[StrictBool] = False
session_affinity: Optional[StrictBool] = Field(default=False, description="Enable best-effort sticky routing via the `X-Session-Id` request header. Requests carrying the same header value land on the same pod, improving KV cache reuse for agentic workloads. Requests without the header are routed at random. Affinity is NOT durable: scaling, rollouts, restarts, or readiness-probe transitions will remap sessions to different pods. Do not use for irreplaceable in-pod state.")
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "cooldown_period", "env_vars", "enable_logging", "enable_node_model_cache", "session_affinity"]
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "cooldown_period", "env_vars", "enable_logging", "enable_node_model_cache", "session_affinity"]

@field_validator('name')
def name_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -167,6 +168,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"cluster_id": obj.get("cluster_id"),
"hardware_instance_id": obj.get("hardware_instance_id"),
"user_annotations": obj.get("user_annotations"),
"chart_revision": obj.get("chart_revision"),
"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 @@ -20,6 +20,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -31,11 +32,12 @@ class CreateComputeDeploymentRequest(BaseModel):
cluster_id: StrictInt
hardware_instance_id: StrictInt
user_annotations: Optional[Dict[str, StrictStr]] = None
chart_revision: Optional[StrictStr] = None
image_url: StrictStr
enable_jupyter: Optional[StrictBool] = False
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
ssh_public_key: StrictStr
enable_logging: Optional[StrictBool] = False
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "image_url", "enable_jupyter", "ssh_public_key", "enable_logging"]
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "image_url", "image_pull_secret_credentials", "ssh_public_key", "enable_logging"]

@field_validator('name')
def name_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -83,11 +85,19 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
if self.image_pull_secret_credentials:
_dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
# set to None if 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:
_dict['image_pull_secret_credentials'] = None

return _dict

@classmethod
Expand All @@ -104,8 +114,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"cluster_id": obj.get("cluster_id"),
"hardware_instance_id": obj.get("hardware_instance_id"),
"user_annotations": obj.get("user_annotations"),
"chart_revision": obj.get("chart_revision"),
"image_url": obj.get("image_url"),
"enable_jupyter": obj.get("enable_jupyter") if obj.get("enable_jupyter") is not None else False,
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
"ssh_public_key": obj.get("ssh_public_key"),
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else False
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from datetime import datetime
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -31,8 +31,7 @@ class CreateComputeDeploymentResponse(BaseModel):
created_at: datetime
endpoint_url: StrictStr
port: StrictInt
jupyter_token: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["id", "created_at", "endpoint_url", "port", "jupyter_token"]
__properties: ClassVar[List[str]] = ["id", "created_at", "endpoint_url", "port"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -73,11 +72,6 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# set to None if jupyter_token (nullable) is None
# and model_fields_set contains the field
if self.jupyter_token is None and "jupyter_token" in self.model_fields_set:
_dict['jupyter_token'] = None

return _dict

@classmethod
Expand All @@ -93,8 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"id": obj.get("id"),
"created_at": obj.get("created_at"),
"endpoint_url": obj.get("endpoint_url"),
"port": obj.get("port"),
"jupyter_token": obj.get("jupyter_token")
"port": obj.get("port")
})
return _obj

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
cluster_id: StrictInt
hardware_instance_id: StrictInt
user_annotations: Optional[Dict[str, StrictStr]] = None
chart_revision: Optional[StrictStr] = None
image_url: StrictStr
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
port: Annotated[int, Field(le=65535, strict=True, ge=1)]
Expand All @@ -57,7 +58,7 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
session_affinity: Optional[StrictBool] = Field(default=False, description="Enable best-effort sticky routing via the `X-Session-Id` request header. Requests carrying the same header value land on the same pod, improving KV cache reuse for agentic workloads. Requests without the header are routed at random. Affinity is NOT durable: scaling, rollouts, restarts, or readiness-probe transitions will remap sessions to different pods. Do not use for irreplaceable in-pod state.")
config_file: Optional[ConfigFileMount] = None
metrics: Optional[MetricsConfig] = None
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "image_url", "image_pull_secret_credentials", "port", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "cooldown_period", "healthcheck", "env_vars", "command", "endpoint_bearer_token", "endpoint_certificate_authority", "hf_token", "backend_protocol", "enable_logging", "enable_node_model_cache", "session_affinity", "config_file", "metrics"]
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "image_url", "image_pull_secret_credentials", "port", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "cooldown_period", "healthcheck", "env_vars", "command", "endpoint_bearer_token", "endpoint_certificate_authority", "hf_token", "backend_protocol", "enable_logging", "enable_node_model_cache", "session_affinity", "config_file", "metrics"]

@field_validator('name')
def name_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -207,6 +208,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"cluster_id": obj.get("cluster_id"),
"hardware_instance_id": obj.get("hardware_instance_id"),
"user_annotations": obj.get("user_annotations"),
"chart_revision": obj.get("chart_revision"),
"image_url": obj.get("image_url"),
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
"port": obj.get("port"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class CreateJobDeploymentRequest(BaseModel):
cluster_id: StrictInt
hardware_instance_id: StrictInt
user_annotations: Optional[Dict[str, StrictStr]] = None
chart_revision: Optional[StrictStr] = None
image_url: StrictStr
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
env_vars: Optional[Dict[str, StrictStr]] = None
Expand All @@ -41,7 +42,7 @@ class CreateJobDeploymentRequest(BaseModel):
backoff_limit: Optional[StrictInt] = 3
active_deadline_seconds: Optional[StrictInt] = None
enable_logging: Optional[StrictBool] = True
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "image_url", "image_pull_secret_credentials", "env_vars", "command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "enable_logging"]
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "image_url", "image_pull_secret_credentials", "env_vars", "command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "enable_logging"]

@field_validator('name')
def name_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -133,6 +134,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"cluster_id": obj.get("cluster_id"),
"hardware_instance_id": obj.get("hardware_instance_id"),
"user_annotations": obj.get("user_annotations"),
"chart_revision": obj.get("chart_revision"),
"image_url": obj.get("image_url"),
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
"env_vars": obj.get("env_vars"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from typing import Any, ClassVar, Dict, List, Optional
from platform_api_python_client.models.deployment_status import DeploymentStatus
from platform_api_python_client.models.deployment_type import DeploymentType
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -45,8 +46,9 @@ class GetComputeDeploymentResponse(BaseModel):
ssh_public_key: Optional[StrictStr] = None
ssh_password: Optional[StrictStr] = None
env_vars: Optional[Dict[str, StrictStr]] = None
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
enable_logging: Optional[StrictBool] = True
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "exposed_port", "ssh_public_key", "ssh_password", "env_vars", "enable_logging"]
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "exposed_port", "ssh_public_key", "ssh_password", "env_vars", "image_pull_secret_credentials", "enable_logging"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -87,6 +89,9 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
if self.image_pull_secret_credentials:
_dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
# set to None if 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:
Expand All @@ -112,6 +117,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.env_vars is None and "env_vars" in self.model_fields_set:
_dict['env_vars'] = None

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

return _dict

@classmethod
Expand Down Expand Up @@ -140,6 +150,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"ssh_public_key": obj.get("ssh_public_key"),
"ssh_password": obj.get("ssh_password"),
"env_vars": obj.get("env_vars"),
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True
})
return _obj
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "platform_api_python_client"
version = "4.15.0"
version = "4.16.0"
description = "Platform External API"
authors = ["OpenAPI Generator Community <team@openapitools.org>"]
license = "NoLicense"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "platform-api-python-client"
VERSION = "4.15.0"
VERSION = "4.16.0"
PYTHON_REQUIRES = ">= 3.8"
REQUIRES = [
"urllib3 >= 1.25.3, < 3.0.0",
Expand Down
1 change: 1 addition & 0 deletions test/test_create_c_serve_v3_deployment_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def make_instance(self, include_optional) -> CreateCServeV3DeploymentRequest:
user_annotations = {
'key' : ''
},
chart_revision = '',
recipe = { },
cserve_version = '',
hf_token = '',
Expand Down
5 changes: 4 additions & 1 deletion test/test_create_compute_deployment_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ def make_instance(self, include_optional) -> CreateComputeDeploymentRequest:
user_annotations = {
'key' : ''
},
chart_revision = '',
image_url = '',
enable_jupyter = True,
image_pull_secret_credentials = platform_api_python_client.models.image_pull_secret_credentials.ImagePullSecretCredentials(
username = '',
password = '', ),
ssh_public_key = '',
enable_logging = True
)
Expand Down
Loading
Loading