platform-api-python-client 4.31.0__py3-none-any.whl → 4.37.1__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 +39 -10
- platform_api_python_client/api/external_api.py +6460 -1203
- platform_api_python_client/api_client.py +1 -1
- platform_api_python_client/configuration.py +1 -1
- platform_api_python_client/models/__init__.py +38 -9
- platform_api_python_client/models/ccl_dynamo_pools.py +116 -0
- platform_api_python_client/models/{create_c_serve_v2_deployment_response.py → ccl_main_pools.py} +12 -13
- platform_api_python_client/models/cluster_credential.py +2 -2
- platform_api_python_client/models/create_compute_deployment_request.py +27 -1
- platform_api_python_client/models/create_dynamo_deployment_request.py +42 -1
- platform_api_python_client/models/create_filesystem_volume_request.py +0 -13
- platform_api_python_client/models/create_inference_v3_deployment_request.py +42 -2
- platform_api_python_client/models/create_job_deployment_request.py +27 -1
- platform_api_python_client/models/create_object_volume_request.py +0 -13
- platform_api_python_client/models/deployment_response.py +12 -27
- platform_api_python_client/models/deployment_type.py +14 -0
- platform_api_python_client/models/dynamo_communications_input.py +0 -13
- platform_api_python_client/models/dynamo_communications_output.py +0 -13
- platform_api_python_client/models/dynamo_image.py +105 -0
- platform_api_python_client/models/dynamo_kv_transfer_configuration.py +0 -13
- platform_api_python_client/models/dynamo_weight_transfer_configuration.py +88 -0
- platform_api_python_client/models/dynamo_weight_transfer_policy.py +36 -0
- platform_api_python_client/models/dynamo_worker_pool_config.py +1 -14
- platform_api_python_client/models/dynamo_worker_pools.py +0 -13
- platform_api_python_client/models/env.py +89 -0
- platform_api_python_client/models/get_cluster_response.py +4 -2
- platform_api_python_client/models/get_compute_deployment_response.py +29 -2
- platform_api_python_client/models/get_deployment_usage_response.py +19 -4
- platform_api_python_client/models/get_dynamo_deployment_response.py +43 -1
- platform_api_python_client/models/get_inference_v3_deployment_response.py +43 -2
- platform_api_python_client/models/get_job_deployment_response.py +29 -2
- platform_api_python_client/models/hardware_instance_response.py +6 -2
- platform_api_python_client/models/image.py +112 -0
- platform_api_python_client/models/ingress.py +103 -0
- platform_api_python_client/models/insight_list_item_response.py +108 -0
- platform_api_python_client/models/insight_resource.py +97 -0
- platform_api_python_client/models/insight_resource_type.py +37 -0
- platform_api_python_client/models/insight_response.py +133 -0
- platform_api_python_client/models/insight_severity.py +40 -0
- platform_api_python_client/models/insight_status.py +39 -0
- platform_api_python_client/models/{c_serve_recipe_response.py → insight_status_change_response.py} +28 -24
- platform_api_python_client/models/{c_serve_recipe_perf.py → list_insights_response.py} +16 -19
- platform_api_python_client/models/metric.py +13 -0
- platform_api_python_client/models/pool.py +116 -0
- platform_api_python_client/models/{get_c_serve_v2_deployment_response.py → unified_get_compute_deployment_response.py} +65 -81
- platform_api_python_client/models/unified_get_deployment_logs_response.py +95 -0
- platform_api_python_client/models/{create_c_serve_v3_deployment_response.py → unified_get_deployment_pods_response.py} +8 -13
- platform_api_python_client/models/unified_get_deployment_response.py +164 -0
- platform_api_python_client/models/unified_get_deployment_revision_response.py +109 -0
- platform_api_python_client/models/unified_get_deployment_rollout_response.py +90 -0
- platform_api_python_client/models/unified_get_deployment_usage_response.py +110 -0
- platform_api_python_client/models/unified_get_dynamo_deployment_response.py +218 -0
- platform_api_python_client/models/unified_get_inference_v3_deployment_response.py +228 -0
- platform_api_python_client/models/{get_c_serve_v3_deployment_response.py → unified_get_job_deployment_response.py} +85 -75
- platform_api_python_client/models/{list_c_serve_recipe_response.py → unified_list_deployment_revisions_response.py} +7 -7
- platform_api_python_client/models/unified_update_deployment_rollout_request.py +87 -0
- platform_api_python_client/models/unified_write_compute_deployment_request.py +154 -0
- platform_api_python_client/models/unified_write_deployment_request.py +164 -0
- platform_api_python_client/models/{c_serve_v2_recipe.py → unified_write_deployment_response.py} +27 -27
- platform_api_python_client/models/unified_write_dynamo_deployment_request.py +197 -0
- platform_api_python_client/models/{create_c_serve_v3_deployment_request.py → unified_write_inference_v3_deployment_request.py} +78 -70
- platform_api_python_client/models/unified_write_job_deployment_request.py +183 -0
- platform_api_python_client/models/update_insight_status_request.py +106 -0
- platform_api_python_client/models/upsert_user_vault_item_request.py +1 -1
- platform_api_python_client/models/usage_availability.py +40 -0
- platform_api_python_client/models/usage_component.py +39 -0
- {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.37.1.dist-info}/METADATA +1 -1
- {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.37.1.dist-info}/RECORD +70 -41
- {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.37.1.dist-info}/WHEEL +1 -1
- {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.37.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
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, Optional
|
|
22
|
+
from platform_api_python_client.models.dynamo_weight_transfer_policy import DynamoWeightTransferPolicy
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class DynamoWeightTransferConfiguration(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ModelExpress peer weight transfer between the workers of one pool, in either serving mode.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
policy: Optional[DynamoWeightTransferPolicy] = Field(default=None, description="The default and only policy, so an empty object opts in. require_gpu_direct_rdma makes a starting worker pull the model's weights GPU to GPU from a worker of the same pool that already serves the same model_revision commit, over the cluster's GPU-direct RDMA fabric (currently AWS EFA only), instead of downloading the checkpoint. A pool's first worker, or one without a reachable peer, falls back to the usual loader. The chart and runtime image prerequisites of require_gpu_direct_rdma KV transfer apply; the API does not validate them.")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["policy"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of DynamoWeightTransferConfiguration from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of DynamoWeightTransferConfiguration from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"policy": obj.get("policy")
|
|
85
|
+
})
|
|
86
|
+
return _obj
|
|
87
|
+
|
|
88
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
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 DynamoWeightTransferPolicy(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
DynamoWeightTransferPolicy
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
REQUIRE_GPU_DIRECT_RDMA = 'require_gpu_direct_rdma'
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
def from_json(cls, json_str: str) -> Self:
|
|
33
|
+
"""Create an instance of DynamoWeightTransferPolicy from a JSON string"""
|
|
34
|
+
return cls(json.loads(json_str))
|
|
35
|
+
|
|
36
|
+
|
|
@@ -29,11 +29,10 @@ class DynamoWorkerPoolConfig(BaseModel):
|
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
hardware_instance_id: StrictInt
|
|
31
31
|
replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
32
|
-
min_replicas: Optional[Annotated[int, Field(strict=True, ge=
|
|
32
|
+
min_replicas: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
|
|
33
33
|
max_replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
34
34
|
concurrency: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
35
35
|
cooldown_period: Optional[Annotated[int, Field(le=3600, strict=True, ge=0)]] = None
|
|
36
|
-
additional_properties: Dict[str, Any] = {}
|
|
37
36
|
__properties: ClassVar[List[str]] = ["hardware_instance_id", "replicas", "min_replicas", "max_replicas", "concurrency", "cooldown_period"]
|
|
38
37
|
|
|
39
38
|
model_config = ConfigDict(
|
|
@@ -66,10 +65,8 @@ class DynamoWorkerPoolConfig(BaseModel):
|
|
|
66
65
|
* `None` is only added to the output dict for nullable fields that
|
|
67
66
|
were set at model initialization. Other fields with value `None`
|
|
68
67
|
are ignored.
|
|
69
|
-
* Fields in `self.additional_properties` are added to the output dict.
|
|
70
68
|
"""
|
|
71
69
|
excluded_fields: Set[str] = set([
|
|
72
|
-
"additional_properties",
|
|
73
70
|
])
|
|
74
71
|
|
|
75
72
|
_dict = self.model_dump(
|
|
@@ -77,11 +74,6 @@ class DynamoWorkerPoolConfig(BaseModel):
|
|
|
77
74
|
exclude=excluded_fields,
|
|
78
75
|
exclude_none=True,
|
|
79
76
|
)
|
|
80
|
-
# puts key-value pairs in additional_properties in the top level
|
|
81
|
-
if self.additional_properties is not None:
|
|
82
|
-
for _key, _value in self.additional_properties.items():
|
|
83
|
-
_dict[_key] = _value
|
|
84
|
-
|
|
85
77
|
# set to None if replicas (nullable) is None
|
|
86
78
|
# and model_fields_set contains the field
|
|
87
79
|
if self.replicas is None and "replicas" in self.model_fields_set:
|
|
@@ -126,11 +118,6 @@ class DynamoWorkerPoolConfig(BaseModel):
|
|
|
126
118
|
"concurrency": obj.get("concurrency"),
|
|
127
119
|
"cooldown_period": obj.get("cooldown_period")
|
|
128
120
|
})
|
|
129
|
-
# store additional fields in additional_properties
|
|
130
|
-
for _key in obj.keys():
|
|
131
|
-
if _key not in cls.__properties:
|
|
132
|
-
_obj.additional_properties[_key] = obj.get(_key)
|
|
133
|
-
|
|
134
121
|
return _obj
|
|
135
122
|
|
|
136
123
|
|
|
@@ -30,7 +30,6 @@ class DynamoWorkerPools(BaseModel):
|
|
|
30
30
|
worker: Optional[DynamoWorkerPoolConfig] = None
|
|
31
31
|
prefill: Optional[DynamoWorkerPoolConfig] = None
|
|
32
32
|
decode: Optional[DynamoWorkerPoolConfig] = None
|
|
33
|
-
additional_properties: Dict[str, Any] = {}
|
|
34
33
|
__properties: ClassVar[List[str]] = ["worker", "prefill", "decode"]
|
|
35
34
|
|
|
36
35
|
model_config = ConfigDict(
|
|
@@ -63,10 +62,8 @@ class DynamoWorkerPools(BaseModel):
|
|
|
63
62
|
* `None` is only added to the output dict for nullable fields that
|
|
64
63
|
were set at model initialization. Other fields with value `None`
|
|
65
64
|
are ignored.
|
|
66
|
-
* Fields in `self.additional_properties` are added to the output dict.
|
|
67
65
|
"""
|
|
68
66
|
excluded_fields: Set[str] = set([
|
|
69
|
-
"additional_properties",
|
|
70
67
|
])
|
|
71
68
|
|
|
72
69
|
_dict = self.model_dump(
|
|
@@ -83,11 +80,6 @@ class DynamoWorkerPools(BaseModel):
|
|
|
83
80
|
# override the default output from pydantic by calling `to_dict()` of decode
|
|
84
81
|
if self.decode:
|
|
85
82
|
_dict['decode'] = self.decode.to_dict()
|
|
86
|
-
# puts key-value pairs in additional_properties in the top level
|
|
87
|
-
if self.additional_properties is not None:
|
|
88
|
-
for _key, _value in self.additional_properties.items():
|
|
89
|
-
_dict[_key] = _value
|
|
90
|
-
|
|
91
83
|
# set to None if worker (nullable) is None
|
|
92
84
|
# and model_fields_set contains the field
|
|
93
85
|
if self.worker is None and "worker" in self.model_fields_set:
|
|
@@ -119,11 +111,6 @@ class DynamoWorkerPools(BaseModel):
|
|
|
119
111
|
"prefill": DynamoWorkerPoolConfig.from_dict(obj["prefill"]) if obj.get("prefill") is not None else None,
|
|
120
112
|
"decode": DynamoWorkerPoolConfig.from_dict(obj["decode"]) if obj.get("decode") is not None else None
|
|
121
113
|
})
|
|
122
|
-
# store additional fields in additional_properties
|
|
123
|
-
for _key in obj.keys():
|
|
124
|
-
if _key not in cls.__properties:
|
|
125
|
-
_obj.additional_properties[_key] = obj.get(_key)
|
|
126
|
-
|
|
127
114
|
return _obj
|
|
128
115
|
|
|
129
116
|
|
|
@@ -0,0 +1,89 @@
|
|
|
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, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class Env(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Env
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
vars: Optional[Dict[str, StrictStr]] = None
|
|
30
|
+
refs: Optional[Dict[str, Any]] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["vars", "refs"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of Env from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of Env from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"vars": obj.get("vars"),
|
|
85
|
+
"refs": obj.get("refs")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -31,7 +31,8 @@ class GetClusterResponse(BaseModel):
|
|
|
31
31
|
display_name: StrictStr
|
|
32
32
|
region: Optional[StrictStr] = None
|
|
33
33
|
deployment_creation_disabled: Optional[StrictBool] = False
|
|
34
|
-
|
|
34
|
+
managed_by_ccluster: StrictBool
|
|
35
|
+
__properties: ClassVar[List[str]] = ["id", "cluster_name", "display_name", "region", "deployment_creation_disabled", "managed_by_ccluster"]
|
|
35
36
|
|
|
36
37
|
model_config = ConfigDict(
|
|
37
38
|
populate_by_name=True,
|
|
@@ -93,7 +94,8 @@ class GetClusterResponse(BaseModel):
|
|
|
93
94
|
"cluster_name": obj.get("cluster_name"),
|
|
94
95
|
"display_name": obj.get("display_name"),
|
|
95
96
|
"region": obj.get("region"),
|
|
96
|
-
"deployment_creation_disabled": obj.get("deployment_creation_disabled") if obj.get("deployment_creation_disabled") is not None else False
|
|
97
|
+
"deployment_creation_disabled": obj.get("deployment_creation_disabled") if obj.get("deployment_creation_disabled") is not None else False,
|
|
98
|
+
"managed_by_ccluster": obj.get("managed_by_ccluster")
|
|
97
99
|
})
|
|
98
100
|
return _obj
|
|
99
101
|
|
|
@@ -18,8 +18,9 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
23
24
|
from platform_api_python_client.models.deployment_status import DeploymentStatus
|
|
24
25
|
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
25
26
|
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
|
|
@@ -51,8 +52,21 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
51
52
|
ssh_password: Optional[StrictStr] = None
|
|
52
53
|
env_vars: Optional[Dict[str, StrictStr]] = None
|
|
53
54
|
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
|
|
55
|
+
env_vars_refs: Optional[Dict[str, Any]] = None
|
|
56
|
+
image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
57
|
+
image_pull_secret_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=253)]] = Field(default=None, description="Name of a pre-existing image pull Secret in the deployment namespace. Created, refreshed and deleted externally. Mutually exclusive with inline registry credentials and image_pull_ref. Include on updates to retain it; null clears it.")
|
|
54
58
|
enable_logging: Optional[StrictBool] = True
|
|
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"]
|
|
59
|
+
__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", "env_vars_refs", "image_pull_ref", "image_pull_secret_name", "enable_logging"]
|
|
60
|
+
|
|
61
|
+
@field_validator('image_pull_secret_name')
|
|
62
|
+
def image_pull_secret_name_validate_regular_expression(cls, value):
|
|
63
|
+
"""Validates the regular expression"""
|
|
64
|
+
if value is None:
|
|
65
|
+
return value
|
|
66
|
+
|
|
67
|
+
if not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
|
|
68
|
+
raise ValueError(r"must validate the regular expression /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/")
|
|
69
|
+
return value
|
|
56
70
|
|
|
57
71
|
model_config = ConfigDict(
|
|
58
72
|
populate_by_name=True,
|
|
@@ -143,6 +157,16 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
143
157
|
if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
|
|
144
158
|
_dict['image_pull_secret_credentials'] = None
|
|
145
159
|
|
|
160
|
+
# set to None if image_pull_ref (nullable) is None
|
|
161
|
+
# and model_fields_set contains the field
|
|
162
|
+
if self.image_pull_ref is None and "image_pull_ref" in self.model_fields_set:
|
|
163
|
+
_dict['image_pull_ref'] = None
|
|
164
|
+
|
|
165
|
+
# set to None if image_pull_secret_name (nullable) is None
|
|
166
|
+
# and model_fields_set contains the field
|
|
167
|
+
if self.image_pull_secret_name is None and "image_pull_secret_name" in self.model_fields_set:
|
|
168
|
+
_dict['image_pull_secret_name'] = None
|
|
169
|
+
|
|
146
170
|
return _dict
|
|
147
171
|
|
|
148
172
|
@classmethod
|
|
@@ -175,6 +199,9 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
175
199
|
"ssh_password": obj.get("ssh_password"),
|
|
176
200
|
"env_vars": obj.get("env_vars"),
|
|
177
201
|
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
|
|
202
|
+
"env_vars_refs": obj.get("env_vars_refs"),
|
|
203
|
+
"image_pull_ref": obj.get("image_pull_ref"),
|
|
204
|
+
"image_pull_secret_name": obj.get("image_pull_secret_name"),
|
|
178
205
|
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True
|
|
179
206
|
})
|
|
180
207
|
return _obj
|
|
@@ -17,9 +17,10 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict
|
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictInt
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from platform_api_python_client.models.deployment_usage import DeploymentUsage
|
|
23
|
+
from platform_api_python_client.models.usage_availability import UsageAvailability
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
@@ -28,7 +29,9 @@ class GetDeploymentUsageResponse(BaseModel):
|
|
|
28
29
|
GetDeploymentUsageResponse
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
values: List[DeploymentUsage]
|
|
31
|
-
|
|
32
|
+
availability: Optional[UsageAvailability] = None
|
|
33
|
+
last_sample_at: Optional[StrictInt] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["values", "availability", "last_sample_at"]
|
|
32
35
|
|
|
33
36
|
model_config = ConfigDict(
|
|
34
37
|
populate_by_name=True,
|
|
@@ -76,6 +79,16 @@ class GetDeploymentUsageResponse(BaseModel):
|
|
|
76
79
|
if _item_values:
|
|
77
80
|
_items.append(_item_values.to_dict())
|
|
78
81
|
_dict['values'] = _items
|
|
82
|
+
# set to None if availability (nullable) is None
|
|
83
|
+
# and model_fields_set contains the field
|
|
84
|
+
if self.availability is None and "availability" in self.model_fields_set:
|
|
85
|
+
_dict['availability'] = None
|
|
86
|
+
|
|
87
|
+
# set to None if last_sample_at (nullable) is None
|
|
88
|
+
# and model_fields_set contains the field
|
|
89
|
+
if self.last_sample_at is None and "last_sample_at" in self.model_fields_set:
|
|
90
|
+
_dict['last_sample_at'] = None
|
|
91
|
+
|
|
79
92
|
return _dict
|
|
80
93
|
|
|
81
94
|
@classmethod
|
|
@@ -88,7 +101,9 @@ class GetDeploymentUsageResponse(BaseModel):
|
|
|
88
101
|
return cls.model_validate(obj)
|
|
89
102
|
|
|
90
103
|
_obj = cls.model_validate({
|
|
91
|
-
"values": [DeploymentUsage.from_dict(_item) for _item in obj["values"]] if obj.get("values") is not None else None
|
|
104
|
+
"values": [DeploymentUsage.from_dict(_item) for _item in obj["values"]] if obj.get("values") is not None else None,
|
|
105
|
+
"availability": obj.get("availability"),
|
|
106
|
+
"last_sample_at": obj.get("last_sample_at")
|
|
92
107
|
})
|
|
93
108
|
return _obj
|
|
94
109
|
|
|
@@ -20,11 +20,13 @@ import json
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
23
24
|
from platform_api_python_client.models.backend_protocol import BackendProtocol
|
|
24
25
|
from platform_api_python_client.models.deployment_status import DeploymentStatus
|
|
25
26
|
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
26
27
|
from platform_api_python_client.models.dynamo_communications_output import DynamoCommunicationsOutput
|
|
27
28
|
from platform_api_python_client.models.dynamo_serving_mode import DynamoServingMode
|
|
29
|
+
from platform_api_python_client.models.dynamo_weight_transfer_configuration import DynamoWeightTransferConfiguration
|
|
28
30
|
from platform_api_python_client.models.dynamo_worker_pools import DynamoWorkerPools
|
|
29
31
|
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
30
32
|
from typing import Optional, Set
|
|
@@ -49,10 +51,13 @@ class GetDynamoDeploymentResponse(BaseModel):
|
|
|
49
51
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
50
52
|
priority: Optional[StrictStr] = None
|
|
51
53
|
volume_mounts: Optional[List[VolumeMount]] = None
|
|
54
|
+
hf_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
52
55
|
serving_mode: Optional[DynamoServingMode] = None
|
|
53
56
|
worker_pools: Optional[DynamoWorkerPools] = None
|
|
54
57
|
communications: Optional[DynamoCommunicationsOutput] = None
|
|
58
|
+
weight_transfer: Optional[DynamoWeightTransferConfiguration] = None
|
|
55
59
|
model: StrictStr
|
|
60
|
+
model_revision: Optional[StrictStr] = None
|
|
56
61
|
served_model_name: Optional[StrictStr] = None
|
|
57
62
|
runtime_version: Optional[StrictStr] = None
|
|
58
63
|
min_replicas: StrictInt = Field(description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.")
|
|
@@ -61,12 +66,15 @@ class GetDynamoDeploymentResponse(BaseModel):
|
|
|
61
66
|
cooldown_period: Optional[StrictInt] = None
|
|
62
67
|
extra_args: Optional[StrictStr] = None
|
|
63
68
|
env_vars: Optional[Dict[str, StrictStr]] = None
|
|
69
|
+
env_vars_refs: Optional[Dict[str, Any]] = None
|
|
64
70
|
endpoint_certificate_authority: Optional[StrictStr] = None
|
|
65
71
|
endpoint_bearer_token: Optional[StrictStr] = None
|
|
72
|
+
bearer_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
73
|
+
image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
66
74
|
enable_logging: Optional[StrictBool] = True
|
|
67
75
|
enable_node_model_cache: Optional[StrictBool] = False
|
|
68
76
|
backend_protocol: Optional[BackendProtocol] = None
|
|
69
|
-
__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", "serving_mode", "worker_pools", "communications", "model", "served_model_name", "runtime_version", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "env_vars", "endpoint_certificate_authority", "endpoint_bearer_token", "enable_logging", "enable_node_model_cache", "backend_protocol"]
|
|
77
|
+
__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", "hf_token_ref", "serving_mode", "worker_pools", "communications", "weight_transfer", "model", "model_revision", "served_model_name", "runtime_version", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "env_vars", "env_vars_refs", "endpoint_certificate_authority", "endpoint_bearer_token", "bearer_token_ref", "image_pull_ref", "enable_logging", "enable_node_model_cache", "backend_protocol"]
|
|
70
78
|
|
|
71
79
|
model_config = ConfigDict(
|
|
72
80
|
populate_by_name=True,
|
|
@@ -120,6 +128,9 @@ class GetDynamoDeploymentResponse(BaseModel):
|
|
|
120
128
|
# override the default output from pydantic by calling `to_dict()` of communications
|
|
121
129
|
if self.communications:
|
|
122
130
|
_dict['communications'] = self.communications.to_dict()
|
|
131
|
+
# override the default output from pydantic by calling `to_dict()` of weight_transfer
|
|
132
|
+
if self.weight_transfer:
|
|
133
|
+
_dict['weight_transfer'] = self.weight_transfer.to_dict()
|
|
123
134
|
# set to None if image_url (nullable) is None
|
|
124
135
|
# and model_fields_set contains the field
|
|
125
136
|
if self.image_url is None and "image_url" in self.model_fields_set:
|
|
@@ -140,6 +151,11 @@ class GetDynamoDeploymentResponse(BaseModel):
|
|
|
140
151
|
if self.priority is None and "priority" in self.model_fields_set:
|
|
141
152
|
_dict['priority'] = None
|
|
142
153
|
|
|
154
|
+
# set to None if hf_token_ref (nullable) is None
|
|
155
|
+
# and model_fields_set contains the field
|
|
156
|
+
if self.hf_token_ref is None and "hf_token_ref" in self.model_fields_set:
|
|
157
|
+
_dict['hf_token_ref'] = None
|
|
158
|
+
|
|
143
159
|
# set to None if worker_pools (nullable) is None
|
|
144
160
|
# and model_fields_set contains the field
|
|
145
161
|
if self.worker_pools is None and "worker_pools" in self.model_fields_set:
|
|
@@ -150,6 +166,16 @@ class GetDynamoDeploymentResponse(BaseModel):
|
|
|
150
166
|
if self.communications is None and "communications" in self.model_fields_set:
|
|
151
167
|
_dict['communications'] = None
|
|
152
168
|
|
|
169
|
+
# set to None if weight_transfer (nullable) is None
|
|
170
|
+
# and model_fields_set contains the field
|
|
171
|
+
if self.weight_transfer is None and "weight_transfer" in self.model_fields_set:
|
|
172
|
+
_dict['weight_transfer'] = None
|
|
173
|
+
|
|
174
|
+
# set to None if model_revision (nullable) is None
|
|
175
|
+
# and model_fields_set contains the field
|
|
176
|
+
if self.model_revision is None and "model_revision" in self.model_fields_set:
|
|
177
|
+
_dict['model_revision'] = None
|
|
178
|
+
|
|
153
179
|
# set to None if served_model_name (nullable) is None
|
|
154
180
|
# and model_fields_set contains the field
|
|
155
181
|
if self.served_model_name is None and "served_model_name" in self.model_fields_set:
|
|
@@ -185,6 +211,16 @@ class GetDynamoDeploymentResponse(BaseModel):
|
|
|
185
211
|
if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set:
|
|
186
212
|
_dict['endpoint_bearer_token'] = None
|
|
187
213
|
|
|
214
|
+
# set to None if bearer_token_ref (nullable) is None
|
|
215
|
+
# and model_fields_set contains the field
|
|
216
|
+
if self.bearer_token_ref is None and "bearer_token_ref" in self.model_fields_set:
|
|
217
|
+
_dict['bearer_token_ref'] = None
|
|
218
|
+
|
|
219
|
+
# set to None if image_pull_ref (nullable) is None
|
|
220
|
+
# and model_fields_set contains the field
|
|
221
|
+
if self.image_pull_ref is None and "image_pull_ref" in self.model_fields_set:
|
|
222
|
+
_dict['image_pull_ref'] = None
|
|
223
|
+
|
|
188
224
|
return _dict
|
|
189
225
|
|
|
190
226
|
@classmethod
|
|
@@ -212,10 +248,13 @@ class GetDynamoDeploymentResponse(BaseModel):
|
|
|
212
248
|
"user_annotations": obj.get("user_annotations"),
|
|
213
249
|
"priority": obj.get("priority"),
|
|
214
250
|
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
|
|
251
|
+
"hf_token_ref": obj.get("hf_token_ref"),
|
|
215
252
|
"serving_mode": obj.get("serving_mode"),
|
|
216
253
|
"worker_pools": DynamoWorkerPools.from_dict(obj["worker_pools"]) if obj.get("worker_pools") is not None else None,
|
|
217
254
|
"communications": DynamoCommunicationsOutput.from_dict(obj["communications"]) if obj.get("communications") is not None else None,
|
|
255
|
+
"weight_transfer": DynamoWeightTransferConfiguration.from_dict(obj["weight_transfer"]) if obj.get("weight_transfer") is not None else None,
|
|
218
256
|
"model": obj.get("model"),
|
|
257
|
+
"model_revision": obj.get("model_revision"),
|
|
219
258
|
"served_model_name": obj.get("served_model_name"),
|
|
220
259
|
"runtime_version": obj.get("runtime_version"),
|
|
221
260
|
"min_replicas": obj.get("min_replicas"),
|
|
@@ -224,8 +263,11 @@ class GetDynamoDeploymentResponse(BaseModel):
|
|
|
224
263
|
"cooldown_period": obj.get("cooldown_period"),
|
|
225
264
|
"extra_args": obj.get("extra_args"),
|
|
226
265
|
"env_vars": obj.get("env_vars"),
|
|
266
|
+
"env_vars_refs": obj.get("env_vars_refs"),
|
|
227
267
|
"endpoint_certificate_authority": obj.get("endpoint_certificate_authority"),
|
|
228
268
|
"endpoint_bearer_token": obj.get("endpoint_bearer_token"),
|
|
269
|
+
"bearer_token_ref": obj.get("bearer_token_ref"),
|
|
270
|
+
"image_pull_ref": obj.get("image_pull_ref"),
|
|
229
271
|
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
|
|
230
272
|
"enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False,
|
|
231
273
|
"backend_protocol": obj.get("backend_protocol")
|