beamlit 0.0.47rc93__py3-none-any.whl → 0.0.48__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.
- beamlit/agents/decorator.py +3 -3
- beamlit/api/{model_providers/delete_model_provider.py → accounts/delete_account.py} +42 -35
- beamlit/api/{model_providers/get_model_provider.py → accounts/get_account.py} +34 -34
- beamlit/api/{model_providers/list_model_providers.py → accounts/list_accounts.py} +21 -21
- beamlit/api/{model_providers/update_model_provider.py → accounts/update_account.py} +43 -43
- beamlit/api/agents/get_agent_metrics.py +12 -12
- beamlit/api/{model_providers/create_model_provider.py → default/create_account.py} +30 -30
- beamlit/api/functions/get_function_metrics.py +12 -12
- beamlit/api/models/get_model_metrics.py +12 -12
- beamlit/functions/common.py +0 -1
- beamlit/functions/mcp/mcp.py +3 -2
- beamlit/models/__init__.py +16 -30
- beamlit/models/{model_metadata.py → account.py} +93 -15
- beamlit/models/{agent_metadata.py → account_metadata.py} +16 -41
- beamlit/models/account_spec.py +123 -0
- beamlit/models/{agent_render.py → account_spec_address.py} +6 -6
- beamlit/models/agent.py +6 -2
- beamlit/models/agent_spec.py +30 -6
- beamlit/models/billing_address.py +133 -0
- beamlit/models/core_spec.py +27 -5
- beamlit/models/core_spec_configurations.py +3 -1
- beamlit/models/environment.py +6 -2
- beamlit/models/environment_metadata.py +3 -1
- beamlit/models/function.py +6 -2
- beamlit/models/function_spec.py +27 -5
- beamlit/models/integration_connection.py +6 -2
- beamlit/models/integration_connection_spec.py +18 -14
- beamlit/models/{function_render.py → integration_connection_spec_config.py} +6 -6
- beamlit/models/{core_status.py → integration_connection_spec_secret.py} +6 -6
- beamlit/models/latency_metric.py +24 -4
- beamlit/models/metadata.py +3 -1
- beamlit/models/metrics.py +13 -3
- beamlit/models/model.py +6 -2
- beamlit/models/model_spec.py +27 -5
- beamlit/models/pending_invitation_accept.py +3 -1
- beamlit/models/pending_invitation_render.py +13 -3
- beamlit/models/policy.py +6 -2
- beamlit/models/policy_max_tokens.py +106 -0
- beamlit/models/policy_spec.py +30 -0
- beamlit/models/request_duration_over_time_metrics.py +7 -1
- beamlit/models/request_total_by_origin_metric.py +14 -2
- beamlit/models/request_total_metric.py +10 -2
- beamlit/models/resource_environment_metrics.py +33 -7
- beamlit/models/resource_log.py +9 -0
- beamlit/models/runtime.py +10 -2
- beamlit/models/store_agent.py +3 -1
- beamlit/models/store_function.py +3 -1
- beamlit/models/token_rate_metrics.py +17 -3
- beamlit/models/trace_ids_response.py +3 -21
- beamlit/models/workspace.py +12 -1
- {beamlit-0.0.47rc93.dist-info → beamlit-0.0.48.dist-info}/METADATA +1 -1
- {beamlit-0.0.47rc93.dist-info → beamlit-0.0.48.dist-info}/RECORD +55 -70
- beamlit/models/function_metadata.py +0 -146
- beamlit/models/increase_and_rate_metric.py +0 -61
- beamlit/models/integration_config.py +0 -45
- beamlit/models/integration_connection_config.py +0 -45
- beamlit/models/integration_connection_secret.py +0 -61
- beamlit/models/model_provider.py +0 -173
- beamlit/models/model_render.py +0 -45
- beamlit/models/provider_config.py +0 -94
- beamlit/models/qps.py +0 -61
- beamlit/models/repository_type_0.py +0 -70
- beamlit/models/resource_deployment_metrics.py +0 -176
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +0 -77
- beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +0 -75
- beamlit/models/resource_environment_metrics_inference_per_region.py +0 -77
- beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +0 -77
- beamlit/models/resource_environment_metrics_query_per_region_per_code.py +0 -75
- beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +0 -75
- beamlit/models/resource_metrics.py +0 -96
- /beamlit/api/{model_providers → accounts}/__init__.py +0 -0
- {beamlit-0.0.47rc93.dist-info → beamlit-0.0.48.dist-info}/WHEEL +0 -0
- {beamlit-0.0.47rc93.dist-info → beamlit-0.0.48.dist-info}/licenses/LICENSE +0 -0
@@ -1,61 +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="IntegrationConnectionSecret")
|
9
|
-
|
10
|
-
|
11
|
-
@_attrs_define
|
12
|
-
class IntegrationConnectionSecret:
|
13
|
-
"""Integration secret
|
14
|
-
|
15
|
-
Attributes:
|
16
|
-
api_key (Union[Unset, str]): The API key to use for the integration
|
17
|
-
"""
|
18
|
-
|
19
|
-
api_key: Union[Unset, str] = UNSET
|
20
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
21
|
-
|
22
|
-
def to_dict(self) -> dict[str, Any]:
|
23
|
-
api_key = self.api_key
|
24
|
-
|
25
|
-
field_dict: dict[str, Any] = {}
|
26
|
-
field_dict.update(self.additional_properties)
|
27
|
-
field_dict.update({})
|
28
|
-
if api_key is not UNSET:
|
29
|
-
field_dict["apiKey"] = api_key
|
30
|
-
|
31
|
-
return field_dict
|
32
|
-
|
33
|
-
@classmethod
|
34
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
35
|
-
if not src_dict:
|
36
|
-
return None
|
37
|
-
d = src_dict.copy()
|
38
|
-
api_key = d.pop("apiKey", UNSET)
|
39
|
-
|
40
|
-
integration_connection_secret = cls(
|
41
|
-
api_key=api_key,
|
42
|
-
)
|
43
|
-
|
44
|
-
integration_connection_secret.additional_properties = d
|
45
|
-
return integration_connection_secret
|
46
|
-
|
47
|
-
@property
|
48
|
-
def additional_keys(self) -> list[str]:
|
49
|
-
return list(self.additional_properties.keys())
|
50
|
-
|
51
|
-
def __getitem__(self, key: str) -> Any:
|
52
|
-
return self.additional_properties[key]
|
53
|
-
|
54
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
55
|
-
self.additional_properties[key] = value
|
56
|
-
|
57
|
-
def __delitem__(self, key: str) -> None:
|
58
|
-
del self.additional_properties[key]
|
59
|
-
|
60
|
-
def __contains__(self, key: str) -> bool:
|
61
|
-
return key in self.additional_properties
|
beamlit/models/model_provider.py
DELETED
@@ -1,173 +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.metadata_labels import MetadataLabels
|
10
|
-
from ..models.provider_config import ProviderConfig
|
11
|
-
|
12
|
-
|
13
|
-
T = TypeVar("T", bound="ModelProvider")
|
14
|
-
|
15
|
-
|
16
|
-
@_attrs_define
|
17
|
-
class ModelProvider:
|
18
|
-
"""Model provider
|
19
|
-
|
20
|
-
Attributes:
|
21
|
-
created_at (Union[Unset, str]): The date and time when the resource was created
|
22
|
-
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
23
|
-
created_by (Union[Unset, str]): The user or service account who created the resource
|
24
|
-
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
25
|
-
comment (Union[Unset, str]): Model provider description
|
26
|
-
config (Union[Unset, ProviderConfig]): Model provider config
|
27
|
-
display_name (Union[Unset, str]): Model provider display name
|
28
|
-
labels (Union[Unset, MetadataLabels]): Labels
|
29
|
-
name (Union[Unset, str]): Model provider name
|
30
|
-
type_ (Union[Unset, str]): Model provider type
|
31
|
-
workspace (Union[Unset, str]): Workspace name
|
32
|
-
"""
|
33
|
-
|
34
|
-
created_at: Union[Unset, str] = UNSET
|
35
|
-
updated_at: Union[Unset, str] = UNSET
|
36
|
-
created_by: Union[Unset, str] = UNSET
|
37
|
-
updated_by: Union[Unset, str] = UNSET
|
38
|
-
comment: Union[Unset, str] = UNSET
|
39
|
-
config: Union[Unset, "ProviderConfig"] = UNSET
|
40
|
-
display_name: Union[Unset, str] = UNSET
|
41
|
-
labels: Union[Unset, "MetadataLabels"] = UNSET
|
42
|
-
name: Union[Unset, str] = UNSET
|
43
|
-
type_: Union[Unset, str] = UNSET
|
44
|
-
workspace: Union[Unset, str] = UNSET
|
45
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
46
|
-
|
47
|
-
def to_dict(self) -> dict[str, Any]:
|
48
|
-
created_at = self.created_at
|
49
|
-
|
50
|
-
updated_at = self.updated_at
|
51
|
-
|
52
|
-
created_by = self.created_by
|
53
|
-
|
54
|
-
updated_by = self.updated_by
|
55
|
-
|
56
|
-
comment = self.comment
|
57
|
-
|
58
|
-
config: Union[Unset, dict[str, Any]] = UNSET
|
59
|
-
if self.config and not isinstance(self.config, Unset):
|
60
|
-
config = self.config.to_dict()
|
61
|
-
|
62
|
-
display_name = self.display_name
|
63
|
-
|
64
|
-
labels: Union[Unset, dict[str, Any]] = UNSET
|
65
|
-
if self.labels and not isinstance(self.labels, Unset):
|
66
|
-
labels = self.labels.to_dict()
|
67
|
-
|
68
|
-
name = self.name
|
69
|
-
|
70
|
-
type_ = self.type_
|
71
|
-
|
72
|
-
workspace = self.workspace
|
73
|
-
|
74
|
-
field_dict: dict[str, Any] = {}
|
75
|
-
field_dict.update(self.additional_properties)
|
76
|
-
field_dict.update({})
|
77
|
-
if created_at is not UNSET:
|
78
|
-
field_dict["createdAt"] = created_at
|
79
|
-
if updated_at is not UNSET:
|
80
|
-
field_dict["updatedAt"] = updated_at
|
81
|
-
if created_by is not UNSET:
|
82
|
-
field_dict["createdBy"] = created_by
|
83
|
-
if updated_by is not UNSET:
|
84
|
-
field_dict["updatedBy"] = updated_by
|
85
|
-
if comment is not UNSET:
|
86
|
-
field_dict["comment"] = comment
|
87
|
-
if config is not UNSET:
|
88
|
-
field_dict["config"] = config
|
89
|
-
if display_name is not UNSET:
|
90
|
-
field_dict["displayName"] = display_name
|
91
|
-
if labels is not UNSET:
|
92
|
-
field_dict["labels"] = labels
|
93
|
-
if name is not UNSET:
|
94
|
-
field_dict["name"] = name
|
95
|
-
if type_ is not UNSET:
|
96
|
-
field_dict["type"] = type_
|
97
|
-
if workspace is not UNSET:
|
98
|
-
field_dict["workspace"] = workspace
|
99
|
-
|
100
|
-
return field_dict
|
101
|
-
|
102
|
-
@classmethod
|
103
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
104
|
-
from ..models.metadata_labels import MetadataLabels
|
105
|
-
from ..models.provider_config import ProviderConfig
|
106
|
-
|
107
|
-
if not src_dict:
|
108
|
-
return None
|
109
|
-
d = src_dict.copy()
|
110
|
-
created_at = d.pop("createdAt", UNSET)
|
111
|
-
|
112
|
-
updated_at = d.pop("updatedAt", UNSET)
|
113
|
-
|
114
|
-
created_by = d.pop("createdBy", UNSET)
|
115
|
-
|
116
|
-
updated_by = d.pop("updatedBy", UNSET)
|
117
|
-
|
118
|
-
comment = d.pop("comment", UNSET)
|
119
|
-
|
120
|
-
_config = d.pop("config", UNSET)
|
121
|
-
config: Union[Unset, ProviderConfig]
|
122
|
-
if isinstance(_config, Unset):
|
123
|
-
config = UNSET
|
124
|
-
else:
|
125
|
-
config = ProviderConfig.from_dict(_config)
|
126
|
-
|
127
|
-
display_name = d.pop("displayName", UNSET)
|
128
|
-
|
129
|
-
_labels = d.pop("labels", UNSET)
|
130
|
-
labels: Union[Unset, MetadataLabels]
|
131
|
-
if isinstance(_labels, Unset):
|
132
|
-
labels = UNSET
|
133
|
-
else:
|
134
|
-
labels = MetadataLabels.from_dict(_labels)
|
135
|
-
|
136
|
-
name = d.pop("name", UNSET)
|
137
|
-
|
138
|
-
type_ = d.pop("type", UNSET)
|
139
|
-
|
140
|
-
workspace = d.pop("workspace", UNSET)
|
141
|
-
|
142
|
-
model_provider = cls(
|
143
|
-
created_at=created_at,
|
144
|
-
updated_at=updated_at,
|
145
|
-
created_by=created_by,
|
146
|
-
updated_by=updated_by,
|
147
|
-
comment=comment,
|
148
|
-
config=config,
|
149
|
-
display_name=display_name,
|
150
|
-
labels=labels,
|
151
|
-
name=name,
|
152
|
-
type_=type_,
|
153
|
-
workspace=workspace,
|
154
|
-
)
|
155
|
-
|
156
|
-
model_provider.additional_properties = d
|
157
|
-
return model_provider
|
158
|
-
|
159
|
-
@property
|
160
|
-
def additional_keys(self) -> list[str]:
|
161
|
-
return list(self.additional_properties.keys())
|
162
|
-
|
163
|
-
def __getitem__(self, key: str) -> Any:
|
164
|
-
return self.additional_properties[key]
|
165
|
-
|
166
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
167
|
-
self.additional_properties[key] = value
|
168
|
-
|
169
|
-
def __delitem__(self, key: str) -> None:
|
170
|
-
del self.additional_properties[key]
|
171
|
-
|
172
|
-
def __contains__(self, key: str) -> bool:
|
173
|
-
return key in self.additional_properties
|
beamlit/models/model_render.py
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
from typing import Any, TypeVar
|
2
|
-
|
3
|
-
from attrs import define as _attrs_define
|
4
|
-
from attrs import field as _attrs_field
|
5
|
-
|
6
|
-
T = TypeVar("T", bound="ModelRender")
|
7
|
-
|
8
|
-
|
9
|
-
@_attrs_define
|
10
|
-
class ModelRender:
|
11
|
-
"""ModelRender"""
|
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
|
-
if not src_dict:
|
24
|
-
return None
|
25
|
-
d = src_dict.copy()
|
26
|
-
model_render = cls()
|
27
|
-
|
28
|
-
model_render.additional_properties = d
|
29
|
-
return model_render
|
30
|
-
|
31
|
-
@property
|
32
|
-
def additional_keys(self) -> list[str]:
|
33
|
-
return list(self.additional_properties.keys())
|
34
|
-
|
35
|
-
def __getitem__(self, key: str) -> Any:
|
36
|
-
return self.additional_properties[key]
|
37
|
-
|
38
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
39
|
-
self.additional_properties[key] = value
|
40
|
-
|
41
|
-
def __delitem__(self, key: str) -> None:
|
42
|
-
del self.additional_properties[key]
|
43
|
-
|
44
|
-
def __contains__(self, key: str) -> bool:
|
45
|
-
return key in self.additional_properties
|
@@ -1,94 +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.runtime import Runtime
|
10
|
-
|
11
|
-
|
12
|
-
T = TypeVar("T", bound="ProviderConfig")
|
13
|
-
|
14
|
-
|
15
|
-
@_attrs_define
|
16
|
-
class ProviderConfig:
|
17
|
-
"""Model provider config
|
18
|
-
|
19
|
-
Attributes:
|
20
|
-
filename (Union[Unset, str]): The file name to use for the model
|
21
|
-
presigned_url (Union[Unset, list[Any]]): The presigned URLs to upload the model to
|
22
|
-
runtime (Union[Unset, Runtime]): Set of configurations for a deployment
|
23
|
-
"""
|
24
|
-
|
25
|
-
filename: Union[Unset, str] = UNSET
|
26
|
-
presigned_url: Union[Unset, list[Any]] = UNSET
|
27
|
-
runtime: Union[Unset, "Runtime"] = UNSET
|
28
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
29
|
-
|
30
|
-
def to_dict(self) -> dict[str, Any]:
|
31
|
-
filename = self.filename
|
32
|
-
|
33
|
-
presigned_url: Union[Unset, list[Any]] = UNSET
|
34
|
-
if not isinstance(self.presigned_url, Unset):
|
35
|
-
presigned_url = self.presigned_url
|
36
|
-
|
37
|
-
runtime: Union[Unset, dict[str, Any]] = UNSET
|
38
|
-
if self.runtime and not isinstance(self.runtime, Unset):
|
39
|
-
runtime = self.runtime.to_dict()
|
40
|
-
|
41
|
-
field_dict: dict[str, Any] = {}
|
42
|
-
field_dict.update(self.additional_properties)
|
43
|
-
field_dict.update({})
|
44
|
-
if filename is not UNSET:
|
45
|
-
field_dict["filename"] = filename
|
46
|
-
if presigned_url is not UNSET:
|
47
|
-
field_dict["presigned_url"] = presigned_url
|
48
|
-
if runtime is not UNSET:
|
49
|
-
field_dict["runtime"] = runtime
|
50
|
-
|
51
|
-
return field_dict
|
52
|
-
|
53
|
-
@classmethod
|
54
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
55
|
-
from ..models.runtime import Runtime
|
56
|
-
|
57
|
-
if not src_dict:
|
58
|
-
return None
|
59
|
-
d = src_dict.copy()
|
60
|
-
filename = d.pop("filename", UNSET)
|
61
|
-
|
62
|
-
presigned_url = cast(list[Any], d.pop("presigned_url", UNSET))
|
63
|
-
|
64
|
-
_runtime = d.pop("runtime", UNSET)
|
65
|
-
runtime: Union[Unset, Runtime]
|
66
|
-
if isinstance(_runtime, Unset):
|
67
|
-
runtime = UNSET
|
68
|
-
else:
|
69
|
-
runtime = Runtime.from_dict(_runtime)
|
70
|
-
|
71
|
-
provider_config = cls(
|
72
|
-
filename=filename,
|
73
|
-
presigned_url=presigned_url,
|
74
|
-
runtime=runtime,
|
75
|
-
)
|
76
|
-
|
77
|
-
provider_config.additional_properties = d
|
78
|
-
return provider_config
|
79
|
-
|
80
|
-
@property
|
81
|
-
def additional_keys(self) -> list[str]:
|
82
|
-
return list(self.additional_properties.keys())
|
83
|
-
|
84
|
-
def __getitem__(self, key: str) -> Any:
|
85
|
-
return self.additional_properties[key]
|
86
|
-
|
87
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
88
|
-
self.additional_properties[key] = value
|
89
|
-
|
90
|
-
def __delitem__(self, key: str) -> None:
|
91
|
-
del self.additional_properties[key]
|
92
|
-
|
93
|
-
def __contains__(self, key: str) -> bool:
|
94
|
-
return key in self.additional_properties
|
beamlit/models/qps.py
DELETED
@@ -1,61 +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="QPS")
|
9
|
-
|
10
|
-
|
11
|
-
@_attrs_define
|
12
|
-
class QPS:
|
13
|
-
"""Query per second per element, can be per response status code (e.g. 200, 400) or per location
|
14
|
-
|
15
|
-
Attributes:
|
16
|
-
region_code (Union[Unset, float]): QPS for location
|
17
|
-
"""
|
18
|
-
|
19
|
-
region_code: Union[Unset, float] = UNSET
|
20
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
21
|
-
|
22
|
-
def to_dict(self) -> dict[str, Any]:
|
23
|
-
region_code = self.region_code
|
24
|
-
|
25
|
-
field_dict: dict[str, Any] = {}
|
26
|
-
field_dict.update(self.additional_properties)
|
27
|
-
field_dict.update({})
|
28
|
-
if region_code is not UNSET:
|
29
|
-
field_dict["region_code"] = region_code
|
30
|
-
|
31
|
-
return field_dict
|
32
|
-
|
33
|
-
@classmethod
|
34
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
35
|
-
if not src_dict:
|
36
|
-
return None
|
37
|
-
d = src_dict.copy()
|
38
|
-
region_code = d.pop("region_code", UNSET)
|
39
|
-
|
40
|
-
qps = cls(
|
41
|
-
region_code=region_code,
|
42
|
-
)
|
43
|
-
|
44
|
-
qps.additional_properties = d
|
45
|
-
return qps
|
46
|
-
|
47
|
-
@property
|
48
|
-
def additional_keys(self) -> list[str]:
|
49
|
-
return list(self.additional_properties.keys())
|
50
|
-
|
51
|
-
def __getitem__(self, key: str) -> Any:
|
52
|
-
return self.additional_properties[key]
|
53
|
-
|
54
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
55
|
-
self.additional_properties[key] = value
|
56
|
-
|
57
|
-
def __delitem__(self, key: str) -> None:
|
58
|
-
del self.additional_properties[key]
|
59
|
-
|
60
|
-
def __contains__(self, key: str) -> bool:
|
61
|
-
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="RepositoryType0")
|
9
|
-
|
10
|
-
|
11
|
-
@_attrs_define
|
12
|
-
class RepositoryType0:
|
13
|
-
"""Repository
|
14
|
-
|
15
|
-
Attributes:
|
16
|
-
type_ (Union[Unset, str]): Repository type
|
17
|
-
url (Union[Unset, str]): Repository URL
|
18
|
-
"""
|
19
|
-
|
20
|
-
type_: Union[Unset, str] = UNSET
|
21
|
-
url: 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
|
-
type_ = self.type_
|
26
|
-
|
27
|
-
url = self.url
|
28
|
-
|
29
|
-
field_dict: dict[str, Any] = {}
|
30
|
-
field_dict.update(self.additional_properties)
|
31
|
-
field_dict.update({})
|
32
|
-
if type_ is not UNSET:
|
33
|
-
field_dict["type"] = type_
|
34
|
-
if url is not UNSET:
|
35
|
-
field_dict["url"] = url
|
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
|
-
type_ = d.pop("type", UNSET)
|
45
|
-
|
46
|
-
url = d.pop("url", UNSET)
|
47
|
-
|
48
|
-
repository_type_0 = cls(
|
49
|
-
type_=type_,
|
50
|
-
url=url,
|
51
|
-
)
|
52
|
-
|
53
|
-
repository_type_0.additional_properties = d
|
54
|
-
return repository_type_0
|
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,176 +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
|
-
from ..models.resource_deployment_metrics_inference_per_second_per_region import (
|
12
|
-
ResourceDeploymentMetricsInferencePerSecondPerRegion,
|
13
|
-
)
|
14
|
-
from ..models.resource_deployment_metrics_query_per_second_per_region_per_code import (
|
15
|
-
ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode,
|
16
|
-
)
|
17
|
-
|
18
|
-
|
19
|
-
T = TypeVar("T", bound="ResourceDeploymentMetrics")
|
20
|
-
|
21
|
-
|
22
|
-
@_attrs_define
|
23
|
-
class ResourceDeploymentMetrics:
|
24
|
-
"""Metrics for a single resource deployment (eg. model deployment, function deployment)
|
25
|
-
|
26
|
-
Attributes:
|
27
|
-
inference_per_second_global (Union[Unset, list['Metric']]): Array of metrics
|
28
|
-
inference_per_second_per_region (Union[Unset, ResourceDeploymentMetricsInferencePerSecondPerRegion]): Historical
|
29
|
-
requests per second (RPS) per location, for the model deployment
|
30
|
-
query_per_second_global (Union[Unset, float]): RPS value (in last 24 hours) for the model deployment globally
|
31
|
-
query_per_second_per_code_global (Union[Unset, QPS]): Query per second per element, can be per response status
|
32
|
-
code (e.g. 200, 400) or per location
|
33
|
-
query_per_second_per_region (Union[Unset, QPS]): Query per second per element, can be per response status code
|
34
|
-
(e.g. 200, 400) or per location
|
35
|
-
query_per_second_per_region_per_code (Union[Unset, ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode]):
|
36
|
-
RPS value (in last 24 hours) per response status code per location, for the model deployment
|
37
|
-
"""
|
38
|
-
|
39
|
-
inference_per_second_global: Union[Unset, list["Metric"]] = UNSET
|
40
|
-
inference_per_second_per_region: Union[Unset, "ResourceDeploymentMetricsInferencePerSecondPerRegion"] = UNSET
|
41
|
-
query_per_second_global: Union[Unset, float] = UNSET
|
42
|
-
query_per_second_per_code_global: Union[Unset, "QPS"] = UNSET
|
43
|
-
query_per_second_per_region: Union[Unset, "QPS"] = UNSET
|
44
|
-
query_per_second_per_region_per_code: Union[Unset, "ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode"] = (
|
45
|
-
UNSET
|
46
|
-
)
|
47
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
48
|
-
|
49
|
-
def to_dict(self) -> dict[str, Any]:
|
50
|
-
inference_per_second_global: Union[Unset, list[dict[str, Any]]] = UNSET
|
51
|
-
if not isinstance(self.inference_per_second_global, Unset):
|
52
|
-
inference_per_second_global = []
|
53
|
-
for componentsschemas_array_metric_item_data in self.inference_per_second_global:
|
54
|
-
componentsschemas_array_metric_item = componentsschemas_array_metric_item_data.to_dict()
|
55
|
-
inference_per_second_global.append(componentsschemas_array_metric_item)
|
56
|
-
|
57
|
-
inference_per_second_per_region: Union[Unset, dict[str, Any]] = UNSET
|
58
|
-
if self.inference_per_second_per_region and not isinstance(self.inference_per_second_per_region, Unset):
|
59
|
-
inference_per_second_per_region = self.inference_per_second_per_region.to_dict()
|
60
|
-
|
61
|
-
query_per_second_global = self.query_per_second_global
|
62
|
-
|
63
|
-
query_per_second_per_code_global: Union[Unset, dict[str, Any]] = UNSET
|
64
|
-
if self.query_per_second_per_code_global and not isinstance(self.query_per_second_per_code_global, Unset):
|
65
|
-
query_per_second_per_code_global = self.query_per_second_per_code_global.to_dict()
|
66
|
-
|
67
|
-
query_per_second_per_region: Union[Unset, dict[str, Any]] = UNSET
|
68
|
-
if self.query_per_second_per_region and not isinstance(self.query_per_second_per_region, Unset):
|
69
|
-
query_per_second_per_region = self.query_per_second_per_region.to_dict()
|
70
|
-
|
71
|
-
query_per_second_per_region_per_code: Union[Unset, dict[str, Any]] = UNSET
|
72
|
-
if self.query_per_second_per_region_per_code and not isinstance(
|
73
|
-
self.query_per_second_per_region_per_code, Unset
|
74
|
-
):
|
75
|
-
query_per_second_per_region_per_code = self.query_per_second_per_region_per_code.to_dict()
|
76
|
-
|
77
|
-
field_dict: dict[str, Any] = {}
|
78
|
-
field_dict.update(self.additional_properties)
|
79
|
-
field_dict.update({})
|
80
|
-
if inference_per_second_global is not UNSET:
|
81
|
-
field_dict["inference_per_second_global"] = inference_per_second_global
|
82
|
-
if inference_per_second_per_region is not UNSET:
|
83
|
-
field_dict["inference_per_second_per_region"] = inference_per_second_per_region
|
84
|
-
if query_per_second_global is not UNSET:
|
85
|
-
field_dict["query_per_second_global"] = query_per_second_global
|
86
|
-
if query_per_second_per_code_global is not UNSET:
|
87
|
-
field_dict["query_per_second_per_code_global"] = query_per_second_per_code_global
|
88
|
-
if query_per_second_per_region is not UNSET:
|
89
|
-
field_dict["query_per_second_per_region"] = query_per_second_per_region
|
90
|
-
if query_per_second_per_region_per_code is not UNSET:
|
91
|
-
field_dict["query_per_second_per_region_per_code"] = query_per_second_per_region_per_code
|
92
|
-
|
93
|
-
return field_dict
|
94
|
-
|
95
|
-
@classmethod
|
96
|
-
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
97
|
-
from ..models.metric import Metric
|
98
|
-
from ..models.qps import QPS
|
99
|
-
from ..models.resource_deployment_metrics_inference_per_second_per_region import (
|
100
|
-
ResourceDeploymentMetricsInferencePerSecondPerRegion,
|
101
|
-
)
|
102
|
-
from ..models.resource_deployment_metrics_query_per_second_per_region_per_code import (
|
103
|
-
ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode,
|
104
|
-
)
|
105
|
-
|
106
|
-
if not src_dict:
|
107
|
-
return None
|
108
|
-
d = src_dict.copy()
|
109
|
-
inference_per_second_global = []
|
110
|
-
_inference_per_second_global = d.pop("inference_per_second_global", UNSET)
|
111
|
-
for componentsschemas_array_metric_item_data in _inference_per_second_global or []:
|
112
|
-
componentsschemas_array_metric_item = Metric.from_dict(componentsschemas_array_metric_item_data)
|
113
|
-
|
114
|
-
inference_per_second_global.append(componentsschemas_array_metric_item)
|
115
|
-
|
116
|
-
_inference_per_second_per_region = d.pop("inference_per_second_per_region", UNSET)
|
117
|
-
inference_per_second_per_region: Union[Unset, ResourceDeploymentMetricsInferencePerSecondPerRegion]
|
118
|
-
if isinstance(_inference_per_second_per_region, Unset):
|
119
|
-
inference_per_second_per_region = UNSET
|
120
|
-
else:
|
121
|
-
inference_per_second_per_region = ResourceDeploymentMetricsInferencePerSecondPerRegion.from_dict(
|
122
|
-
_inference_per_second_per_region
|
123
|
-
)
|
124
|
-
|
125
|
-
query_per_second_global = d.pop("query_per_second_global", UNSET)
|
126
|
-
|
127
|
-
_query_per_second_per_code_global = d.pop("query_per_second_per_code_global", UNSET)
|
128
|
-
query_per_second_per_code_global: Union[Unset, QPS]
|
129
|
-
if isinstance(_query_per_second_per_code_global, Unset):
|
130
|
-
query_per_second_per_code_global = UNSET
|
131
|
-
else:
|
132
|
-
query_per_second_per_code_global = QPS.from_dict(_query_per_second_per_code_global)
|
133
|
-
|
134
|
-
_query_per_second_per_region = d.pop("query_per_second_per_region", UNSET)
|
135
|
-
query_per_second_per_region: Union[Unset, QPS]
|
136
|
-
if isinstance(_query_per_second_per_region, Unset):
|
137
|
-
query_per_second_per_region = UNSET
|
138
|
-
else:
|
139
|
-
query_per_second_per_region = QPS.from_dict(_query_per_second_per_region)
|
140
|
-
|
141
|
-
_query_per_second_per_region_per_code = d.pop("query_per_second_per_region_per_code", UNSET)
|
142
|
-
query_per_second_per_region_per_code: Union[Unset, ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode]
|
143
|
-
if isinstance(_query_per_second_per_region_per_code, Unset):
|
144
|
-
query_per_second_per_region_per_code = UNSET
|
145
|
-
else:
|
146
|
-
query_per_second_per_region_per_code = ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode.from_dict(
|
147
|
-
_query_per_second_per_region_per_code
|
148
|
-
)
|
149
|
-
|
150
|
-
resource_deployment_metrics = cls(
|
151
|
-
inference_per_second_global=inference_per_second_global,
|
152
|
-
inference_per_second_per_region=inference_per_second_per_region,
|
153
|
-
query_per_second_global=query_per_second_global,
|
154
|
-
query_per_second_per_code_global=query_per_second_per_code_global,
|
155
|
-
query_per_second_per_region=query_per_second_per_region,
|
156
|
-
query_per_second_per_region_per_code=query_per_second_per_region_per_code,
|
157
|
-
)
|
158
|
-
|
159
|
-
resource_deployment_metrics.additional_properties = d
|
160
|
-
return resource_deployment_metrics
|
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
|