beamlit 0.0.24rc20__py3-none-any.whl → 0.0.25__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- beamlit/agents/chat.py +37 -11
- beamlit/agents/decorator.py +97 -65
- beamlit/api/agents/create_agent.py +9 -14
- beamlit/api/agents/delete_agent.py +22 -1
- beamlit/api/agents/delete_agent_history.py +2 -6
- beamlit/api/agents/get_agent.py +22 -1
- beamlit/api/agents/get_agent_environment_logs.py +11 -11
- beamlit/api/agents/get_agent_history.py +2 -6
- beamlit/api/agents/get_agent_metrics.py +22 -1
- beamlit/api/agents/list_agent_history.py +11 -11
- beamlit/api/agents/list_agents.py +36 -4
- beamlit/api/agents/put_agent_history.py +2 -6
- beamlit/api/agents/update_agent.py +9 -14
- beamlit/api/functions/create_function.py +9 -14
- beamlit/api/functions/delete_function.py +22 -1
- beamlit/api/functions/get_function.py +22 -1
- beamlit/api/functions/get_function_environment_logs.py +11 -11
- beamlit/api/functions/get_function_metrics.py +22 -1
- beamlit/api/functions/list_functions.py +36 -4
- beamlit/api/functions/update_function.py +9 -14
- beamlit/api/history/get_agents_history.py +12 -12
- beamlit/api/history/list_agents_history.py +12 -12
- beamlit/api/integrations/get_integration_connection.py +16 -12
- beamlit/api/integrations/get_integration_connection_model.py +8 -1
- beamlit/api/integrations/get_integration_model.py +8 -1
- beamlit/api/locations/list_locations.py +12 -12
- beamlit/api/models/create_model.py +13 -14
- beamlit/api/models/delete_model.py +22 -1
- beamlit/api/models/get_model.py +22 -1
- beamlit/api/models/get_model_environment_logs.py +11 -11
- beamlit/api/models/get_model_metrics.py +38 -13
- beamlit/api/models/list_models.py +36 -4
- beamlit/api/models/update_model.py +13 -14
- beamlit/api/privateclusters/__init__.py +0 -0
- beamlit/api/{agents/get_agent_deployment_metrics.py → privateclusters/create_private_cluster.py} +28 -55
- beamlit/api/{functions/list_function_deployments.py → privateclusters/delete_private_cluster.py} +38 -37
- beamlit/api/{agents/get_agent_deployment.py → privateclusters/get_private_cluster.py} +40 -44
- beamlit/api/privateclusters/get_private_cluster_health.py +97 -0
- beamlit/api/{agents/list_agent_deployments.py → privateclusters/list_private_clusters.py} +30 -45
- beamlit/api/{models/list_model_deployments.py → privateclusters/update_private_cluster.py} +38 -45
- beamlit/api/privateclusters/update_private_cluster_health.py +97 -0
- beamlit/authentication/device_mode.py +3 -9
- beamlit/common/generate.py +47 -34
- beamlit/common/settings.py +29 -27
- beamlit/deploy/deploy.py +101 -342
- beamlit/deploy/format.py +70 -0
- beamlit/deploy/parser.py +175 -0
- beamlit/functions/decorator.py +8 -11
- beamlit/models/__init__.py +64 -78
- beamlit/models/acl.py +4 -22
- beamlit/models/agent.py +34 -95
- beamlit/models/agent_history.py +7 -5
- beamlit/models/agent_history_event.py +11 -9
- beamlit/models/agent_metadata.py +5 -3
- beamlit/models/agent_spec.py +54 -45
- beamlit/models/api_key.py +14 -14
- beamlit/models/configuration.py +11 -0
- beamlit/models/core_spec.py +45 -32
- beamlit/models/{model_deployment_metrics_query_per_second_per_region_per_code.py → core_spec_configurations.py} +22 -22
- beamlit/models/environment.py +33 -105
- beamlit/models/environment_metadata.py +146 -0
- beamlit/models/environment_spec.py +8 -6
- beamlit/models/function.py +34 -95
- beamlit/models/function_metadata.py +5 -3
- beamlit/models/function_spec.py +53 -40
- beamlit/models/integration_connection.py +31 -137
- beamlit/models/integration_connection_spec.py +6 -4
- beamlit/models/metadata.py +5 -3
- beamlit/models/metadata_labels.py +4 -2
- beamlit/models/model.py +33 -94
- beamlit/models/model_metadata.py +5 -3
- beamlit/models/{function_provider_ref.py → model_private_cluster.py} +23 -14
- beamlit/models/model_provider.py +27 -43
- beamlit/models/model_spec.py +45 -32
- beamlit/models/owner_fields.py +4 -2
- beamlit/models/pending_invitation.py +14 -14
- beamlit/models/pod_template_spec.py +4 -2
- beamlit/models/policy.py +33 -159
- beamlit/models/policy_spec.py +24 -28
- beamlit/models/private_cluster.py +183 -0
- beamlit/models/{model_provider_ref.py → private_location.py} +7 -16
- beamlit/models/resource_deployment_metrics.py +0 -108
- beamlit/models/resource_environment_metrics.py +143 -71
- beamlit/models/{resource_deployment_metrics_inference_per_region.py → resource_environment_metrics_inference_per_region.py} +5 -5
- beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +9 -11
- beamlit/models/{resource_deployment_metrics_query_per_region_per_code.py → resource_environment_metrics_query_per_region_per_code.py} +5 -5
- beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +5 -3
- beamlit/models/resource_log.py +4 -2
- beamlit/models/runtime.py +20 -2
- beamlit/models/serverless_config.py +28 -21
- beamlit/models/spec_configuration.py +7 -5
- beamlit/models/store_agent.py +14 -14
- beamlit/models/store_function.py +14 -14
- beamlit/models/time_fields.py +4 -2
- beamlit/models/websocket_channel.py +4 -2
- beamlit/models/workspace.py +23 -14
- beamlit/run.py +0 -1
- beamlit/serve/app.py +1 -0
- beamlit/serve/middlewares/accesslog.py +3 -1
- {beamlit-0.0.24rc20.dist-info → beamlit-0.0.25.dist-info}/METADATA +1 -1
- beamlit-0.0.25.dist-info/RECORD +243 -0
- beamlit/api/agents/delete_agent_deployment.py +0 -163
- beamlit/api/agents/delete_agent_deployment_history.py +0 -172
- beamlit/api/agents/get_agent_deployment_history.py +0 -172
- beamlit/api/agents/get_agent_deployment_logs.py +0 -164
- beamlit/api/agents/list_agent_deployment_history.py +0 -164
- beamlit/api/agents/put_agent_deployment.py +0 -185
- beamlit/api/agents/put_agent_deployment_history.py +0 -198
- beamlit/api/functions/delete_function_deployment.py +0 -163
- beamlit/api/functions/get_function_deployment.py +0 -163
- beamlit/api/functions/get_function_deployment_logs.py +0 -164
- beamlit/api/functions/get_function_deployment_metrics.py +0 -159
- beamlit/api/functions/put_function_deployment.py +0 -185
- beamlit/api/models/delete_model_deployment.py +0 -171
- beamlit/api/models/get_model_deployment.py +0 -171
- beamlit/api/models/get_model_deployment_logs.py +0 -168
- beamlit/api/models/get_model_deployment_metrics.py +0 -163
- beamlit/api/models/put_model_deployment.py +0 -193
- beamlit/models/agent_configuration.py +0 -70
- beamlit/models/agent_deployment.py +0 -340
- beamlit/models/agent_deployment_configuration.py +0 -45
- beamlit/models/agent_deployment_configuration_type_0.py +0 -43
- beamlit/models/agent_deployment_history.py +0 -185
- beamlit/models/agent_deployment_history_event.py +0 -133
- beamlit/models/agent_deployment_pod_template.py +0 -45
- beamlit/models/agent_deployment_pod_template_type_0.py +0 -43
- beamlit/models/agent_with_deployments.py +0 -176
- beamlit/models/authentication_provider_model.py +0 -144
- beamlit/models/authentication_provider_organization.py +0 -88
- beamlit/models/deployment_configuration.py +0 -70
- beamlit/models/deployment_configurations.py +0 -58
- beamlit/models/deployment_serverless_config.py +0 -131
- beamlit/models/deployment_serverless_config_type_0.py +0 -220
- beamlit/models/function_configuration.py +0 -70
- beamlit/models/function_deployment.py +0 -340
- beamlit/models/function_deployment_configuration.py +0 -45
- beamlit/models/function_deployment_configuration_type_0.py +0 -43
- beamlit/models/function_deployment_pod_template.py +0 -45
- beamlit/models/function_deployment_pod_template_type_0.py +0 -43
- beamlit/models/function_with_deployments.py +0 -176
- beamlit/models/integration.py +0 -198
- beamlit/models/integration_config.py +0 -45
- beamlit/models/integration_secret.py +0 -61
- beamlit/models/labels_type_0.py +0 -45
- beamlit/models/location.py +0 -122
- beamlit/models/model_deployment.py +0 -296
- beamlit/models/model_deployment_log.py +0 -70
- beamlit/models/model_deployment_metrics.py +0 -172
- beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +0 -77
- beamlit/models/model_deployment_pod_template.py +0 -45
- beamlit/models/model_deployment_pod_template_type_0.py +0 -43
- beamlit/models/model_metrics.py +0 -96
- beamlit/models/model_with_deployments.py +0 -176
- beamlit/models/resource_deployment_log.py +0 -70
- beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +0 -79
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region_type_0.py +0 -79
- beamlit/models/resource_deployment_metrics_query_per_region_per_code_type_0.py +0 -73
- beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code_type_0.py +0 -73
- beamlit/models/runtime_readiness_probe_type_0.py +0 -43
- beamlit/models/runtime_type_0.py +0 -111
- beamlit/models/runtime_type_0_readiness_probe.py +0 -43
- beamlit/models/runtime_type_0_readiness_probe_type_0.py +0 -43
- beamlit/models/runtime_type_0_resources.py +0 -59
- beamlit/models/standard_fields_dynamo_db.py +0 -88
- beamlit/models/store_agent_configuration.py +0 -97
- beamlit/models/store_agent_labels_type_0.py +0 -43
- beamlit/models/store_function_configuration.py +0 -97
- beamlit/models/store_function_labels_type_0.py +0 -43
- beamlit-0.0.24rc20.dist-info/RECORD +0 -303
- {beamlit-0.0.24rc20.dist-info → beamlit-0.0.25.dist-info}/WHEEL +0 -0
@@ -1,43 +0,0 @@
|
|
1
|
-
from typing import Any, Type, TypeVar
|
2
|
-
|
3
|
-
from attrs import define as _attrs_define
|
4
|
-
from attrs import field as _attrs_field
|
5
|
-
|
6
|
-
T = TypeVar("T", bound="ModelDeploymentPodTemplateType0")
|
7
|
-
|
8
|
-
|
9
|
-
@_attrs_define
|
10
|
-
class ModelDeploymentPodTemplateType0:
|
11
|
-
"""The pod template for the deployment. Should be a Kubernetes PodTemplateSpec"""
|
12
|
-
|
13
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
14
|
-
|
15
|
-
def to_dict(self) -> dict[str, Any]:
|
16
|
-
field_dict: dict[str, Any] = {}
|
17
|
-
field_dict.update(self.additional_properties)
|
18
|
-
|
19
|
-
return field_dict
|
20
|
-
|
21
|
-
@classmethod
|
22
|
-
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
23
|
-
d = src_dict.copy()
|
24
|
-
model_deployment_pod_template_type_0 = cls()
|
25
|
-
|
26
|
-
model_deployment_pod_template_type_0.additional_properties = d
|
27
|
-
return model_deployment_pod_template_type_0
|
28
|
-
|
29
|
-
@property
|
30
|
-
def additional_keys(self) -> list[str]:
|
31
|
-
return list(self.additional_properties.keys())
|
32
|
-
|
33
|
-
def __getitem__(self, key: str) -> Any:
|
34
|
-
return self.additional_properties[key]
|
35
|
-
|
36
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
37
|
-
self.additional_properties[key] = value
|
38
|
-
|
39
|
-
def __delitem__(self, key: str) -> None:
|
40
|
-
del self.additional_properties[key]
|
41
|
-
|
42
|
-
def __contains__(self, key: str) -> bool:
|
43
|
-
return key in self.additional_properties
|
beamlit/models/model_metrics.py
DELETED
@@ -1,96 +0,0 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
2
|
-
|
3
|
-
from attrs import define as _attrs_define
|
4
|
-
from attrs import field as _attrs_field
|
5
|
-
|
6
|
-
from ..types import UNSET, Unset
|
7
|
-
|
8
|
-
if TYPE_CHECKING:
|
9
|
-
from ..models.metric import Metric
|
10
|
-
from ..models.qps import QPS
|
11
|
-
|
12
|
-
|
13
|
-
T = TypeVar("T", bound="ModelMetrics")
|
14
|
-
|
15
|
-
|
16
|
-
@_attrs_define
|
17
|
-
class ModelMetrics:
|
18
|
-
"""Metrics for a single model
|
19
|
-
|
20
|
-
Attributes:
|
21
|
-
inference_per_second_global (Union[Unset, list['Metric']]): Array of metrics
|
22
|
-
query_per_second_per_region (Union[Unset, QPS]): Query per second per element, can be per response status code
|
23
|
-
(e.g. 200, 400) or per location
|
24
|
-
"""
|
25
|
-
|
26
|
-
inference_per_second_global: Union[Unset, list["Metric"]] = UNSET
|
27
|
-
query_per_second_per_region: Union[Unset, "QPS"] = UNSET
|
28
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
29
|
-
|
30
|
-
def to_dict(self) -> dict[str, Any]:
|
31
|
-
inference_per_second_global: Union[Unset, list[dict[str, Any]]] = UNSET
|
32
|
-
if not isinstance(self.inference_per_second_global, Unset):
|
33
|
-
inference_per_second_global = []
|
34
|
-
for componentsschemas_array_metric_item_data in self.inference_per_second_global:
|
35
|
-
componentsschemas_array_metric_item = componentsschemas_array_metric_item_data.to_dict()
|
36
|
-
inference_per_second_global.append(componentsschemas_array_metric_item)
|
37
|
-
|
38
|
-
query_per_second_per_region: Union[Unset, dict[str, Any]] = UNSET
|
39
|
-
if not isinstance(self.query_per_second_per_region, Unset):
|
40
|
-
query_per_second_per_region = self.query_per_second_per_region.to_dict()
|
41
|
-
|
42
|
-
field_dict: dict[str, Any] = {}
|
43
|
-
field_dict.update(self.additional_properties)
|
44
|
-
field_dict.update({})
|
45
|
-
if inference_per_second_global is not UNSET:
|
46
|
-
field_dict["inference_per_second_global"] = inference_per_second_global
|
47
|
-
if query_per_second_per_region is not UNSET:
|
48
|
-
field_dict["query_per_second_per_region"] = query_per_second_per_region
|
49
|
-
|
50
|
-
return field_dict
|
51
|
-
|
52
|
-
@classmethod
|
53
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
54
|
-
from ..models.metric import Metric
|
55
|
-
from ..models.qps import QPS
|
56
|
-
|
57
|
-
if not src_dict:
|
58
|
-
return None
|
59
|
-
d = src_dict.copy()
|
60
|
-
inference_per_second_global = []
|
61
|
-
_inference_per_second_global = d.pop("inference_per_second_global", UNSET)
|
62
|
-
for componentsschemas_array_metric_item_data in _inference_per_second_global or []:
|
63
|
-
componentsschemas_array_metric_item = Metric.from_dict(componentsschemas_array_metric_item_data)
|
64
|
-
|
65
|
-
inference_per_second_global.append(componentsschemas_array_metric_item)
|
66
|
-
|
67
|
-
_query_per_second_per_region = d.pop("query_per_second_per_region", UNSET)
|
68
|
-
query_per_second_per_region: Union[Unset, QPS]
|
69
|
-
if isinstance(_query_per_second_per_region, Unset):
|
70
|
-
query_per_second_per_region = UNSET
|
71
|
-
else:
|
72
|
-
query_per_second_per_region = QPS.from_dict(_query_per_second_per_region)
|
73
|
-
|
74
|
-
model_metrics = cls(
|
75
|
-
inference_per_second_global=inference_per_second_global,
|
76
|
-
query_per_second_per_region=query_per_second_per_region,
|
77
|
-
)
|
78
|
-
|
79
|
-
model_metrics.additional_properties = d
|
80
|
-
return model_metrics
|
81
|
-
|
82
|
-
@property
|
83
|
-
def additional_keys(self) -> list[str]:
|
84
|
-
return list(self.additional_properties.keys())
|
85
|
-
|
86
|
-
def __getitem__(self, key: str) -> Any:
|
87
|
-
return self.additional_properties[key]
|
88
|
-
|
89
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
90
|
-
self.additional_properties[key] = value
|
91
|
-
|
92
|
-
def __delitem__(self, key: str) -> None:
|
93
|
-
del self.additional_properties[key]
|
94
|
-
|
95
|
-
def __contains__(self, key: str) -> bool:
|
96
|
-
return key in self.additional_properties
|
@@ -1,176 +0,0 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
2
|
-
|
3
|
-
from attrs import define as _attrs_define
|
4
|
-
from attrs import field as _attrs_field
|
5
|
-
|
6
|
-
from ..types import UNSET, Unset
|
7
|
-
|
8
|
-
if TYPE_CHECKING:
|
9
|
-
from ..models.labels_type_0 import LabelsType0
|
10
|
-
from ..models.model_deployment import ModelDeployment
|
11
|
-
|
12
|
-
|
13
|
-
T = TypeVar("T", bound="ModelWithDeployments")
|
14
|
-
|
15
|
-
|
16
|
-
@_attrs_define
|
17
|
-
class ModelWithDeployments:
|
18
|
-
"""Logical object representing a model but with deployment definition inside
|
19
|
-
|
20
|
-
Attributes:
|
21
|
-
created_at (Union[Unset, str]): The date and time when the resource was created
|
22
|
-
created_by (Union[Unset, str]): The user or service account who created the resource
|
23
|
-
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
24
|
-
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
25
|
-
display_name (Union[Unset, str]): Model display name
|
26
|
-
labels (Union['LabelsType0', None, Unset]): Labels
|
27
|
-
name (Union[Unset, str]): Model name
|
28
|
-
workspace (Union[Unset, str]): The workspace the model belongs to
|
29
|
-
deployments (Union[Unset, list['ModelDeployment']]):
|
30
|
-
"""
|
31
|
-
|
32
|
-
created_at: Union[Unset, str] = UNSET
|
33
|
-
created_by: Union[Unset, str] = UNSET
|
34
|
-
updated_at: Union[Unset, str] = UNSET
|
35
|
-
updated_by: Union[Unset, str] = UNSET
|
36
|
-
display_name: Union[Unset, str] = UNSET
|
37
|
-
labels: Union["LabelsType0", None, Unset] = UNSET
|
38
|
-
name: Union[Unset, str] = UNSET
|
39
|
-
workspace: Union[Unset, str] = UNSET
|
40
|
-
deployments: Union[Unset, list["ModelDeployment"]] = UNSET
|
41
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
42
|
-
|
43
|
-
def to_dict(self) -> dict[str, Any]:
|
44
|
-
from ..models.labels_type_0 import LabelsType0
|
45
|
-
|
46
|
-
created_at = self.created_at
|
47
|
-
|
48
|
-
created_by = self.created_by
|
49
|
-
|
50
|
-
updated_at = self.updated_at
|
51
|
-
|
52
|
-
updated_by = self.updated_by
|
53
|
-
|
54
|
-
display_name = self.display_name
|
55
|
-
|
56
|
-
labels: Union[None, Unset, dict[str, Any]]
|
57
|
-
if isinstance(self.labels, Unset):
|
58
|
-
labels = UNSET
|
59
|
-
elif isinstance(self.labels, LabelsType0):
|
60
|
-
labels = self.labels.to_dict()
|
61
|
-
else:
|
62
|
-
labels = self.labels
|
63
|
-
|
64
|
-
name = self.name
|
65
|
-
|
66
|
-
workspace = self.workspace
|
67
|
-
|
68
|
-
deployments: Union[Unset, list[dict[str, Any]]] = UNSET
|
69
|
-
if not isinstance(self.deployments, Unset):
|
70
|
-
deployments = []
|
71
|
-
for componentsschemas_model_deployments_item_data in self.deployments:
|
72
|
-
componentsschemas_model_deployments_item = componentsschemas_model_deployments_item_data.to_dict()
|
73
|
-
deployments.append(componentsschemas_model_deployments_item)
|
74
|
-
|
75
|
-
field_dict: dict[str, Any] = {}
|
76
|
-
field_dict.update(self.additional_properties)
|
77
|
-
field_dict.update({})
|
78
|
-
if created_at is not UNSET:
|
79
|
-
field_dict["created_at"] = created_at
|
80
|
-
if created_by is not UNSET:
|
81
|
-
field_dict["created_by"] = created_by
|
82
|
-
if updated_at is not UNSET:
|
83
|
-
field_dict["updated_at"] = updated_at
|
84
|
-
if updated_by is not UNSET:
|
85
|
-
field_dict["updated_by"] = updated_by
|
86
|
-
if display_name is not UNSET:
|
87
|
-
field_dict["display_name"] = display_name
|
88
|
-
if labels is not UNSET:
|
89
|
-
field_dict["labels"] = labels
|
90
|
-
if name is not UNSET:
|
91
|
-
field_dict["name"] = name
|
92
|
-
if workspace is not UNSET:
|
93
|
-
field_dict["workspace"] = workspace
|
94
|
-
if deployments is not UNSET:
|
95
|
-
field_dict["deployments"] = deployments
|
96
|
-
|
97
|
-
return field_dict
|
98
|
-
|
99
|
-
@classmethod
|
100
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
101
|
-
from ..models.labels_type_0 import LabelsType0
|
102
|
-
from ..models.model_deployment import ModelDeployment
|
103
|
-
|
104
|
-
if not src_dict:
|
105
|
-
return None
|
106
|
-
d = src_dict.copy()
|
107
|
-
created_at = d.pop("created_at", UNSET)
|
108
|
-
|
109
|
-
created_by = d.pop("created_by", UNSET)
|
110
|
-
|
111
|
-
updated_at = d.pop("updated_at", UNSET)
|
112
|
-
|
113
|
-
updated_by = d.pop("updated_by", UNSET)
|
114
|
-
|
115
|
-
display_name = d.pop("display_name", UNSET)
|
116
|
-
|
117
|
-
def _parse_labels(data: object) -> Union["LabelsType0", None, Unset]:
|
118
|
-
if data is None:
|
119
|
-
return data
|
120
|
-
if isinstance(data, Unset):
|
121
|
-
return data
|
122
|
-
try:
|
123
|
-
if not isinstance(data, dict):
|
124
|
-
raise TypeError()
|
125
|
-
componentsschemas_labels_type_0 = LabelsType0.from_dict(data)
|
126
|
-
|
127
|
-
return componentsschemas_labels_type_0
|
128
|
-
except: # noqa: E722
|
129
|
-
pass
|
130
|
-
return cast(Union["LabelsType0", None, Unset], data)
|
131
|
-
|
132
|
-
labels = _parse_labels(d.pop("labels", UNSET))
|
133
|
-
|
134
|
-
name = d.pop("name", UNSET)
|
135
|
-
|
136
|
-
workspace = d.pop("workspace", UNSET)
|
137
|
-
|
138
|
-
deployments = []
|
139
|
-
_deployments = d.pop("deployments", UNSET)
|
140
|
-
for componentsschemas_model_deployments_item_data in _deployments or []:
|
141
|
-
componentsschemas_model_deployments_item = ModelDeployment.from_dict(
|
142
|
-
componentsschemas_model_deployments_item_data
|
143
|
-
)
|
144
|
-
|
145
|
-
deployments.append(componentsschemas_model_deployments_item)
|
146
|
-
|
147
|
-
model_with_deployments = cls(
|
148
|
-
created_at=created_at,
|
149
|
-
created_by=created_by,
|
150
|
-
updated_at=updated_at,
|
151
|
-
updated_by=updated_by,
|
152
|
-
display_name=display_name,
|
153
|
-
labels=labels,
|
154
|
-
name=name,
|
155
|
-
workspace=workspace,
|
156
|
-
deployments=deployments,
|
157
|
-
)
|
158
|
-
|
159
|
-
model_with_deployments.additional_properties = d
|
160
|
-
return model_with_deployments
|
161
|
-
|
162
|
-
@property
|
163
|
-
def additional_keys(self) -> list[str]:
|
164
|
-
return list(self.additional_properties.keys())
|
165
|
-
|
166
|
-
def __getitem__(self, key: str) -> Any:
|
167
|
-
return self.additional_properties[key]
|
168
|
-
|
169
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
170
|
-
self.additional_properties[key] = value
|
171
|
-
|
172
|
-
def __delitem__(self, key: str) -> None:
|
173
|
-
del self.additional_properties[key]
|
174
|
-
|
175
|
-
def __contains__(self, key: str) -> bool:
|
176
|
-
return key in self.additional_properties
|
@@ -1,70 +0,0 @@
|
|
1
|
-
from typing import Any, TypeVar, Union
|
2
|
-
|
3
|
-
from attrs import define as _attrs_define
|
4
|
-
from attrs import field as _attrs_field
|
5
|
-
|
6
|
-
from ..types import UNSET, Unset
|
7
|
-
|
8
|
-
T = TypeVar("T", bound="ResourceDeploymentLog")
|
9
|
-
|
10
|
-
|
11
|
-
@_attrs_define
|
12
|
-
class ResourceDeploymentLog:
|
13
|
-
"""Log for a resource deployment (eg. model deployment, function deployment)
|
14
|
-
|
15
|
-
Attributes:
|
16
|
-
message (Union[Unset, str]): Content of the log
|
17
|
-
timestamp (Union[Unset, str]): The timestamp of the log
|
18
|
-
"""
|
19
|
-
|
20
|
-
message: Union[Unset, str] = UNSET
|
21
|
-
timestamp: Union[Unset, str] = UNSET
|
22
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
23
|
-
|
24
|
-
def to_dict(self) -> dict[str, Any]:
|
25
|
-
message = self.message
|
26
|
-
|
27
|
-
timestamp = self.timestamp
|
28
|
-
|
29
|
-
field_dict: dict[str, Any] = {}
|
30
|
-
field_dict.update(self.additional_properties)
|
31
|
-
field_dict.update({})
|
32
|
-
if message is not UNSET:
|
33
|
-
field_dict["message"] = message
|
34
|
-
if timestamp is not UNSET:
|
35
|
-
field_dict["timestamp"] = timestamp
|
36
|
-
|
37
|
-
return field_dict
|
38
|
-
|
39
|
-
@classmethod
|
40
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
41
|
-
if not src_dict:
|
42
|
-
return None
|
43
|
-
d = src_dict.copy()
|
44
|
-
message = d.pop("message", UNSET)
|
45
|
-
|
46
|
-
timestamp = d.pop("timestamp", UNSET)
|
47
|
-
|
48
|
-
resource_deployment_log = cls(
|
49
|
-
message=message,
|
50
|
-
timestamp=timestamp,
|
51
|
-
)
|
52
|
-
|
53
|
-
resource_deployment_log.additional_properties = d
|
54
|
-
return resource_deployment_log
|
55
|
-
|
56
|
-
@property
|
57
|
-
def additional_keys(self) -> list[str]:
|
58
|
-
return list(self.additional_properties.keys())
|
59
|
-
|
60
|
-
def __getitem__(self, key: str) -> Any:
|
61
|
-
return self.additional_properties[key]
|
62
|
-
|
63
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
64
|
-
self.additional_properties[key] = value
|
65
|
-
|
66
|
-
def __delitem__(self, key: str) -> None:
|
67
|
-
del self.additional_properties[key]
|
68
|
-
|
69
|
-
def __contains__(self, key: str) -> bool:
|
70
|
-
return key in self.additional_properties
|
@@ -1,79 +0,0 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
2
|
-
|
3
|
-
from attrs import define as _attrs_define
|
4
|
-
from attrs import field as _attrs_field
|
5
|
-
|
6
|
-
from ..types import UNSET, Unset
|
7
|
-
|
8
|
-
if TYPE_CHECKING:
|
9
|
-
from ..models.metric import Metric
|
10
|
-
|
11
|
-
|
12
|
-
T = TypeVar("T", bound="ResourceDeploymentMetricsInferencePerRegionType0")
|
13
|
-
|
14
|
-
|
15
|
-
@_attrs_define
|
16
|
-
class ResourceDeploymentMetricsInferencePerRegionType0:
|
17
|
-
"""Historical requests (in last 24 hours) per location, for the model deployment
|
18
|
-
|
19
|
-
Attributes:
|
20
|
-
region (Union[Unset, List['Metric']]): Array of metrics
|
21
|
-
"""
|
22
|
-
|
23
|
-
region: Union[Unset, List["Metric"]] = UNSET
|
24
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
25
|
-
|
26
|
-
def to_dict(self) -> dict[str, Any]:
|
27
|
-
region: Union[Unset, List[Dict[str, Any]]] = UNSET
|
28
|
-
if not isinstance(self.region, Unset):
|
29
|
-
region = []
|
30
|
-
for componentsschemas_array_metric_item_data in self.region:
|
31
|
-
componentsschemas_array_metric_item = (
|
32
|
-
componentsschemas_array_metric_item_data.to_dict()
|
33
|
-
)
|
34
|
-
region.append(componentsschemas_array_metric_item)
|
35
|
-
|
36
|
-
field_dict: dict[str, Any] = {}
|
37
|
-
field_dict.update(self.additional_properties)
|
38
|
-
field_dict.update({})
|
39
|
-
if region is not UNSET:
|
40
|
-
field_dict["region"] = region
|
41
|
-
|
42
|
-
return field_dict
|
43
|
-
|
44
|
-
@classmethod
|
45
|
-
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
46
|
-
from ..models.metric import Metric
|
47
|
-
|
48
|
-
d = src_dict.copy()
|
49
|
-
region = []
|
50
|
-
_region = d.pop("region", UNSET)
|
51
|
-
for componentsschemas_array_metric_item_data in _region or []:
|
52
|
-
componentsschemas_array_metric_item = Metric.from_dict(
|
53
|
-
componentsschemas_array_metric_item_data
|
54
|
-
)
|
55
|
-
|
56
|
-
region.append(componentsschemas_array_metric_item)
|
57
|
-
|
58
|
-
resource_deployment_metrics_inference_per_region_type_0 = cls(
|
59
|
-
region=region,
|
60
|
-
)
|
61
|
-
|
62
|
-
resource_deployment_metrics_inference_per_region_type_0.additional_properties = d
|
63
|
-
return resource_deployment_metrics_inference_per_region_type_0
|
64
|
-
|
65
|
-
@property
|
66
|
-
def additional_keys(self) -> list[str]:
|
67
|
-
return list(self.additional_properties.keys())
|
68
|
-
|
69
|
-
def __getitem__(self, key: str) -> Any:
|
70
|
-
return self.additional_properties[key]
|
71
|
-
|
72
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
73
|
-
self.additional_properties[key] = value
|
74
|
-
|
75
|
-
def __delitem__(self, key: str) -> None:
|
76
|
-
del self.additional_properties[key]
|
77
|
-
|
78
|
-
def __contains__(self, key: str) -> bool:
|
79
|
-
return key in self.additional_properties
|
@@ -1,79 +0,0 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
2
|
-
|
3
|
-
from attrs import define as _attrs_define
|
4
|
-
from attrs import field as _attrs_field
|
5
|
-
|
6
|
-
from ..types import UNSET, Unset
|
7
|
-
|
8
|
-
if TYPE_CHECKING:
|
9
|
-
from ..models.metric import Metric
|
10
|
-
|
11
|
-
|
12
|
-
T = TypeVar("T", bound="ResourceDeploymentMetricsInferencePerSecondPerRegionType0")
|
13
|
-
|
14
|
-
|
15
|
-
@_attrs_define
|
16
|
-
class ResourceDeploymentMetricsInferencePerSecondPerRegionType0:
|
17
|
-
"""Historical requests per second (RPS) per location, for the model deployment
|
18
|
-
|
19
|
-
Attributes:
|
20
|
-
region (Union[Unset, List['Metric']]): Array of metrics
|
21
|
-
"""
|
22
|
-
|
23
|
-
region: Union[Unset, List["Metric"]] = UNSET
|
24
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
25
|
-
|
26
|
-
def to_dict(self) -> dict[str, Any]:
|
27
|
-
region: Union[Unset, List[Dict[str, Any]]] = UNSET
|
28
|
-
if not isinstance(self.region, Unset):
|
29
|
-
region = []
|
30
|
-
for componentsschemas_array_metric_item_data in self.region:
|
31
|
-
componentsschemas_array_metric_item = (
|
32
|
-
componentsschemas_array_metric_item_data.to_dict()
|
33
|
-
)
|
34
|
-
region.append(componentsschemas_array_metric_item)
|
35
|
-
|
36
|
-
field_dict: dict[str, Any] = {}
|
37
|
-
field_dict.update(self.additional_properties)
|
38
|
-
field_dict.update({})
|
39
|
-
if region is not UNSET:
|
40
|
-
field_dict["region"] = region
|
41
|
-
|
42
|
-
return field_dict
|
43
|
-
|
44
|
-
@classmethod
|
45
|
-
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
46
|
-
from ..models.metric import Metric
|
47
|
-
|
48
|
-
d = src_dict.copy()
|
49
|
-
region = []
|
50
|
-
_region = d.pop("region", UNSET)
|
51
|
-
for componentsschemas_array_metric_item_data in _region or []:
|
52
|
-
componentsschemas_array_metric_item = Metric.from_dict(
|
53
|
-
componentsschemas_array_metric_item_data
|
54
|
-
)
|
55
|
-
|
56
|
-
region.append(componentsschemas_array_metric_item)
|
57
|
-
|
58
|
-
resource_deployment_metrics_inference_per_second_per_region_type_0 = cls(
|
59
|
-
region=region,
|
60
|
-
)
|
61
|
-
|
62
|
-
resource_deployment_metrics_inference_per_second_per_region_type_0.additional_properties = d
|
63
|
-
return resource_deployment_metrics_inference_per_second_per_region_type_0
|
64
|
-
|
65
|
-
@property
|
66
|
-
def additional_keys(self) -> list[str]:
|
67
|
-
return list(self.additional_properties.keys())
|
68
|
-
|
69
|
-
def __getitem__(self, key: str) -> Any:
|
70
|
-
return self.additional_properties[key]
|
71
|
-
|
72
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
73
|
-
self.additional_properties[key] = value
|
74
|
-
|
75
|
-
def __delitem__(self, key: str) -> None:
|
76
|
-
del self.additional_properties[key]
|
77
|
-
|
78
|
-
def __contains__(self, key: str) -> bool:
|
79
|
-
return key in self.additional_properties
|
@@ -1,73 +0,0 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any, Dict, Type, TypeVar, Union
|
2
|
-
|
3
|
-
from attrs import define as _attrs_define
|
4
|
-
from attrs import field as _attrs_field
|
5
|
-
|
6
|
-
from ..types import UNSET, Unset
|
7
|
-
|
8
|
-
if TYPE_CHECKING:
|
9
|
-
from ..models.qps import QPS
|
10
|
-
|
11
|
-
|
12
|
-
T = TypeVar("T", bound="ResourceDeploymentMetricsQueryPerRegionPerCodeType0")
|
13
|
-
|
14
|
-
|
15
|
-
@_attrs_define
|
16
|
-
class ResourceDeploymentMetricsQueryPerRegionPerCodeType0:
|
17
|
-
"""Number of requests done on the resource for the model deployment
|
18
|
-
|
19
|
-
Attributes:
|
20
|
-
region (Union[Unset, QPS]): Query per second per element, can be per response status code (e.g. 200, 400) or per
|
21
|
-
location
|
22
|
-
"""
|
23
|
-
|
24
|
-
region: Union[Unset, "QPS"] = UNSET
|
25
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
26
|
-
|
27
|
-
def to_dict(self) -> dict[str, Any]:
|
28
|
-
region: Union[Unset, Dict[str, Any]] = UNSET
|
29
|
-
if not isinstance(self.region, Unset):
|
30
|
-
region = self.region.to_dict()
|
31
|
-
|
32
|
-
field_dict: dict[str, Any] = {}
|
33
|
-
field_dict.update(self.additional_properties)
|
34
|
-
field_dict.update({})
|
35
|
-
if region is not UNSET:
|
36
|
-
field_dict["region"] = region
|
37
|
-
|
38
|
-
return field_dict
|
39
|
-
|
40
|
-
@classmethod
|
41
|
-
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
42
|
-
from ..models.qps import QPS
|
43
|
-
|
44
|
-
d = src_dict.copy()
|
45
|
-
_region = d.pop("region", UNSET)
|
46
|
-
region: Union[Unset, QPS]
|
47
|
-
if isinstance(_region, Unset):
|
48
|
-
region = UNSET
|
49
|
-
else:
|
50
|
-
region = QPS.from_dict(_region)
|
51
|
-
|
52
|
-
resource_deployment_metrics_query_per_region_per_code_type_0 = cls(
|
53
|
-
region=region,
|
54
|
-
)
|
55
|
-
|
56
|
-
resource_deployment_metrics_query_per_region_per_code_type_0.additional_properties = d
|
57
|
-
return resource_deployment_metrics_query_per_region_per_code_type_0
|
58
|
-
|
59
|
-
@property
|
60
|
-
def additional_keys(self) -> list[str]:
|
61
|
-
return list(self.additional_properties.keys())
|
62
|
-
|
63
|
-
def __getitem__(self, key: str) -> Any:
|
64
|
-
return self.additional_properties[key]
|
65
|
-
|
66
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
67
|
-
self.additional_properties[key] = value
|
68
|
-
|
69
|
-
def __delitem__(self, key: str) -> None:
|
70
|
-
del self.additional_properties[key]
|
71
|
-
|
72
|
-
def __contains__(self, key: str) -> bool:
|
73
|
-
return key in self.additional_properties
|
@@ -1,73 +0,0 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any, Dict, Type, TypeVar, Union
|
2
|
-
|
3
|
-
from attrs import define as _attrs_define
|
4
|
-
from attrs import field as _attrs_field
|
5
|
-
|
6
|
-
from ..types import UNSET, Unset
|
7
|
-
|
8
|
-
if TYPE_CHECKING:
|
9
|
-
from ..models.qps import QPS
|
10
|
-
|
11
|
-
|
12
|
-
T = TypeVar("T", bound="ResourceDeploymentMetricsQueryPerSecondPerRegionPerCodeType0")
|
13
|
-
|
14
|
-
|
15
|
-
@_attrs_define
|
16
|
-
class ResourceDeploymentMetricsQueryPerSecondPerRegionPerCodeType0:
|
17
|
-
"""RPS value (in last 24 hours) per response status code per location, for the model deployment
|
18
|
-
|
19
|
-
Attributes:
|
20
|
-
region (Union[Unset, QPS]): Query per second per element, can be per response status code (e.g. 200, 400) or per
|
21
|
-
location
|
22
|
-
"""
|
23
|
-
|
24
|
-
region: Union[Unset, "QPS"] = UNSET
|
25
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
26
|
-
|
27
|
-
def to_dict(self) -> dict[str, Any]:
|
28
|
-
region: Union[Unset, Dict[str, Any]] = UNSET
|
29
|
-
if not isinstance(self.region, Unset):
|
30
|
-
region = self.region.to_dict()
|
31
|
-
|
32
|
-
field_dict: dict[str, Any] = {}
|
33
|
-
field_dict.update(self.additional_properties)
|
34
|
-
field_dict.update({})
|
35
|
-
if region is not UNSET:
|
36
|
-
field_dict["region"] = region
|
37
|
-
|
38
|
-
return field_dict
|
39
|
-
|
40
|
-
@classmethod
|
41
|
-
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
42
|
-
from ..models.qps import QPS
|
43
|
-
|
44
|
-
d = src_dict.copy()
|
45
|
-
_region = d.pop("region", UNSET)
|
46
|
-
region: Union[Unset, QPS]
|
47
|
-
if isinstance(_region, Unset):
|
48
|
-
region = UNSET
|
49
|
-
else:
|
50
|
-
region = QPS.from_dict(_region)
|
51
|
-
|
52
|
-
resource_deployment_metrics_query_per_second_per_region_per_code_type_0 = cls(
|
53
|
-
region=region,
|
54
|
-
)
|
55
|
-
|
56
|
-
resource_deployment_metrics_query_per_second_per_region_per_code_type_0.additional_properties = d
|
57
|
-
return resource_deployment_metrics_query_per_second_per_region_per_code_type_0
|
58
|
-
|
59
|
-
@property
|
60
|
-
def additional_keys(self) -> list[str]:
|
61
|
-
return list(self.additional_properties.keys())
|
62
|
-
|
63
|
-
def __getitem__(self, key: str) -> Any:
|
64
|
-
return self.additional_properties[key]
|
65
|
-
|
66
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
67
|
-
self.additional_properties[key] = value
|
68
|
-
|
69
|
-
def __delitem__(self, key: str) -> None:
|
70
|
-
del self.additional_properties[key]
|
71
|
-
|
72
|
-
def __contains__(self, key: str) -> bool:
|
73
|
-
return key in self.additional_properties
|