platform-api-python-client 4.28.0__py3-none-any.whl → 4.31.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- platform_api_python_client/__init__.py +5 -1
- platform_api_python_client/api/external_api.py +15 -288
- platform_api_python_client/api_client.py +1 -1
- platform_api_python_client/configuration.py +1 -1
- platform_api_python_client/models/__init__.py +4 -0
- platform_api_python_client/models/cloud_provider.py +5 -0
- platform_api_python_client/models/create_c_serve_v3_deployment_request.py +18 -1
- platform_api_python_client/models/create_compute_deployment_request.py +14 -7
- platform_api_python_client/models/create_dynamo_deployment_request.py +56 -6
- platform_api_python_client/models/create_filesystem_volume_request.py +13 -0
- platform_api_python_client/models/create_inference_v3_deployment_request.py +18 -1
- platform_api_python_client/models/create_job_deployment_request.py +17 -10
- platform_api_python_client/models/create_object_volume_request.py +32 -19
- platform_api_python_client/models/deployment_response.py +21 -6
- platform_api_python_client/models/dynamo_communications_input.py +104 -0
- platform_api_python_client/models/dynamo_communications_output.py +104 -0
- platform_api_python_client/models/dynamo_kv_transfer_configuration.py +101 -0
- platform_api_python_client/models/dynamo_kv_transfer_policy.py +37 -0
- platform_api_python_client/models/dynamo_worker_pool_config.py +38 -5
- platform_api_python_client/models/dynamo_worker_pools.py +24 -4
- platform_api_python_client/models/get_c_serve_v2_deployment_response.py +25 -1
- platform_api_python_client/models/get_c_serve_v3_deployment_response.py +25 -1
- platform_api_python_client/models/get_compute_deployment_response.py +17 -3
- platform_api_python_client/models/get_deployment_response.py +26 -2
- platform_api_python_client/models/get_dynamo_deployment_response.py +47 -5
- platform_api_python_client/models/get_inference_deployment_response.py +25 -1
- platform_api_python_client/models/get_inference_v3_deployment_response.py +25 -1
- platform_api_python_client/models/get_job_deployment_response.py +24 -10
- platform_api_python_client/models/get_object_volume_response.py +2 -16
- platform_api_python_client/models/hardware_instance_response.py +1 -3
- platform_api_python_client/models/validation_error.py +12 -3
- platform_api_python_client/models/volume_mount.py +1 -1
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.31.0.dist-info}/METADATA +1 -1
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.31.0.dist-info}/RECORD +36 -32
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.31.0.dist-info}/WHEEL +0 -0
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.31.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Platform External API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from platform_api_python_client.models.dynamo_kv_transfer_configuration import DynamoKvTransferConfiguration
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class DynamoCommunicationsOutput(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
DynamoCommunicationsOutput
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
kv_transfer: DynamoKvTransferConfiguration
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties: ClassVar[List[str]] = ["kv_transfer"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of DynamoCommunicationsOutput from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
"additional_properties",
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of kv_transfer
|
|
76
|
+
if self.kv_transfer:
|
|
77
|
+
_dict['kv_transfer'] = self.kv_transfer.to_dict()
|
|
78
|
+
# puts key-value pairs in additional_properties in the top level
|
|
79
|
+
if self.additional_properties is not None:
|
|
80
|
+
for _key, _value in self.additional_properties.items():
|
|
81
|
+
_dict[_key] = _value
|
|
82
|
+
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of DynamoCommunicationsOutput from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({
|
|
95
|
+
"kv_transfer": DynamoKvTransferConfiguration.from_dict(obj["kv_transfer"]) if obj.get("kv_transfer") is not None else None
|
|
96
|
+
})
|
|
97
|
+
# store additional fields in additional_properties
|
|
98
|
+
for _key in obj.keys():
|
|
99
|
+
if _key not in cls.__properties:
|
|
100
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
101
|
+
|
|
102
|
+
return _obj
|
|
103
|
+
|
|
104
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Platform External API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from platform_api_python_client.models.dynamo_kv_transfer_policy import DynamoKvTransferPolicy
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class DynamoKvTransferConfiguration(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
DynamoKvTransferConfiguration
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
policy: DynamoKvTransferPolicy = Field(description="allow_tcp uses platform-managed NIXL/UCX and permits TCP; it does not force TCP or guarantee RDMA. require_gpu_direct_rdma selects EKS EFA device requirements and GPU-buffer transfer over LIBFABRIC without TCP fallback. A compatible EFA chart and runtime image are prerequisites; the API does not validate their capabilities. Device availability is resolved during scheduling.")
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties: ClassVar[List[str]] = ["policy"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of DynamoKvTransferConfiguration from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
"additional_properties",
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# puts key-value pairs in additional_properties in the top level
|
|
76
|
+
if self.additional_properties is not None:
|
|
77
|
+
for _key, _value in self.additional_properties.items():
|
|
78
|
+
_dict[_key] = _value
|
|
79
|
+
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of DynamoKvTransferConfiguration from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"policy": obj.get("policy")
|
|
93
|
+
})
|
|
94
|
+
# store additional fields in additional_properties
|
|
95
|
+
for _key in obj.keys():
|
|
96
|
+
if _key not in cls.__properties:
|
|
97
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
98
|
+
|
|
99
|
+
return _obj
|
|
100
|
+
|
|
101
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Platform External API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class DynamoKvTransferPolicy(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
DynamoKvTransferPolicy
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
ALLOW_TCP = 'allow_tcp'
|
|
30
|
+
REQUIRE_GPU_DIRECT_RDMA = 'require_gpu_direct_rdma'
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_json(cls, json_str: str) -> Self:
|
|
34
|
+
"""Create an instance of DynamoKvTransferPolicy from a JSON string"""
|
|
35
|
+
return cls(json.loads(json_str))
|
|
36
|
+
|
|
37
|
+
|
|
@@ -18,19 +18,23 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
26
|
class DynamoWorkerPoolConfig(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
Hardware and scaling for one Dynamo worker role. ``min_replicas``/``max_replicas`` are the canonical size. ``replicas`` is the deprecated fixed-size alias (``min == max``) still accepted on disaggregated pools. ``parse_dynamo_topology`` owns the cross-field rules (bounds ordering, autoscaling target, which roles may autoscale).
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
hardware_instance_id: StrictInt
|
|
31
|
-
replicas: Annotated[int, Field(strict=True, ge=1)]
|
|
31
|
+
replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
32
|
+
min_replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
33
|
+
max_replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
34
|
+
concurrency: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
35
|
+
cooldown_period: Optional[Annotated[int, Field(le=3600, strict=True, ge=0)]] = None
|
|
32
36
|
additional_properties: Dict[str, Any] = {}
|
|
33
|
-
__properties: ClassVar[List[str]] = ["hardware_instance_id", "replicas"]
|
|
37
|
+
__properties: ClassVar[List[str]] = ["hardware_instance_id", "replicas", "min_replicas", "max_replicas", "concurrency", "cooldown_period"]
|
|
34
38
|
|
|
35
39
|
model_config = ConfigDict(
|
|
36
40
|
populate_by_name=True,
|
|
@@ -78,6 +82,31 @@ class DynamoWorkerPoolConfig(BaseModel):
|
|
|
78
82
|
for _key, _value in self.additional_properties.items():
|
|
79
83
|
_dict[_key] = _value
|
|
80
84
|
|
|
85
|
+
# set to None if replicas (nullable) is None
|
|
86
|
+
# and model_fields_set contains the field
|
|
87
|
+
if self.replicas is None and "replicas" in self.model_fields_set:
|
|
88
|
+
_dict['replicas'] = None
|
|
89
|
+
|
|
90
|
+
# set to None if min_replicas (nullable) is None
|
|
91
|
+
# and model_fields_set contains the field
|
|
92
|
+
if self.min_replicas is None and "min_replicas" in self.model_fields_set:
|
|
93
|
+
_dict['min_replicas'] = None
|
|
94
|
+
|
|
95
|
+
# set to None if max_replicas (nullable) is None
|
|
96
|
+
# and model_fields_set contains the field
|
|
97
|
+
if self.max_replicas is None and "max_replicas" in self.model_fields_set:
|
|
98
|
+
_dict['max_replicas'] = None
|
|
99
|
+
|
|
100
|
+
# set to None if concurrency (nullable) is None
|
|
101
|
+
# and model_fields_set contains the field
|
|
102
|
+
if self.concurrency is None and "concurrency" in self.model_fields_set:
|
|
103
|
+
_dict['concurrency'] = None
|
|
104
|
+
|
|
105
|
+
# set to None if cooldown_period (nullable) is None
|
|
106
|
+
# and model_fields_set contains the field
|
|
107
|
+
if self.cooldown_period is None and "cooldown_period" in self.model_fields_set:
|
|
108
|
+
_dict['cooldown_period'] = None
|
|
109
|
+
|
|
81
110
|
return _dict
|
|
82
111
|
|
|
83
112
|
@classmethod
|
|
@@ -91,7 +120,11 @@ class DynamoWorkerPoolConfig(BaseModel):
|
|
|
91
120
|
|
|
92
121
|
_obj = cls.model_validate({
|
|
93
122
|
"hardware_instance_id": obj.get("hardware_instance_id"),
|
|
94
|
-
"replicas": obj.get("replicas")
|
|
123
|
+
"replicas": obj.get("replicas"),
|
|
124
|
+
"min_replicas": obj.get("min_replicas"),
|
|
125
|
+
"max_replicas": obj.get("max_replicas"),
|
|
126
|
+
"concurrency": obj.get("concurrency"),
|
|
127
|
+
"cooldown_period": obj.get("cooldown_period")
|
|
95
128
|
})
|
|
96
129
|
# store additional fields in additional_properties
|
|
97
130
|
for _key in obj.keys():
|
|
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict
|
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from platform_api_python_client.models.dynamo_worker_pool_config import DynamoWorkerPoolConfig
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
@@ -27,10 +27,11 @@ class DynamoWorkerPools(BaseModel):
|
|
|
27
27
|
"""
|
|
28
28
|
DynamoWorkerPools
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
worker: Optional[DynamoWorkerPoolConfig] = None
|
|
31
|
+
prefill: Optional[DynamoWorkerPoolConfig] = None
|
|
32
|
+
decode: Optional[DynamoWorkerPoolConfig] = None
|
|
32
33
|
additional_properties: Dict[str, Any] = {}
|
|
33
|
-
__properties: ClassVar[List[str]] = ["prefill", "decode"]
|
|
34
|
+
__properties: ClassVar[List[str]] = ["worker", "prefill", "decode"]
|
|
34
35
|
|
|
35
36
|
model_config = ConfigDict(
|
|
36
37
|
populate_by_name=True,
|
|
@@ -73,6 +74,9 @@ class DynamoWorkerPools(BaseModel):
|
|
|
73
74
|
exclude=excluded_fields,
|
|
74
75
|
exclude_none=True,
|
|
75
76
|
)
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of worker
|
|
78
|
+
if self.worker:
|
|
79
|
+
_dict['worker'] = self.worker.to_dict()
|
|
76
80
|
# override the default output from pydantic by calling `to_dict()` of prefill
|
|
77
81
|
if self.prefill:
|
|
78
82
|
_dict['prefill'] = self.prefill.to_dict()
|
|
@@ -84,6 +88,21 @@ class DynamoWorkerPools(BaseModel):
|
|
|
84
88
|
for _key, _value in self.additional_properties.items():
|
|
85
89
|
_dict[_key] = _value
|
|
86
90
|
|
|
91
|
+
# set to None if worker (nullable) is None
|
|
92
|
+
# and model_fields_set contains the field
|
|
93
|
+
if self.worker is None and "worker" in self.model_fields_set:
|
|
94
|
+
_dict['worker'] = None
|
|
95
|
+
|
|
96
|
+
# set to None if prefill (nullable) is None
|
|
97
|
+
# and model_fields_set contains the field
|
|
98
|
+
if self.prefill is None and "prefill" in self.model_fields_set:
|
|
99
|
+
_dict['prefill'] = None
|
|
100
|
+
|
|
101
|
+
# set to None if decode (nullable) is None
|
|
102
|
+
# and model_fields_set contains the field
|
|
103
|
+
if self.decode is None and "decode" in self.model_fields_set:
|
|
104
|
+
_dict['decode'] = None
|
|
105
|
+
|
|
87
106
|
return _dict
|
|
88
107
|
|
|
89
108
|
@classmethod
|
|
@@ -96,6 +115,7 @@ class DynamoWorkerPools(BaseModel):
|
|
|
96
115
|
return cls.model_validate(obj)
|
|
97
116
|
|
|
98
117
|
_obj = cls.model_validate({
|
|
118
|
+
"worker": DynamoWorkerPoolConfig.from_dict(obj["worker"]) if obj.get("worker") is not None else None,
|
|
99
119
|
"prefill": DynamoWorkerPoolConfig.from_dict(obj["prefill"]) if obj.get("prefill") is not None else None,
|
|
100
120
|
"decode": DynamoWorkerPoolConfig.from_dict(obj["decode"]) if obj.get("decode") is not None else None
|
|
101
121
|
})
|
|
@@ -23,6 +23,7 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
23
23
|
from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe
|
|
24
24
|
from platform_api_python_client.models.deployment_status import DeploymentStatus
|
|
25
25
|
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
26
|
+
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
26
27
|
from typing import Optional, Set
|
|
27
28
|
from typing_extensions import Self
|
|
28
29
|
|
|
@@ -41,7 +42,10 @@ class GetCServeV2DeploymentResponse(BaseModel):
|
|
|
41
42
|
created_at: datetime
|
|
42
43
|
hardware_instance_id: StrictInt
|
|
43
44
|
revision_number: StrictInt
|
|
45
|
+
chart_revision: Optional[StrictStr] = None
|
|
44
46
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
47
|
+
priority: Optional[StrictStr] = None
|
|
48
|
+
volume_mounts: Optional[List[VolumeMount]] = None
|
|
45
49
|
recipe: CServeV2Recipe
|
|
46
50
|
cserve_version: Optional[StrictStr] = None
|
|
47
51
|
min_scale: StrictInt
|
|
@@ -51,7 +55,7 @@ class GetCServeV2DeploymentResponse(BaseModel):
|
|
|
51
55
|
endpoint_bearer_token: Optional[StrictStr] = None
|
|
52
56
|
concurrency: Optional[StrictInt] = None
|
|
53
57
|
env_vars: Optional[Dict[str, StrictStr]] = None
|
|
54
|
-
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "recipe", "cserve_version", "min_scale", "max_scale", "initial_scale", "endpoint_certificate_authority", "endpoint_bearer_token", "concurrency", "env_vars"]
|
|
58
|
+
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "recipe", "cserve_version", "min_scale", "max_scale", "initial_scale", "endpoint_certificate_authority", "endpoint_bearer_token", "concurrency", "env_vars"]
|
|
55
59
|
|
|
56
60
|
model_config = ConfigDict(
|
|
57
61
|
populate_by_name=True,
|
|
@@ -92,6 +96,13 @@ class GetCServeV2DeploymentResponse(BaseModel):
|
|
|
92
96
|
exclude=excluded_fields,
|
|
93
97
|
exclude_none=True,
|
|
94
98
|
)
|
|
99
|
+
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
100
|
+
_items = []
|
|
101
|
+
if self.volume_mounts:
|
|
102
|
+
for _item_volume_mounts in self.volume_mounts:
|
|
103
|
+
if _item_volume_mounts:
|
|
104
|
+
_items.append(_item_volume_mounts.to_dict())
|
|
105
|
+
_dict['volume_mounts'] = _items
|
|
95
106
|
# override the default output from pydantic by calling `to_dict()` of recipe
|
|
96
107
|
if self.recipe:
|
|
97
108
|
_dict['recipe'] = self.recipe.to_dict()
|
|
@@ -100,11 +111,21 @@ class GetCServeV2DeploymentResponse(BaseModel):
|
|
|
100
111
|
if self.image_url is None and "image_url" in self.model_fields_set:
|
|
101
112
|
_dict['image_url'] = None
|
|
102
113
|
|
|
114
|
+
# set to None if chart_revision (nullable) is None
|
|
115
|
+
# and model_fields_set contains the field
|
|
116
|
+
if self.chart_revision is None and "chart_revision" in self.model_fields_set:
|
|
117
|
+
_dict['chart_revision'] = None
|
|
118
|
+
|
|
103
119
|
# set to None if user_annotations (nullable) is None
|
|
104
120
|
# and model_fields_set contains the field
|
|
105
121
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
106
122
|
_dict['user_annotations'] = None
|
|
107
123
|
|
|
124
|
+
# set to None if priority (nullable) is None
|
|
125
|
+
# and model_fields_set contains the field
|
|
126
|
+
if self.priority is None and "priority" in self.model_fields_set:
|
|
127
|
+
_dict['priority'] = None
|
|
128
|
+
|
|
108
129
|
# set to None if cserve_version (nullable) is None
|
|
109
130
|
# and model_fields_set contains the field
|
|
110
131
|
if self.cserve_version is None and "cserve_version" in self.model_fields_set:
|
|
@@ -153,7 +174,10 @@ class GetCServeV2DeploymentResponse(BaseModel):
|
|
|
153
174
|
"created_at": obj.get("created_at"),
|
|
154
175
|
"hardware_instance_id": obj.get("hardware_instance_id"),
|
|
155
176
|
"revision_number": obj.get("revision_number"),
|
|
177
|
+
"chart_revision": obj.get("chart_revision"),
|
|
156
178
|
"user_annotations": obj.get("user_annotations"),
|
|
179
|
+
"priority": obj.get("priority"),
|
|
180
|
+
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
|
|
157
181
|
"recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None,
|
|
158
182
|
"cserve_version": obj.get("cserve_version"),
|
|
159
183
|
"min_scale": obj.get("min_scale"),
|
|
@@ -23,6 +23,7 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
23
23
|
from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe
|
|
24
24
|
from platform_api_python_client.models.deployment_status import DeploymentStatus
|
|
25
25
|
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
26
|
+
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
26
27
|
from typing import Optional, Set
|
|
27
28
|
from typing_extensions import Self
|
|
28
29
|
|
|
@@ -41,7 +42,10 @@ class GetCServeV3DeploymentResponse(BaseModel):
|
|
|
41
42
|
created_at: datetime
|
|
42
43
|
hardware_instance_id: StrictInt
|
|
43
44
|
revision_number: StrictInt
|
|
45
|
+
chart_revision: Optional[StrictStr] = None
|
|
44
46
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
47
|
+
priority: Optional[StrictStr] = None
|
|
48
|
+
volume_mounts: Optional[List[VolumeMount]] = None
|
|
45
49
|
recipe: CServeV2Recipe
|
|
46
50
|
cserve_version: Optional[StrictStr] = None
|
|
47
51
|
min_replicas: StrictInt
|
|
@@ -54,7 +58,7 @@ class GetCServeV3DeploymentResponse(BaseModel):
|
|
|
54
58
|
enable_logging: Optional[StrictBool] = True
|
|
55
59
|
enable_node_model_cache: Optional[StrictBool] = False
|
|
56
60
|
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.")
|
|
57
|
-
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "recipe", "cserve_version", "min_replicas", "max_replicas", "endpoint_certificate_authority", "endpoint_bearer_token", "concurrency", "cooldown_period", "env_vars", "enable_logging", "enable_node_model_cache", "session_affinity"]
|
|
61
|
+
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "recipe", "cserve_version", "min_replicas", "max_replicas", "endpoint_certificate_authority", "endpoint_bearer_token", "concurrency", "cooldown_period", "env_vars", "enable_logging", "enable_node_model_cache", "session_affinity"]
|
|
58
62
|
|
|
59
63
|
model_config = ConfigDict(
|
|
60
64
|
populate_by_name=True,
|
|
@@ -95,6 +99,13 @@ class GetCServeV3DeploymentResponse(BaseModel):
|
|
|
95
99
|
exclude=excluded_fields,
|
|
96
100
|
exclude_none=True,
|
|
97
101
|
)
|
|
102
|
+
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
103
|
+
_items = []
|
|
104
|
+
if self.volume_mounts:
|
|
105
|
+
for _item_volume_mounts in self.volume_mounts:
|
|
106
|
+
if _item_volume_mounts:
|
|
107
|
+
_items.append(_item_volume_mounts.to_dict())
|
|
108
|
+
_dict['volume_mounts'] = _items
|
|
98
109
|
# override the default output from pydantic by calling `to_dict()` of recipe
|
|
99
110
|
if self.recipe:
|
|
100
111
|
_dict['recipe'] = self.recipe.to_dict()
|
|
@@ -103,11 +114,21 @@ class GetCServeV3DeploymentResponse(BaseModel):
|
|
|
103
114
|
if self.image_url is None and "image_url" in self.model_fields_set:
|
|
104
115
|
_dict['image_url'] = None
|
|
105
116
|
|
|
117
|
+
# set to None if chart_revision (nullable) is None
|
|
118
|
+
# and model_fields_set contains the field
|
|
119
|
+
if self.chart_revision is None and "chart_revision" in self.model_fields_set:
|
|
120
|
+
_dict['chart_revision'] = None
|
|
121
|
+
|
|
106
122
|
# set to None if user_annotations (nullable) is None
|
|
107
123
|
# and model_fields_set contains the field
|
|
108
124
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
109
125
|
_dict['user_annotations'] = None
|
|
110
126
|
|
|
127
|
+
# set to None if priority (nullable) is None
|
|
128
|
+
# and model_fields_set contains the field
|
|
129
|
+
if self.priority is None and "priority" in self.model_fields_set:
|
|
130
|
+
_dict['priority'] = None
|
|
131
|
+
|
|
111
132
|
# set to None if cserve_version (nullable) is None
|
|
112
133
|
# and model_fields_set contains the field
|
|
113
134
|
if self.cserve_version is None and "cserve_version" in self.model_fields_set:
|
|
@@ -151,7 +172,10 @@ class GetCServeV3DeploymentResponse(BaseModel):
|
|
|
151
172
|
"created_at": obj.get("created_at"),
|
|
152
173
|
"hardware_instance_id": obj.get("hardware_instance_id"),
|
|
153
174
|
"revision_number": obj.get("revision_number"),
|
|
175
|
+
"chart_revision": obj.get("chart_revision"),
|
|
154
176
|
"user_annotations": obj.get("user_annotations"),
|
|
177
|
+
"priority": obj.get("priority"),
|
|
178
|
+
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
|
|
155
179
|
"recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None,
|
|
156
180
|
"cserve_version": obj.get("cserve_version"),
|
|
157
181
|
"min_replicas": obj.get("min_replicas"),
|
|
@@ -42,15 +42,17 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
42
42
|
created_at: datetime
|
|
43
43
|
hardware_instance_id: StrictInt
|
|
44
44
|
revision_number: StrictInt
|
|
45
|
+
chart_revision: Optional[StrictStr] = None
|
|
45
46
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
46
|
-
|
|
47
|
+
priority: Optional[StrictStr] = None
|
|
47
48
|
volume_mounts: Optional[List[VolumeMount]] = None
|
|
49
|
+
exposed_port: StrictInt
|
|
48
50
|
ssh_public_key: Optional[StrictStr] = None
|
|
49
51
|
ssh_password: Optional[StrictStr] = None
|
|
50
52
|
env_vars: Optional[Dict[str, StrictStr]] = None
|
|
51
53
|
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
|
|
52
54
|
enable_logging: Optional[StrictBool] = True
|
|
53
|
-
__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", "
|
|
55
|
+
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "exposed_port", "ssh_public_key", "ssh_password", "env_vars", "image_pull_secret_credentials", "enable_logging"]
|
|
54
56
|
|
|
55
57
|
model_config = ConfigDict(
|
|
56
58
|
populate_by_name=True,
|
|
@@ -106,11 +108,21 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
106
108
|
if self.image_url is None and "image_url" in self.model_fields_set:
|
|
107
109
|
_dict['image_url'] = None
|
|
108
110
|
|
|
111
|
+
# set to None if chart_revision (nullable) is None
|
|
112
|
+
# and model_fields_set contains the field
|
|
113
|
+
if self.chart_revision is None and "chart_revision" in self.model_fields_set:
|
|
114
|
+
_dict['chart_revision'] = None
|
|
115
|
+
|
|
109
116
|
# set to None if user_annotations (nullable) is None
|
|
110
117
|
# and model_fields_set contains the field
|
|
111
118
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
112
119
|
_dict['user_annotations'] = None
|
|
113
120
|
|
|
121
|
+
# set to None if priority (nullable) is None
|
|
122
|
+
# and model_fields_set contains the field
|
|
123
|
+
if self.priority is None and "priority" in self.model_fields_set:
|
|
124
|
+
_dict['priority'] = None
|
|
125
|
+
|
|
114
126
|
# set to None if ssh_public_key (nullable) is None
|
|
115
127
|
# and model_fields_set contains the field
|
|
116
128
|
if self.ssh_public_key is None and "ssh_public_key" in self.model_fields_set:
|
|
@@ -154,9 +166,11 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
154
166
|
"created_at": obj.get("created_at"),
|
|
155
167
|
"hardware_instance_id": obj.get("hardware_instance_id"),
|
|
156
168
|
"revision_number": obj.get("revision_number"),
|
|
169
|
+
"chart_revision": obj.get("chart_revision"),
|
|
157
170
|
"user_annotations": obj.get("user_annotations"),
|
|
158
|
-
"
|
|
171
|
+
"priority": obj.get("priority"),
|
|
159
172
|
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
|
|
173
|
+
"exposed_port": obj.get("exposed_port"),
|
|
160
174
|
"ssh_public_key": obj.get("ssh_public_key"),
|
|
161
175
|
"ssh_password": obj.get("ssh_password"),
|
|
162
176
|
"env_vars": obj.get("env_vars"),
|
|
@@ -22,6 +22,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from platform_api_python_client.models.deployment_status import DeploymentStatus
|
|
24
24
|
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
25
|
+
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
25
26
|
from typing import Optional, Set
|
|
26
27
|
from typing_extensions import Self
|
|
27
28
|
|
|
@@ -40,8 +41,11 @@ class GetDeploymentResponse(BaseModel):
|
|
|
40
41
|
created_at: datetime
|
|
41
42
|
hardware_instance_id: StrictInt
|
|
42
43
|
revision_number: StrictInt
|
|
44
|
+
chart_revision: Optional[StrictStr] = None
|
|
43
45
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
44
|
-
|
|
46
|
+
priority: Optional[StrictStr] = None
|
|
47
|
+
volume_mounts: Optional[List[VolumeMount]] = None
|
|
48
|
+
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts"]
|
|
45
49
|
|
|
46
50
|
model_config = ConfigDict(
|
|
47
51
|
populate_by_name=True,
|
|
@@ -82,16 +86,33 @@ class GetDeploymentResponse(BaseModel):
|
|
|
82
86
|
exclude=excluded_fields,
|
|
83
87
|
exclude_none=True,
|
|
84
88
|
)
|
|
89
|
+
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
90
|
+
_items = []
|
|
91
|
+
if self.volume_mounts:
|
|
92
|
+
for _item_volume_mounts in self.volume_mounts:
|
|
93
|
+
if _item_volume_mounts:
|
|
94
|
+
_items.append(_item_volume_mounts.to_dict())
|
|
95
|
+
_dict['volume_mounts'] = _items
|
|
85
96
|
# set to None if image_url (nullable) is None
|
|
86
97
|
# and model_fields_set contains the field
|
|
87
98
|
if self.image_url is None and "image_url" in self.model_fields_set:
|
|
88
99
|
_dict['image_url'] = None
|
|
89
100
|
|
|
101
|
+
# set to None if chart_revision (nullable) is None
|
|
102
|
+
# and model_fields_set contains the field
|
|
103
|
+
if self.chart_revision is None and "chart_revision" in self.model_fields_set:
|
|
104
|
+
_dict['chart_revision'] = None
|
|
105
|
+
|
|
90
106
|
# set to None if user_annotations (nullable) is None
|
|
91
107
|
# and model_fields_set contains the field
|
|
92
108
|
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
93
109
|
_dict['user_annotations'] = None
|
|
94
110
|
|
|
111
|
+
# set to None if priority (nullable) is None
|
|
112
|
+
# and model_fields_set contains the field
|
|
113
|
+
if self.priority is None and "priority" in self.model_fields_set:
|
|
114
|
+
_dict['priority'] = None
|
|
115
|
+
|
|
95
116
|
return _dict
|
|
96
117
|
|
|
97
118
|
@classmethod
|
|
@@ -115,7 +136,10 @@ class GetDeploymentResponse(BaseModel):
|
|
|
115
136
|
"created_at": obj.get("created_at"),
|
|
116
137
|
"hardware_instance_id": obj.get("hardware_instance_id"),
|
|
117
138
|
"revision_number": obj.get("revision_number"),
|
|
118
|
-
"
|
|
139
|
+
"chart_revision": obj.get("chart_revision"),
|
|
140
|
+
"user_annotations": obj.get("user_annotations"),
|
|
141
|
+
"priority": obj.get("priority"),
|
|
142
|
+
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None
|
|
119
143
|
})
|
|
120
144
|
return _obj
|
|
121
145
|
|