beamlit 0.0.19__py3-none-any.whl → 0.0.20__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- beamlit/agents/__init__.py +4 -0
- beamlit/agents/chat.py +87 -0
- beamlit/agents/decorator.py +147 -0
- beamlit/api/agents/create_agent.py +14 -9
- beamlit/api/agents/delete_agent_history.py +159 -0
- beamlit/api/agents/get_agent_deployment_logs.py +11 -11
- beamlit/api/{authentication_providers/list_organizations_for_authentication_provider.py → agents/get_agent_environment_logs.py} +30 -42
- beamlit/api/{authentication_providers/get_model_with_repo_for_authentication_provider.py → agents/get_agent_history.py} +43 -68
- beamlit/api/agents/list_agent_deployment_history.py +11 -11
- beamlit/api/agents/list_agent_deployments.py +11 -11
- beamlit/api/agents/list_agent_history.py +151 -0
- beamlit/api/agents/list_agents.py +11 -11
- beamlit/api/agents/put_agent_history.py +185 -0
- beamlit/api/agents/update_agent.py +14 -9
- beamlit/api/environments/list_environments.py +11 -11
- beamlit/api/functions/create_function.py +14 -9
- beamlit/api/functions/get_function_deployment_logs.py +11 -11
- beamlit/api/functions/get_function_environment_logs.py +151 -0
- beamlit/api/functions/list_function_deployments.py +11 -11
- beamlit/api/functions/list_functions.py +11 -11
- beamlit/api/functions/update_function.py +14 -9
- beamlit/api/history/get_agents_history.py +11 -11
- beamlit/api/history/list_agents_history.py +11 -11
- beamlit/api/integrations/create_integration_connection.py +167 -0
- beamlit/api/integrations/delete_integration_connection.py +158 -0
- beamlit/api/integrations/get_integration.py +97 -0
- beamlit/api/integrations/get_integration_connection.py +154 -0
- beamlit/api/integrations/get_integration_connection_model.py +97 -0
- beamlit/api/integrations/get_integration_model.py +97 -0
- beamlit/api/integrations/list_integration_connection_models.py +97 -0
- beamlit/api/integrations/list_integration_connections.py +139 -0
- beamlit/api/integrations/list_integration_models.py +97 -0
- beamlit/api/integrations/update_integration_connection.py +180 -0
- beamlit/api/invitations/list_all_pending_invitations.py +11 -11
- beamlit/api/locations/list_locations.py +11 -11
- beamlit/api/model_providers/list_model_providers.py +11 -11
- beamlit/api/models/get_model_deployment_logs.py +11 -11
- beamlit/api/{authentication_providers/list_models_for_authentication_provider.py → models/get_model_environment_logs.py} +30 -38
- beamlit/api/models/list_model_deployments.py +11 -11
- beamlit/api/models/list_models.py +11 -11
- beamlit/api/policies/list_policies.py +11 -11
- beamlit/api/service_accounts/get_workspace_service_accounts.py +11 -11
- beamlit/api/service_accounts/list_api_keys_for_service_account.py +11 -11
- beamlit/api/store/list_store_agents.py +11 -11
- beamlit/api/store/list_store_functions.py +11 -11
- beamlit/api/workspaces/list_workspace_users.py +11 -11
- beamlit/api/workspaces/list_workspaces.py +11 -11
- beamlit/authentication/__init__.py +29 -8
- beamlit/authentication/apikey.py +8 -2
- beamlit/authentication/authentication.py +66 -3
- beamlit/authentication/clientcredentials.py +108 -0
- beamlit/authentication/credentials.py +22 -8
- beamlit/authentication/device_mode.py +23 -13
- beamlit/common/__init__.py +13 -0
- beamlit/common/generate.py +183 -0
- beamlit/common/logger.py +29 -0
- beamlit/common/secrets.py +11 -0
- beamlit/common/settings.py +156 -0
- beamlit/common/utils.py +15 -0
- beamlit/functions/__init__.py +5 -0
- beamlit/functions/decorator.py +90 -0
- beamlit/functions/github/__init__.py +3 -0
- beamlit/functions/github/github.py +21 -0
- beamlit/functions/github/kit/__init__.py +7 -0
- beamlit/functions/github/kit/pull_request.py +51 -0
- beamlit/functions/math/__init__.py +3 -0
- beamlit/functions/math/math.py +40 -0
- beamlit/functions/search/__init__.py +3 -0
- beamlit/functions/search/search.py +15 -0
- beamlit/models/__init__.py +24 -0
- beamlit/models/acl.py +4 -2
- beamlit/models/agent.py +5 -3
- beamlit/models/agent_chain.py +4 -2
- beamlit/models/agent_configuration.py +4 -2
- beamlit/models/agent_deployment.py +41 -28
- beamlit/models/agent_deployment_configuration.py +4 -2
- beamlit/models/agent_deployment_configuration_type_0.py +43 -0
- beamlit/models/agent_deployment_history.py +7 -5
- beamlit/models/agent_deployment_history_event.py +11 -9
- beamlit/models/agent_deployment_pod_template.py +4 -2
- beamlit/models/agent_deployment_pod_template_type_0.py +43 -0
- beamlit/models/agent_history.py +165 -0
- beamlit/models/agent_history_event.py +131 -0
- beamlit/models/agent_metadata.py +144 -0
- beamlit/models/agent_release.py +4 -2
- beamlit/models/agent_spec.py +248 -0
- beamlit/models/agent_with_deployments.py +176 -0
- beamlit/models/api_key.py +4 -2
- beamlit/models/authentication_provider_model.py +8 -6
- beamlit/models/authentication_provider_organization.py +4 -2
- beamlit/models/configuration.py +12 -10
- beamlit/models/continent.py +4 -2
- beamlit/models/core_spec.py +185 -0
- beamlit/models/country.py +4 -2
- beamlit/models/create_api_key_for_service_account_body.py +4 -2
- beamlit/models/create_workspace_service_account_body.py +4 -2
- beamlit/models/create_workspace_service_account_response_200.py +4 -2
- beamlit/models/delete_workspace_service_account_response_200.py +4 -2
- beamlit/models/deployment_configuration.py +4 -2
- beamlit/models/deployment_configurations.py +22 -7
- beamlit/models/deployment_serverless_config.py +4 -2
- beamlit/models/deployment_serverless_config_type_0.py +220 -0
- beamlit/models/environment.py +9 -7
- beamlit/models/environment_metrics.py +26 -5
- beamlit/models/environment_spec.py +61 -0
- beamlit/models/flavor.py +11 -9
- beamlit/models/function.py +5 -3
- beamlit/models/function_configuration.py +4 -2
- beamlit/models/function_deployment.py +33 -20
- beamlit/models/function_deployment_configuration.py +4 -2
- beamlit/models/function_deployment_configuration_type_0.py +43 -0
- beamlit/models/function_deployment_pod_template.py +4 -2
- beamlit/models/function_deployment_pod_template_type_0.py +43 -0
- beamlit/models/function_kit.py +7 -5
- beamlit/models/function_metadata.py +144 -0
- beamlit/models/function_provider_ref.py +4 -2
- beamlit/models/function_release.py +4 -2
- beamlit/models/function_spec.py +246 -0
- beamlit/models/function_with_deployments.py +176 -0
- beamlit/models/get_workspace_service_accounts_response_200_item.py +4 -2
- beamlit/models/increase_and_rate_metric.py +104 -0
- beamlit/models/integration.py +198 -0
- beamlit/models/integration_config.py +45 -0
- beamlit/models/integration_connection.py +198 -0
- beamlit/models/integration_connection_config.py +45 -0
- beamlit/models/integration_connection_secret.py +61 -0
- beamlit/models/integration_connection_spec.py +99 -0
- beamlit/models/integration_model.py +144 -0
- beamlit/models/integration_secret.py +61 -0
- beamlit/models/invite_workspace_user_body.py +4 -2
- beamlit/models/labels_type_0.py +4 -2
- beamlit/models/location.py +7 -5
- beamlit/models/location_response.py +7 -5
- beamlit/models/metadata.py +135 -0
- beamlit/models/{labels.py → metadata_labels.py} +5 -5
- beamlit/models/metric.py +4 -2
- beamlit/models/metrics.py +68 -25
- beamlit/models/model.py +5 -3
- beamlit/models/model_deployment.py +27 -14
- beamlit/models/model_deployment_log.py +4 -2
- beamlit/models/model_deployment_metrics.py +11 -9
- beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +7 -5
- beamlit/models/model_deployment_metrics_query_per_second_per_region_per_code.py +5 -3
- beamlit/models/model_deployment_pod_template.py +4 -2
- beamlit/models/model_deployment_pod_template_type_0.py +43 -0
- beamlit/models/model_metadata.py +144 -0
- beamlit/models/model_metrics.py +8 -6
- beamlit/models/model_provider.py +13 -11
- beamlit/models/model_provider_ref.py +4 -2
- beamlit/models/model_release.py +4 -2
- beamlit/models/model_spec.py +194 -0
- beamlit/models/model_with_deployments.py +8 -6
- beamlit/models/owner_fields.py +68 -0
- beamlit/models/pending_invitation.py +4 -2
- beamlit/models/pending_invitation_accept.py +5 -3
- beamlit/models/pending_invitation_render.py +7 -5
- beamlit/models/pending_invitation_render_invited_by.py +4 -2
- beamlit/models/pending_invitation_render_workspace.py +4 -2
- beamlit/models/pending_invitation_workspace_details.py +8 -6
- beamlit/models/pod_template_spec.py +43 -0
- beamlit/models/policy.py +22 -20
- beamlit/models/policy_location.py +11 -9
- beamlit/models/policy_spec.py +125 -0
- beamlit/models/provider_config.py +9 -16
- beamlit/models/qps.py +4 -2
- beamlit/models/resource_deployment_log.py +4 -2
- beamlit/models/resource_deployment_metrics.py +119 -9
- beamlit/models/resource_deployment_metrics_inference_per_region.py +77 -0
- beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +79 -0
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +7 -5
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region_type_0.py +79 -0
- beamlit/models/resource_deployment_metrics_query_per_region_per_code.py +75 -0
- beamlit/models/resource_deployment_metrics_query_per_region_per_code_type_0.py +73 -0
- beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +5 -3
- beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code_type_0.py +73 -0
- beamlit/models/resource_environment_metrics.py +210 -0
- beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +79 -0
- beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +73 -0
- beamlit/models/resource_log.py +68 -0
- beamlit/models/resource_metrics.py +44 -6
- beamlit/models/runtime.py +25 -23
- beamlit/models/runtime_readiness_probe.py +4 -2
- beamlit/models/runtime_readiness_probe_type_0.py +43 -0
- beamlit/models/runtime_resources.py +4 -2
- beamlit/models/runtime_type_0.py +111 -0
- beamlit/models/runtime_type_0_readiness_probe.py +43 -0
- beamlit/models/runtime_type_0_readiness_probe_type_0.py +43 -0
- beamlit/models/runtime_type_0_resources.py +59 -0
- beamlit/models/serverless_config.py +4 -2
- beamlit/models/spec_configuration.py +68 -0
- beamlit/models/standard_fields_dynamo_db.py +4 -2
- beamlit/models/store_agent.py +8 -6
- beamlit/models/store_agent_configuration.py +4 -2
- beamlit/models/store_agent_labels.py +4 -2
- beamlit/models/store_agent_labels_type_0.py +43 -0
- beamlit/models/store_configuration.py +18 -16
- beamlit/models/store_configuration_option.py +4 -2
- beamlit/models/store_function.py +14 -12
- beamlit/models/store_function_configuration.py +4 -2
- beamlit/models/store_function_kit.py +7 -5
- beamlit/models/store_function_labels.py +4 -2
- beamlit/models/store_function_labels_type_0.py +43 -0
- beamlit/models/store_function_parameter.py +11 -9
- beamlit/models/time_fields.py +68 -0
- beamlit/models/update_workspace_service_account_body.py +4 -2
- beamlit/models/update_workspace_service_account_response_200.py +4 -2
- beamlit/models/update_workspace_user_role_body.py +4 -2
- beamlit/models/websocket_channel.py +86 -0
- beamlit/models/workspace.py +5 -3
- beamlit/models/workspace_labels.py +4 -2
- beamlit/models/workspace_user.py +4 -2
- beamlit/run.py +49 -0
- beamlit/serve/app.py +78 -0
- beamlit/serve/middlewares/__init__.py +4 -0
- beamlit/serve/middlewares/accesslog.py +14 -0
- beamlit/serve/middlewares/processtime.py +12 -0
- {beamlit-0.0.19.dist-info → beamlit-0.0.20.dist-info}/METADATA +11 -2
- beamlit-0.0.20.dist-info/RECORD +301 -0
- beamlit-0.0.19.dist-info/RECORD +0 -211
- /beamlit/api/{authentication_providers → integrations}/__init__.py +0 -0
- {beamlit-0.0.19.dist-info → beamlit-0.0.20.dist-info}/WHEEL +0 -0
@@ -0,0 +1,144 @@
|
|
1
|
+
from typing import 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
|
+
T = TypeVar("T", bound="IntegrationModel")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class IntegrationModel:
|
13
|
+
"""Model obtained from an external authentication provider, such as HuggingFace, OpenAI, etc...
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
created_at (Union[Unset, str]): Provider model created at
|
17
|
+
downloads (Union[Unset, int]): Provider model downloads
|
18
|
+
id (Union[Unset, str]): Provider model ID
|
19
|
+
library_name (Union[Unset, str]): Provider model library name
|
20
|
+
likes (Union[Unset, int]): Provider model likes
|
21
|
+
name (Union[Unset, str]): Provider model name
|
22
|
+
pipeline_tag (Union[Unset, str]): Provider model pipeline tag
|
23
|
+
private (Union[Unset, bool]): Provider model private
|
24
|
+
tags (Union[Unset, list[str]]): Provider model tags
|
25
|
+
trending_score (Union[Unset, int]): Provider model trending score
|
26
|
+
"""
|
27
|
+
|
28
|
+
created_at: Union[Unset, str] = UNSET
|
29
|
+
downloads: Union[Unset, int] = UNSET
|
30
|
+
id: Union[Unset, str] = UNSET
|
31
|
+
library_name: Union[Unset, str] = UNSET
|
32
|
+
likes: Union[Unset, int] = UNSET
|
33
|
+
name: Union[Unset, str] = UNSET
|
34
|
+
pipeline_tag: Union[Unset, str] = UNSET
|
35
|
+
private: Union[Unset, bool] = UNSET
|
36
|
+
tags: Union[Unset, list[str]] = UNSET
|
37
|
+
trending_score: Union[Unset, int] = UNSET
|
38
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
39
|
+
|
40
|
+
def to_dict(self) -> dict[str, Any]:
|
41
|
+
created_at = self.created_at
|
42
|
+
|
43
|
+
downloads = self.downloads
|
44
|
+
|
45
|
+
id = self.id
|
46
|
+
|
47
|
+
library_name = self.library_name
|
48
|
+
|
49
|
+
likes = self.likes
|
50
|
+
|
51
|
+
name = self.name
|
52
|
+
|
53
|
+
pipeline_tag = self.pipeline_tag
|
54
|
+
|
55
|
+
private = self.private
|
56
|
+
|
57
|
+
tags: Union[Unset, list[str]] = UNSET
|
58
|
+
if not isinstance(self.tags, Unset):
|
59
|
+
tags = self.tags
|
60
|
+
|
61
|
+
trending_score = self.trending_score
|
62
|
+
|
63
|
+
field_dict: dict[str, Any] = {}
|
64
|
+
field_dict.update(self.additional_properties)
|
65
|
+
field_dict.update({})
|
66
|
+
if created_at is not UNSET:
|
67
|
+
field_dict["created_at"] = created_at
|
68
|
+
if downloads is not UNSET:
|
69
|
+
field_dict["downloads"] = downloads
|
70
|
+
if id is not UNSET:
|
71
|
+
field_dict["id"] = id
|
72
|
+
if library_name is not UNSET:
|
73
|
+
field_dict["library_name"] = library_name
|
74
|
+
if likes is not UNSET:
|
75
|
+
field_dict["likes"] = likes
|
76
|
+
if name is not UNSET:
|
77
|
+
field_dict["name"] = name
|
78
|
+
if pipeline_tag is not UNSET:
|
79
|
+
field_dict["pipeline_tag"] = pipeline_tag
|
80
|
+
if private is not UNSET:
|
81
|
+
field_dict["private"] = private
|
82
|
+
if tags is not UNSET:
|
83
|
+
field_dict["tags"] = tags
|
84
|
+
if trending_score is not UNSET:
|
85
|
+
field_dict["trending_score"] = trending_score
|
86
|
+
|
87
|
+
return field_dict
|
88
|
+
|
89
|
+
@classmethod
|
90
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
91
|
+
if not src_dict:
|
92
|
+
return None
|
93
|
+
d = src_dict.copy()
|
94
|
+
created_at = d.pop("created_at", UNSET)
|
95
|
+
|
96
|
+
downloads = d.pop("downloads", UNSET)
|
97
|
+
|
98
|
+
id = d.pop("id", UNSET)
|
99
|
+
|
100
|
+
library_name = d.pop("library_name", UNSET)
|
101
|
+
|
102
|
+
likes = d.pop("likes", UNSET)
|
103
|
+
|
104
|
+
name = d.pop("name", UNSET)
|
105
|
+
|
106
|
+
pipeline_tag = d.pop("pipeline_tag", UNSET)
|
107
|
+
|
108
|
+
private = d.pop("private", UNSET)
|
109
|
+
|
110
|
+
tags = cast(list[str], d.pop("tags", UNSET))
|
111
|
+
|
112
|
+
trending_score = d.pop("trending_score", UNSET)
|
113
|
+
|
114
|
+
integration_model = cls(
|
115
|
+
created_at=created_at,
|
116
|
+
downloads=downloads,
|
117
|
+
id=id,
|
118
|
+
library_name=library_name,
|
119
|
+
likes=likes,
|
120
|
+
name=name,
|
121
|
+
pipeline_tag=pipeline_tag,
|
122
|
+
private=private,
|
123
|
+
tags=tags,
|
124
|
+
trending_score=trending_score,
|
125
|
+
)
|
126
|
+
|
127
|
+
integration_model.additional_properties = d
|
128
|
+
return integration_model
|
129
|
+
|
130
|
+
@property
|
131
|
+
def additional_keys(self) -> list[str]:
|
132
|
+
return list(self.additional_properties.keys())
|
133
|
+
|
134
|
+
def __getitem__(self, key: str) -> Any:
|
135
|
+
return self.additional_properties[key]
|
136
|
+
|
137
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
138
|
+
self.additional_properties[key] = value
|
139
|
+
|
140
|
+
def __delitem__(self, key: str) -> None:
|
141
|
+
del self.additional_properties[key]
|
142
|
+
|
143
|
+
def __contains__(self, key: str) -> bool:
|
144
|
+
return key in self.additional_properties
|
@@ -0,0 +1,61 @@
|
|
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="IntegrationSecret")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class IntegrationSecret:
|
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["api_key"] = 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("api_key", UNSET)
|
39
|
+
|
40
|
+
integration_secret = cls(
|
41
|
+
api_key=api_key,
|
42
|
+
)
|
43
|
+
|
44
|
+
integration_secret.additional_properties = d
|
45
|
+
return integration_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
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -30,7 +30,9 @@ class InviteWorkspaceUserBody:
|
|
30
30
|
return field_dict
|
31
31
|
|
32
32
|
@classmethod
|
33
|
-
def from_dict(cls:
|
33
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
34
|
+
if not src_dict:
|
35
|
+
return None
|
34
36
|
d = src_dict.copy()
|
35
37
|
email = d.pop("email", UNSET)
|
36
38
|
|
beamlit/models/labels_type_0.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -19,7 +19,9 @@ class LabelsType0:
|
|
19
19
|
return field_dict
|
20
20
|
|
21
21
|
@classmethod
|
22
|
-
def from_dict(cls:
|
22
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
23
|
+
if not src_dict:
|
24
|
+
return None
|
23
25
|
d = src_dict.copy()
|
24
26
|
labels_type_0 = cls()
|
25
27
|
|
beamlit/models/location.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any,
|
1
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -19,7 +19,7 @@ class Location:
|
|
19
19
|
Attributes:
|
20
20
|
continent (Union[Unset, str]): Location continent
|
21
21
|
country (Union[Unset, str]): Location country
|
22
|
-
flavors (Union[Unset,
|
22
|
+
flavors (Union[Unset, list['Flavor']]): Location flavors
|
23
23
|
location (Union[Unset, str]): Location name
|
24
24
|
name (Union[Unset, str]): Location name
|
25
25
|
status (Union[Unset, str]): Location status
|
@@ -27,7 +27,7 @@ class Location:
|
|
27
27
|
|
28
28
|
continent: Union[Unset, str] = UNSET
|
29
29
|
country: Union[Unset, str] = UNSET
|
30
|
-
flavors: Union[Unset,
|
30
|
+
flavors: Union[Unset, list["Flavor"]] = UNSET
|
31
31
|
location: Union[Unset, str] = UNSET
|
32
32
|
name: Union[Unset, str] = UNSET
|
33
33
|
status: Union[Unset, str] = UNSET
|
@@ -38,7 +38,7 @@ class Location:
|
|
38
38
|
|
39
39
|
country = self.country
|
40
40
|
|
41
|
-
flavors: Union[Unset,
|
41
|
+
flavors: Union[Unset, list[dict[str, Any]]] = UNSET
|
42
42
|
if not isinstance(self.flavors, Unset):
|
43
43
|
flavors = []
|
44
44
|
for flavors_item_data in self.flavors:
|
@@ -70,9 +70,11 @@ class Location:
|
|
70
70
|
return field_dict
|
71
71
|
|
72
72
|
@classmethod
|
73
|
-
def from_dict(cls:
|
73
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
74
74
|
from ..models.flavor import Flavor
|
75
75
|
|
76
|
+
if not src_dict:
|
77
|
+
return None
|
76
78
|
d = src_dict.copy()
|
77
79
|
continent = d.pop("continent", UNSET)
|
78
80
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any,
|
1
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -19,14 +19,14 @@ class LocationResponse:
|
|
19
19
|
Attributes:
|
20
20
|
continent (Union[Unset, str]): Continent of the location
|
21
21
|
country (Union[Unset, str]): Country of the location
|
22
|
-
flavors (Union[Unset,
|
22
|
+
flavors (Union[Unset, list['Flavor']]): Hardware flavors available in the location
|
23
23
|
location (Union[Unset, str]): Name of the location
|
24
24
|
status (Union[Unset, str]): Status of the location
|
25
25
|
"""
|
26
26
|
|
27
27
|
continent: Union[Unset, str] = UNSET
|
28
28
|
country: Union[Unset, str] = UNSET
|
29
|
-
flavors: Union[Unset,
|
29
|
+
flavors: Union[Unset, list["Flavor"]] = UNSET
|
30
30
|
location: Union[Unset, str] = UNSET
|
31
31
|
status: Union[Unset, str] = UNSET
|
32
32
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
@@ -36,7 +36,7 @@ class LocationResponse:
|
|
36
36
|
|
37
37
|
country = self.country
|
38
38
|
|
39
|
-
flavors: Union[Unset,
|
39
|
+
flavors: Union[Unset, list[dict[str, Any]]] = UNSET
|
40
40
|
if not isinstance(self.flavors, Unset):
|
41
41
|
flavors = []
|
42
42
|
for flavors_item_data in self.flavors:
|
@@ -64,9 +64,11 @@ class LocationResponse:
|
|
64
64
|
return field_dict
|
65
65
|
|
66
66
|
@classmethod
|
67
|
-
def from_dict(cls:
|
67
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
68
68
|
from ..models.flavor import Flavor
|
69
69
|
|
70
|
+
if not src_dict:
|
71
|
+
return None
|
70
72
|
d = src_dict.copy()
|
71
73
|
continent = d.pop("continent", UNSET)
|
72
74
|
|
@@ -0,0 +1,135 @@
|
|
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.metadata_labels import MetadataLabels
|
10
|
+
|
11
|
+
|
12
|
+
T = TypeVar("T", bound="Metadata")
|
13
|
+
|
14
|
+
|
15
|
+
@_attrs_define
|
16
|
+
class Metadata:
|
17
|
+
"""Metadata
|
18
|
+
|
19
|
+
Attributes:
|
20
|
+
created_at (Union[Unset, str]): The date and time when the resource was created
|
21
|
+
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
22
|
+
created_by (Union[Unset, str]): The user or service account who created the resource
|
23
|
+
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
24
|
+
display_name (Union[Unset, str]): Model display name
|
25
|
+
labels (Union[Unset, MetadataLabels]): Labels
|
26
|
+
name (Union[Unset, str]): Model name
|
27
|
+
workspace (Union[Unset, str]): Workspace name
|
28
|
+
"""
|
29
|
+
|
30
|
+
created_at: Union[Unset, str] = UNSET
|
31
|
+
updated_at: Union[Unset, str] = UNSET
|
32
|
+
created_by: Union[Unset, str] = UNSET
|
33
|
+
updated_by: Union[Unset, str] = UNSET
|
34
|
+
display_name: Union[Unset, str] = UNSET
|
35
|
+
labels: Union[Unset, "MetadataLabels"] = UNSET
|
36
|
+
name: Union[Unset, str] = UNSET
|
37
|
+
workspace: Union[Unset, str] = UNSET
|
38
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
39
|
+
|
40
|
+
def to_dict(self) -> dict[str, Any]:
|
41
|
+
created_at = self.created_at
|
42
|
+
|
43
|
+
updated_at = self.updated_at
|
44
|
+
|
45
|
+
created_by = self.created_by
|
46
|
+
|
47
|
+
updated_by = self.updated_by
|
48
|
+
|
49
|
+
display_name = self.display_name
|
50
|
+
|
51
|
+
labels: Union[Unset, Dict[str, Any]] = UNSET
|
52
|
+
if not isinstance(self.labels, Unset):
|
53
|
+
labels = self.labels.to_dict()
|
54
|
+
|
55
|
+
name = self.name
|
56
|
+
|
57
|
+
workspace = self.workspace
|
58
|
+
|
59
|
+
field_dict: dict[str, Any] = {}
|
60
|
+
field_dict.update(self.additional_properties)
|
61
|
+
field_dict.update({})
|
62
|
+
if created_at is not UNSET:
|
63
|
+
field_dict["createdAt"] = created_at
|
64
|
+
if updated_at is not UNSET:
|
65
|
+
field_dict["updatedAt"] = updated_at
|
66
|
+
if created_by is not UNSET:
|
67
|
+
field_dict["createdBy"] = created_by
|
68
|
+
if updated_by is not UNSET:
|
69
|
+
field_dict["updatedBy"] = updated_by
|
70
|
+
if display_name is not UNSET:
|
71
|
+
field_dict["displayName"] = display_name
|
72
|
+
if labels is not UNSET:
|
73
|
+
field_dict["labels"] = labels
|
74
|
+
if name is not UNSET:
|
75
|
+
field_dict["name"] = name
|
76
|
+
if workspace is not UNSET:
|
77
|
+
field_dict["workspace"] = workspace
|
78
|
+
|
79
|
+
return field_dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
83
|
+
from ..models.metadata_labels import MetadataLabels
|
84
|
+
|
85
|
+
d = src_dict.copy()
|
86
|
+
created_at = d.pop("createdAt", UNSET)
|
87
|
+
|
88
|
+
updated_at = d.pop("updatedAt", UNSET)
|
89
|
+
|
90
|
+
created_by = d.pop("createdBy", UNSET)
|
91
|
+
|
92
|
+
updated_by = d.pop("updatedBy", UNSET)
|
93
|
+
|
94
|
+
display_name = d.pop("displayName", UNSET)
|
95
|
+
|
96
|
+
_labels = d.pop("labels", UNSET)
|
97
|
+
labels: Union[Unset, MetadataLabels]
|
98
|
+
if isinstance(_labels, Unset):
|
99
|
+
labels = UNSET
|
100
|
+
else:
|
101
|
+
labels = MetadataLabels.from_dict(_labels)
|
102
|
+
|
103
|
+
name = d.pop("name", UNSET)
|
104
|
+
|
105
|
+
workspace = d.pop("workspace", UNSET)
|
106
|
+
|
107
|
+
metadata = cls(
|
108
|
+
created_at=created_at,
|
109
|
+
updated_at=updated_at,
|
110
|
+
created_by=created_by,
|
111
|
+
updated_by=updated_by,
|
112
|
+
display_name=display_name,
|
113
|
+
labels=labels,
|
114
|
+
name=name,
|
115
|
+
workspace=workspace,
|
116
|
+
)
|
117
|
+
|
118
|
+
metadata.additional_properties = d
|
119
|
+
return metadata
|
120
|
+
|
121
|
+
@property
|
122
|
+
def additional_keys(self) -> list[str]:
|
123
|
+
return list(self.additional_properties.keys())
|
124
|
+
|
125
|
+
def __getitem__(self, key: str) -> Any:
|
126
|
+
return self.additional_properties[key]
|
127
|
+
|
128
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
129
|
+
self.additional_properties[key] = value
|
130
|
+
|
131
|
+
def __delitem__(self, key: str) -> None:
|
132
|
+
del self.additional_properties[key]
|
133
|
+
|
134
|
+
def __contains__(self, key: str) -> bool:
|
135
|
+
return key in self.additional_properties
|
@@ -3,11 +3,11 @@ from typing import Any, Type, TypeVar
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
5
5
|
|
6
|
-
T = TypeVar("T", bound="
|
6
|
+
T = TypeVar("T", bound="MetadataLabels")
|
7
7
|
|
8
8
|
|
9
9
|
@_attrs_define
|
10
|
-
class
|
10
|
+
class MetadataLabels:
|
11
11
|
"""Labels"""
|
12
12
|
|
13
13
|
additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
|
@@ -21,10 +21,10 @@ class Labels:
|
|
21
21
|
@classmethod
|
22
22
|
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
23
23
|
d = src_dict.copy()
|
24
|
-
|
24
|
+
metadata_labels = cls()
|
25
25
|
|
26
|
-
|
27
|
-
return
|
26
|
+
metadata_labels.additional_properties = d
|
27
|
+
return metadata_labels
|
28
28
|
|
29
29
|
@property
|
30
30
|
def additional_keys(self) -> list[str]:
|
beamlit/models/metric.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -37,7 +37,9 @@ class Metric:
|
|
37
37
|
return field_dict
|
38
38
|
|
39
39
|
@classmethod
|
40
|
-
def from_dict(cls:
|
40
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
41
|
+
if not src_dict:
|
42
|
+
return None
|
41
43
|
d = src_dict.copy()
|
42
44
|
timestamp = d.pop("timestamp", UNSET)
|
43
45
|
|
beamlit/models/metrics.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any,
|
1
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -6,6 +6,7 @@ from attrs import field as _attrs_field
|
|
6
6
|
from ..types import UNSET, Unset
|
7
7
|
|
8
8
|
if TYPE_CHECKING:
|
9
|
+
from ..models.increase_and_rate_metric import IncreaseAndRateMetric
|
9
10
|
from ..models.metric import Metric
|
10
11
|
|
11
12
|
|
@@ -17,60 +18,79 @@ class Metrics:
|
|
17
18
|
"""Metrics for resources
|
18
19
|
|
19
20
|
Attributes:
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
models (Union[Unset, Any]): Metrics for models
|
21
|
+
inference_global (Union[Unset, Any]): Historical requests for all resources globally
|
22
|
+
inference_per_second_global (Union[Unset, list['Metric']]): Array of metrics
|
23
|
+
query (Union[Unset, Any]): Number of requests for all resources globally
|
24
24
|
query_per_second (Union[Unset, float]): RPS value (in last 24 hours) per location, for all resources globally
|
25
|
+
agents (Union[Unset, IncreaseAndRateMetric]): Metrics for resources
|
26
|
+
functions (Union[Unset, IncreaseAndRateMetric]): Metrics for resources
|
27
|
+
models (Union[Unset, IncreaseAndRateMetric]): Metrics for resources
|
25
28
|
"""
|
26
29
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
models: Union[Unset, Any] = UNSET
|
30
|
+
inference_global: Union[Unset, Any] = UNSET
|
31
|
+
inference_per_second_global: Union[Unset, list["Metric"]] = UNSET
|
32
|
+
query: Union[Unset, Any] = UNSET
|
31
33
|
query_per_second: Union[Unset, float] = UNSET
|
34
|
+
agents: Union[Unset, "IncreaseAndRateMetric"] = UNSET
|
35
|
+
functions: Union[Unset, "IncreaseAndRateMetric"] = UNSET
|
36
|
+
models: Union[Unset, "IncreaseAndRateMetric"] = UNSET
|
32
37
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
33
38
|
|
34
39
|
def to_dict(self) -> dict[str, Any]:
|
35
|
-
|
40
|
+
inference_global = self.inference_global
|
36
41
|
|
37
|
-
|
38
|
-
|
39
|
-
inference_per_second_global: Union[Unset, List[Dict[str, Any]]] = UNSET
|
42
|
+
inference_per_second_global: Union[Unset, list[dict[str, Any]]] = UNSET
|
40
43
|
if not isinstance(self.inference_per_second_global, Unset):
|
41
44
|
inference_per_second_global = []
|
42
45
|
for componentsschemas_array_metric_item_data in self.inference_per_second_global:
|
43
46
|
componentsschemas_array_metric_item = componentsschemas_array_metric_item_data.to_dict()
|
44
47
|
inference_per_second_global.append(componentsschemas_array_metric_item)
|
45
48
|
|
46
|
-
|
49
|
+
query = self.query
|
47
50
|
|
48
51
|
query_per_second = self.query_per_second
|
49
52
|
|
53
|
+
agents: Union[Unset, dict[str, Any]] = UNSET
|
54
|
+
if not isinstance(self.agents, Unset):
|
55
|
+
agents = self.agents.to_dict()
|
56
|
+
|
57
|
+
functions: Union[Unset, dict[str, Any]] = UNSET
|
58
|
+
if not isinstance(self.functions, Unset):
|
59
|
+
functions = self.functions.to_dict()
|
60
|
+
|
61
|
+
models: Union[Unset, dict[str, Any]] = UNSET
|
62
|
+
if not isinstance(self.models, Unset):
|
63
|
+
models = self.models.to_dict()
|
64
|
+
|
50
65
|
field_dict: dict[str, Any] = {}
|
51
66
|
field_dict.update(self.additional_properties)
|
52
67
|
field_dict.update({})
|
68
|
+
if inference_global is not UNSET:
|
69
|
+
field_dict["inference_global"] = inference_global
|
70
|
+
if inference_per_second_global is not UNSET:
|
71
|
+
field_dict["inference_per_second_global"] = inference_per_second_global
|
72
|
+
if query is not UNSET:
|
73
|
+
field_dict["query"] = query
|
74
|
+
if query_per_second is not UNSET:
|
75
|
+
field_dict["query_per_second"] = query_per_second
|
53
76
|
if agents is not UNSET:
|
54
77
|
field_dict["agents"] = agents
|
55
78
|
if functions is not UNSET:
|
56
79
|
field_dict["functions"] = functions
|
57
|
-
if inference_per_second_global is not UNSET:
|
58
|
-
field_dict["inference_per_second_global"] = inference_per_second_global
|
59
80
|
if models is not UNSET:
|
60
81
|
field_dict["models"] = models
|
61
|
-
if query_per_second is not UNSET:
|
62
|
-
field_dict["query_per_second"] = query_per_second
|
63
82
|
|
64
83
|
return field_dict
|
65
84
|
|
66
85
|
@classmethod
|
67
|
-
def from_dict(cls:
|
86
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
87
|
+
from ..models.increase_and_rate_metric import IncreaseAndRateMetric
|
68
88
|
from ..models.metric import Metric
|
69
89
|
|
90
|
+
if not src_dict:
|
91
|
+
return None
|
70
92
|
d = src_dict.copy()
|
71
|
-
|
72
|
-
|
73
|
-
functions = d.pop("functions", UNSET)
|
93
|
+
inference_global = d.pop("inference_global", UNSET)
|
74
94
|
|
75
95
|
inference_per_second_global = []
|
76
96
|
_inference_per_second_global = d.pop("inference_per_second_global", UNSET)
|
@@ -79,16 +99,39 @@ class Metrics:
|
|
79
99
|
|
80
100
|
inference_per_second_global.append(componentsschemas_array_metric_item)
|
81
101
|
|
82
|
-
|
102
|
+
query = d.pop("query", UNSET)
|
83
103
|
|
84
104
|
query_per_second = d.pop("query_per_second", UNSET)
|
85
105
|
|
106
|
+
_agents = d.pop("agents", UNSET)
|
107
|
+
agents: Union[Unset, IncreaseAndRateMetric]
|
108
|
+
if isinstance(_agents, Unset):
|
109
|
+
agents = UNSET
|
110
|
+
else:
|
111
|
+
agents = IncreaseAndRateMetric.from_dict(_agents)
|
112
|
+
|
113
|
+
_functions = d.pop("functions", UNSET)
|
114
|
+
functions: Union[Unset, IncreaseAndRateMetric]
|
115
|
+
if isinstance(_functions, Unset):
|
116
|
+
functions = UNSET
|
117
|
+
else:
|
118
|
+
functions = IncreaseAndRateMetric.from_dict(_functions)
|
119
|
+
|
120
|
+
_models = d.pop("models", UNSET)
|
121
|
+
models: Union[Unset, IncreaseAndRateMetric]
|
122
|
+
if isinstance(_models, Unset):
|
123
|
+
models = UNSET
|
124
|
+
else:
|
125
|
+
models = IncreaseAndRateMetric.from_dict(_models)
|
126
|
+
|
86
127
|
metrics = cls(
|
128
|
+
inference_global=inference_global,
|
129
|
+
inference_per_second_global=inference_per_second_global,
|
130
|
+
query=query,
|
131
|
+
query_per_second=query_per_second,
|
87
132
|
agents=agents,
|
88
133
|
functions=functions,
|
89
|
-
inference_per_second_global=inference_per_second_global,
|
90
134
|
models=models,
|
91
|
-
query_per_second=query_per_second,
|
92
135
|
)
|
93
136
|
|
94
137
|
metrics.additional_properties = d
|