platform-api-python-client 4.28.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 +43 -10
- platform_api_python_client/api/external_api.py +6332 -1348
- platform_api_python_client/api_client.py +1 -1
- platform_api_python_client/configuration.py +1 -1
- platform_api_python_client/models/__init__.py +42 -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/cloud_provider.py +5 -0
- platform_api_python_client/models/cluster_credential.py +2 -2
- platform_api_python_client/models/create_compute_deployment_request.py +40 -7
- platform_api_python_client/models/create_dynamo_deployment_request.py +97 -6
- platform_api_python_client/models/create_inference_v3_deployment_request.py +59 -2
- platform_api_python_client/models/create_job_deployment_request.py +43 -10
- platform_api_python_client/models/create_object_volume_request.py +19 -19
- platform_api_python_client/models/deployment_response.py +23 -23
- platform_api_python_client/models/deployment_type.py +14 -0
- platform_api_python_client/models/{c_serve_recipe_perf.py → dynamo_communications_input.py} +12 -19
- platform_api_python_client/models/dynamo_communications_output.py +91 -0
- platform_api_python_client/models/dynamo_image.py +105 -0
- platform_api_python_client/models/dynamo_kv_transfer_configuration.py +88 -0
- platform_api_python_client/models/dynamo_kv_transfer_policy.py +37 -0
- 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 +37 -17
- platform_api_python_client/models/dynamo_worker_pools.py +23 -16
- 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 +45 -4
- platform_api_python_client/models/get_deployment_response.py +26 -2
- platform_api_python_client/models/get_deployment_usage_response.py +19 -4
- platform_api_python_client/models/get_dynamo_deployment_response.py +89 -5
- platform_api_python_client/models/get_inference_deployment_response.py +25 -1
- platform_api_python_client/models/get_inference_v3_deployment_response.py +67 -2
- platform_api_python_client/models/get_job_deployment_response.py +52 -11
- platform_api_python_client/models/get_object_volume_response.py +2 -16
- platform_api_python_client/models/hardware_instance_response.py +6 -4
- 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/list_insights_response.py +95 -0
- platform_api_python_client/models/metric.py +13 -0
- platform_api_python_client/models/pool.py +116 -0
- platform_api_python_client/models/unified_get_compute_deployment_response.py +177 -0
- 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/unified_get_job_deployment_response.py +204 -0
- 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/unified_write_inference_v3_deployment_request.py +207 -0
- 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/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.37.1.dist-info}/METADATA +1 -1
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/RECORD +76 -43
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/WHEEL +1 -1
- platform_api_python_client/models/create_c_serve_v3_deployment_request.py +0 -182
- platform_api_python_client/models/get_c_serve_v2_deployment_response.py +0 -169
- platform_api_python_client/models/get_c_serve_v3_deployment_response.py +0 -170
- {platform_api_python_client-4.28.0.dist-info → platform_api_python_client-4.37.1.dist-info}/top_level.txt +0 -0
|
@@ -19,15 +19,15 @@ import pprint
|
|
|
19
19
|
import re # noqa: F401
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
21
21
|
from typing import Optional
|
|
22
|
-
from platform_api_python_client.models.get_c_serve_v3_deployment_response import GetCServeV3DeploymentResponse
|
|
23
22
|
from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse
|
|
24
23
|
from platform_api_python_client.models.get_dynamo_deployment_response import GetDynamoDeploymentResponse
|
|
25
24
|
from platform_api_python_client.models.get_inference_v3_deployment_response import GetInferenceV3DeploymentResponse
|
|
25
|
+
from platform_api_python_client.models.get_job_deployment_response import GetJobDeploymentResponse
|
|
26
26
|
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
|
27
27
|
from typing_extensions import Literal, Self
|
|
28
28
|
from pydantic import Field
|
|
29
29
|
|
|
30
|
-
DEPLOYMENTRESPONSE_ANY_OF_SCHEMAS = ["
|
|
30
|
+
DEPLOYMENTRESPONSE_ANY_OF_SCHEMAS = ["GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse", "GetJobDeploymentResponse"]
|
|
31
31
|
|
|
32
32
|
class DeploymentResponse(BaseModel):
|
|
33
33
|
"""
|
|
@@ -36,17 +36,17 @@ class DeploymentResponse(BaseModel):
|
|
|
36
36
|
|
|
37
37
|
# data type: GetDynamoDeploymentResponse
|
|
38
38
|
anyof_schema_1_validator: Optional[GetDynamoDeploymentResponse] = None
|
|
39
|
-
# data type: GetCServeV3DeploymentResponse
|
|
40
|
-
anyof_schema_2_validator: Optional[GetCServeV3DeploymentResponse] = None
|
|
41
39
|
# data type: GetInferenceV3DeploymentResponse
|
|
42
|
-
|
|
40
|
+
anyof_schema_2_validator: Optional[GetInferenceV3DeploymentResponse] = None
|
|
43
41
|
# data type: GetComputeDeploymentResponse
|
|
44
|
-
|
|
42
|
+
anyof_schema_3_validator: Optional[GetComputeDeploymentResponse] = None
|
|
43
|
+
# data type: GetJobDeploymentResponse
|
|
44
|
+
anyof_schema_4_validator: Optional[GetJobDeploymentResponse] = None
|
|
45
45
|
if TYPE_CHECKING:
|
|
46
|
-
actual_instance: Optional[Union[
|
|
46
|
+
actual_instance: Optional[Union[GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse]] = None
|
|
47
47
|
else:
|
|
48
48
|
actual_instance: Any = None
|
|
49
|
-
any_of_schemas: Set[str] = { "
|
|
49
|
+
any_of_schemas: Set[str] = { "GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse", "GetJobDeploymentResponse" }
|
|
50
50
|
|
|
51
51
|
model_config = {
|
|
52
52
|
"validate_assignment": True,
|
|
@@ -73,12 +73,6 @@ class DeploymentResponse(BaseModel):
|
|
|
73
73
|
else:
|
|
74
74
|
return v
|
|
75
75
|
|
|
76
|
-
# validate data type: GetCServeV3DeploymentResponse
|
|
77
|
-
if not isinstance(v, GetCServeV3DeploymentResponse):
|
|
78
|
-
error_messages.append(f"Error! Input type `{type(v)}` is not `GetCServeV3DeploymentResponse`")
|
|
79
|
-
else:
|
|
80
|
-
return v
|
|
81
|
-
|
|
82
76
|
# validate data type: GetInferenceV3DeploymentResponse
|
|
83
77
|
if not isinstance(v, GetInferenceV3DeploymentResponse):
|
|
84
78
|
error_messages.append(f"Error! Input type `{type(v)}` is not `GetInferenceV3DeploymentResponse`")
|
|
@@ -91,9 +85,15 @@ class DeploymentResponse(BaseModel):
|
|
|
91
85
|
else:
|
|
92
86
|
return v
|
|
93
87
|
|
|
88
|
+
# validate data type: GetJobDeploymentResponse
|
|
89
|
+
if not isinstance(v, GetJobDeploymentResponse):
|
|
90
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GetJobDeploymentResponse`")
|
|
91
|
+
else:
|
|
92
|
+
return v
|
|
93
|
+
|
|
94
94
|
if error_messages:
|
|
95
95
|
# no match
|
|
96
|
-
raise ValueError("No match found when setting the actual_instance in DeploymentResponse with anyOf schemas:
|
|
96
|
+
raise ValueError("No match found when setting the actual_instance in DeploymentResponse with anyOf schemas: GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse. Details: " + ", ".join(error_messages))
|
|
97
97
|
else:
|
|
98
98
|
return v
|
|
99
99
|
|
|
@@ -112,28 +112,28 @@ class DeploymentResponse(BaseModel):
|
|
|
112
112
|
return instance
|
|
113
113
|
except (ValidationError, ValueError) as e:
|
|
114
114
|
error_messages.append(str(e))
|
|
115
|
-
# anyof_schema_2_validator: Optional[
|
|
115
|
+
# anyof_schema_2_validator: Optional[GetInferenceV3DeploymentResponse] = None
|
|
116
116
|
try:
|
|
117
|
-
instance.actual_instance =
|
|
117
|
+
instance.actual_instance = GetInferenceV3DeploymentResponse.from_json(json_str)
|
|
118
118
|
return instance
|
|
119
119
|
except (ValidationError, ValueError) as e:
|
|
120
120
|
error_messages.append(str(e))
|
|
121
|
-
# anyof_schema_3_validator: Optional[
|
|
121
|
+
# anyof_schema_3_validator: Optional[GetComputeDeploymentResponse] = None
|
|
122
122
|
try:
|
|
123
|
-
instance.actual_instance =
|
|
123
|
+
instance.actual_instance = GetComputeDeploymentResponse.from_json(json_str)
|
|
124
124
|
return instance
|
|
125
125
|
except (ValidationError, ValueError) as e:
|
|
126
126
|
error_messages.append(str(e))
|
|
127
|
-
# anyof_schema_4_validator: Optional[
|
|
127
|
+
# anyof_schema_4_validator: Optional[GetJobDeploymentResponse] = None
|
|
128
128
|
try:
|
|
129
|
-
instance.actual_instance =
|
|
129
|
+
instance.actual_instance = GetJobDeploymentResponse.from_json(json_str)
|
|
130
130
|
return instance
|
|
131
131
|
except (ValidationError, ValueError) as e:
|
|
132
132
|
error_messages.append(str(e))
|
|
133
133
|
|
|
134
134
|
if error_messages:
|
|
135
135
|
# no match
|
|
136
|
-
raise ValueError("No match found when deserializing the JSON string into DeploymentResponse with anyOf schemas:
|
|
136
|
+
raise ValueError("No match found when deserializing the JSON string into DeploymentResponse with anyOf schemas: GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse. Details: " + ", ".join(error_messages))
|
|
137
137
|
else:
|
|
138
138
|
return instance
|
|
139
139
|
|
|
@@ -147,7 +147,7 @@ class DeploymentResponse(BaseModel):
|
|
|
147
147
|
else:
|
|
148
148
|
return json.dumps(self.actual_instance)
|
|
149
149
|
|
|
150
|
-
def to_dict(self) -> Optional[Union[Dict[str, Any],
|
|
150
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse, GetJobDeploymentResponse]]:
|
|
151
151
|
"""Returns the dict representation of the actual instance"""
|
|
152
152
|
if self.actual_instance is None:
|
|
153
153
|
return None
|
|
@@ -40,10 +40,24 @@ class DeploymentType(str, Enum):
|
|
|
40
40
|
RAG = 'rag'
|
|
41
41
|
JOB = 'job'
|
|
42
42
|
DYNAMO = 'dynamo'
|
|
43
|
+
CCL_COMPUTE = 'ccl_compute'
|
|
44
|
+
CCL_INFERENCE = 'ccl_inference'
|
|
45
|
+
CCL_JOB = 'ccl_job'
|
|
46
|
+
CCL_DYNAMO = 'ccl_dynamo'
|
|
43
47
|
|
|
44
48
|
@classmethod
|
|
45
49
|
def from_json(cls, json_str: str) -> Self:
|
|
46
50
|
"""Create an instance of DeploymentType from a JSON string"""
|
|
47
51
|
return cls(json.loads(json_str))
|
|
48
52
|
|
|
53
|
+
@classmethod
|
|
54
|
+
def _missing_(cls, value):
|
|
55
|
+
"""Accept a value the server added after this client was generated; it keeps the raw value."""
|
|
56
|
+
if not isinstance(value, str):
|
|
57
|
+
return None
|
|
58
|
+
member = str.__new__(cls, value)
|
|
59
|
+
member._name_ = None
|
|
60
|
+
member._value_ = value
|
|
61
|
+
return member
|
|
62
|
+
|
|
49
63
|
|
|
@@ -17,22 +17,18 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
-
from
|
|
23
|
-
from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe
|
|
22
|
+
from platform_api_python_client.models.dynamo_kv_transfer_configuration import DynamoKvTransferConfiguration
|
|
24
23
|
from typing import Optional, Set
|
|
25
24
|
from typing_extensions import Self
|
|
26
25
|
|
|
27
|
-
class
|
|
26
|
+
class DynamoCommunicationsInput(BaseModel):
|
|
28
27
|
"""
|
|
29
|
-
|
|
28
|
+
DynamoCommunicationsInput
|
|
30
29
|
""" # noqa: E501
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
output_tp: List[Annotated[List[Any], Field(min_length=2, max_length=2)]]
|
|
34
|
-
mean_ttft: List[Annotated[List[Any], Field(min_length=2, max_length=2)]]
|
|
35
|
-
__properties: ClassVar[List[str]] = ["recipe", "hardware_instance_id", "output_tp", "mean_ttft"]
|
|
30
|
+
kv_transfer: DynamoKvTransferConfiguration
|
|
31
|
+
__properties: ClassVar[List[str]] = ["kv_transfer"]
|
|
36
32
|
|
|
37
33
|
model_config = ConfigDict(
|
|
38
34
|
populate_by_name=True,
|
|
@@ -52,7 +48,7 @@ class CServeRecipePerf(BaseModel):
|
|
|
52
48
|
|
|
53
49
|
@classmethod
|
|
54
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
-
"""Create an instance of
|
|
51
|
+
"""Create an instance of DynamoCommunicationsInput from a JSON string"""
|
|
56
52
|
return cls.from_dict(json.loads(json_str))
|
|
57
53
|
|
|
58
54
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -73,14 +69,14 @@ class CServeRecipePerf(BaseModel):
|
|
|
73
69
|
exclude=excluded_fields,
|
|
74
70
|
exclude_none=True,
|
|
75
71
|
)
|
|
76
|
-
# override the default output from pydantic by calling `to_dict()` of
|
|
77
|
-
if self.
|
|
78
|
-
_dict['
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of kv_transfer
|
|
73
|
+
if self.kv_transfer:
|
|
74
|
+
_dict['kv_transfer'] = self.kv_transfer.to_dict()
|
|
79
75
|
return _dict
|
|
80
76
|
|
|
81
77
|
@classmethod
|
|
82
78
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
-
"""Create an instance of
|
|
79
|
+
"""Create an instance of DynamoCommunicationsInput from a dict"""
|
|
84
80
|
if obj is None:
|
|
85
81
|
return None
|
|
86
82
|
|
|
@@ -88,10 +84,7 @@ class CServeRecipePerf(BaseModel):
|
|
|
88
84
|
return cls.model_validate(obj)
|
|
89
85
|
|
|
90
86
|
_obj = cls.model_validate({
|
|
91
|
-
"
|
|
92
|
-
"hardware_instance_id": obj.get("hardware_instance_id"),
|
|
93
|
-
"output_tp": obj.get("output_tp"),
|
|
94
|
-
"mean_ttft": obj.get("mean_ttft")
|
|
87
|
+
"kv_transfer": DynamoKvTransferConfiguration.from_dict(obj["kv_transfer"]) if obj.get("kv_transfer") is not None else None
|
|
95
88
|
})
|
|
96
89
|
return _obj
|
|
97
90
|
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
__properties: ClassVar[List[str]] = ["kv_transfer"]
|
|
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 DynamoCommunicationsOutput 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
|
+
# override the default output from pydantic by calling `to_dict()` of kv_transfer
|
|
73
|
+
if self.kv_transfer:
|
|
74
|
+
_dict['kv_transfer'] = self.kv_transfer.to_dict()
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of DynamoCommunicationsOutput from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
_obj = cls.model_validate({
|
|
87
|
+
"kv_transfer": DynamoKvTransferConfiguration.from_dict(obj["kv_transfer"]) if obj.get("kv_transfer") is not None else None
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
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, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class DynamoImage(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
DynamoImage
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
runtime_version: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Dynamo runtime image tag (for example 1.4.0). Defaults to the platform's current release; GET /prebuilt-images?type=dynamo lists the versions the platform has validated, but any tag may be requested. require_gpu_direct_rdma needs an EFA-capable image. Changing it restarts every component of a running deployment.")
|
|
31
|
+
pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["runtime_version", "pull_ref"]
|
|
33
|
+
|
|
34
|
+
@field_validator('runtime_version')
|
|
35
|
+
def runtime_version_validate_regular_expression(cls, value):
|
|
36
|
+
"""Validates the regular expression"""
|
|
37
|
+
if value is None:
|
|
38
|
+
return value
|
|
39
|
+
|
|
40
|
+
if not re.match(r"^[A-Za-z0-9_][A-Za-z0-9._-]{0,127}$", value):
|
|
41
|
+
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9_][A-Za-z0-9._-]{0,127}$/")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
model_config = ConfigDict(
|
|
45
|
+
populate_by_name=True,
|
|
46
|
+
validate_assignment=True,
|
|
47
|
+
protected_namespaces=(),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def to_str(self) -> str:
|
|
52
|
+
"""Returns the string representation of the model using alias"""
|
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
54
|
+
|
|
55
|
+
def to_json(self) -> str:
|
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
|
57
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
58
|
+
return json.dumps(self.to_dict())
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
62
|
+
"""Create an instance of DynamoImage from a JSON string"""
|
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
|
64
|
+
|
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
+
"""Return the dictionary representation of the model using alias.
|
|
67
|
+
|
|
68
|
+
This has the following differences from calling pydantic's
|
|
69
|
+
`self.model_dump(by_alias=True)`:
|
|
70
|
+
|
|
71
|
+
* `None` is only added to the output dict for nullable fields that
|
|
72
|
+
were set at model initialization. Other fields with value `None`
|
|
73
|
+
are ignored.
|
|
74
|
+
"""
|
|
75
|
+
excluded_fields: Set[str] = set([
|
|
76
|
+
])
|
|
77
|
+
|
|
78
|
+
_dict = self.model_dump(
|
|
79
|
+
by_alias=True,
|
|
80
|
+
exclude=excluded_fields,
|
|
81
|
+
exclude_none=True,
|
|
82
|
+
)
|
|
83
|
+
# set to None if pull_ref (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.pull_ref is None and "pull_ref" in self.model_fields_set:
|
|
86
|
+
_dict['pull_ref'] = None
|
|
87
|
+
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of DynamoImage from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return cls.model_validate(obj)
|
|
98
|
+
|
|
99
|
+
_obj = cls.model_validate({
|
|
100
|
+
"runtime_version": obj.get("runtime_version"),
|
|
101
|
+
"pull_ref": obj.get("pull_ref")
|
|
102
|
+
})
|
|
103
|
+
return _obj
|
|
104
|
+
|
|
105
|
+
|
|
@@ -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
|
|
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
|
+
__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 DynamoKvTransferConfiguration 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 DynamoKvTransferConfiguration 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,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
|
+
|
|
@@ -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
|
+
|