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.
Files changed (73) hide show
  1. beamlit/agents/decorator.py +3 -3
  2. beamlit/api/{model_providers/delete_model_provider.py → accounts/delete_account.py} +42 -35
  3. beamlit/api/{model_providers/get_model_provider.py → accounts/get_account.py} +34 -34
  4. beamlit/api/{model_providers/list_model_providers.py → accounts/list_accounts.py} +21 -21
  5. beamlit/api/{model_providers/update_model_provider.py → accounts/update_account.py} +43 -43
  6. beamlit/api/agents/get_agent_metrics.py +12 -12
  7. beamlit/api/{model_providers/create_model_provider.py → default/create_account.py} +30 -30
  8. beamlit/api/functions/get_function_metrics.py +12 -12
  9. beamlit/api/models/get_model_metrics.py +12 -12
  10. beamlit/functions/common.py +0 -1
  11. beamlit/functions/mcp/mcp.py +3 -2
  12. beamlit/models/__init__.py +16 -30
  13. beamlit/models/{model_metadata.py → account.py} +93 -15
  14. beamlit/models/{agent_metadata.py → account_metadata.py} +16 -41
  15. beamlit/models/account_spec.py +123 -0
  16. beamlit/models/{agent_render.py → account_spec_address.py} +6 -6
  17. beamlit/models/agent.py +6 -2
  18. beamlit/models/agent_spec.py +30 -6
  19. beamlit/models/billing_address.py +133 -0
  20. beamlit/models/core_spec.py +27 -5
  21. beamlit/models/core_spec_configurations.py +3 -1
  22. beamlit/models/environment.py +6 -2
  23. beamlit/models/environment_metadata.py +3 -1
  24. beamlit/models/function.py +6 -2
  25. beamlit/models/function_spec.py +27 -5
  26. beamlit/models/integration_connection.py +6 -2
  27. beamlit/models/integration_connection_spec.py +18 -14
  28. beamlit/models/{function_render.py → integration_connection_spec_config.py} +6 -6
  29. beamlit/models/{core_status.py → integration_connection_spec_secret.py} +6 -6
  30. beamlit/models/latency_metric.py +24 -4
  31. beamlit/models/metadata.py +3 -1
  32. beamlit/models/metrics.py +13 -3
  33. beamlit/models/model.py +6 -2
  34. beamlit/models/model_spec.py +27 -5
  35. beamlit/models/pending_invitation_accept.py +3 -1
  36. beamlit/models/pending_invitation_render.py +13 -3
  37. beamlit/models/policy.py +6 -2
  38. beamlit/models/policy_max_tokens.py +106 -0
  39. beamlit/models/policy_spec.py +30 -0
  40. beamlit/models/request_duration_over_time_metrics.py +7 -1
  41. beamlit/models/request_total_by_origin_metric.py +14 -2
  42. beamlit/models/request_total_metric.py +10 -2
  43. beamlit/models/resource_environment_metrics.py +33 -7
  44. beamlit/models/resource_log.py +9 -0
  45. beamlit/models/runtime.py +10 -2
  46. beamlit/models/store_agent.py +3 -1
  47. beamlit/models/store_function.py +3 -1
  48. beamlit/models/token_rate_metrics.py +17 -3
  49. beamlit/models/trace_ids_response.py +3 -21
  50. beamlit/models/workspace.py +12 -1
  51. {beamlit-0.0.47rc93.dist-info → beamlit-0.0.48.dist-info}/METADATA +1 -1
  52. {beamlit-0.0.47rc93.dist-info → beamlit-0.0.48.dist-info}/RECORD +55 -70
  53. beamlit/models/function_metadata.py +0 -146
  54. beamlit/models/increase_and_rate_metric.py +0 -61
  55. beamlit/models/integration_config.py +0 -45
  56. beamlit/models/integration_connection_config.py +0 -45
  57. beamlit/models/integration_connection_secret.py +0 -61
  58. beamlit/models/model_provider.py +0 -173
  59. beamlit/models/model_render.py +0 -45
  60. beamlit/models/provider_config.py +0 -94
  61. beamlit/models/qps.py +0 -61
  62. beamlit/models/repository_type_0.py +0 -70
  63. beamlit/models/resource_deployment_metrics.py +0 -176
  64. beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +0 -77
  65. beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +0 -75
  66. beamlit/models/resource_environment_metrics_inference_per_region.py +0 -77
  67. beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +0 -77
  68. beamlit/models/resource_environment_metrics_query_per_region_per_code.py +0 -75
  69. beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +0 -75
  70. beamlit/models/resource_metrics.py +0 -96
  71. /beamlit/api/{model_providers → accounts}/__init__.py +0 -0
  72. {beamlit-0.0.47rc93.dist-info → beamlit-0.0.48.dist-info}/WHEEL +0 -0
  73. {beamlit-0.0.47rc93.dist-info → beamlit-0.0.48.dist-info}/licenses/LICENSE +0 -0
@@ -1,77 +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
-
11
-
12
- T = TypeVar("T", bound="ResourceDeploymentMetricsInferencePerSecondPerRegion")
13
-
14
-
15
- @_attrs_define
16
- class ResourceDeploymentMetricsInferencePerSecondPerRegion:
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 = componentsschemas_array_metric_item_data.to_dict()
32
- region.append(componentsschemas_array_metric_item)
33
-
34
- field_dict: dict[str, Any] = {}
35
- field_dict.update(self.additional_properties)
36
- field_dict.update({})
37
- if region is not UNSET:
38
- field_dict["region"] = region
39
-
40
- return field_dict
41
-
42
- @classmethod
43
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
44
- from ..models.metric import Metric
45
-
46
- if not src_dict:
47
- return None
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(componentsschemas_array_metric_item_data)
53
-
54
- region.append(componentsschemas_array_metric_item)
55
-
56
- resource_deployment_metrics_inference_per_second_per_region = cls(
57
- region=region,
58
- )
59
-
60
- resource_deployment_metrics_inference_per_second_per_region.additional_properties = d
61
- return resource_deployment_metrics_inference_per_second_per_region
62
-
63
- @property
64
- def additional_keys(self) -> list[str]:
65
- return list(self.additional_properties.keys())
66
-
67
- def __getitem__(self, key: str) -> Any:
68
- return self.additional_properties[key]
69
-
70
- def __setitem__(self, key: str, value: Any) -> None:
71
- self.additional_properties[key] = value
72
-
73
- def __delitem__(self, key: str) -> None:
74
- del self.additional_properties[key]
75
-
76
- def __contains__(self, key: str) -> bool:
77
- return key in self.additional_properties
@@ -1,75 +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.qps import QPS
10
-
11
-
12
- T = TypeVar("T", bound="ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode")
13
-
14
-
15
- @_attrs_define
16
- class ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode:
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 self.region and 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
- if not src_dict:
45
- return None
46
- d = src_dict.copy()
47
- _region = d.pop("region", UNSET)
48
- region: Union[Unset, QPS]
49
- if isinstance(_region, Unset):
50
- region = UNSET
51
- else:
52
- region = QPS.from_dict(_region)
53
-
54
- resource_deployment_metrics_query_per_second_per_region_per_code = cls(
55
- region=region,
56
- )
57
-
58
- resource_deployment_metrics_query_per_second_per_region_per_code.additional_properties = d
59
- return resource_deployment_metrics_query_per_second_per_region_per_code
60
-
61
- @property
62
- def additional_keys(self) -> list[str]:
63
- return list(self.additional_properties.keys())
64
-
65
- def __getitem__(self, key: str) -> Any:
66
- return self.additional_properties[key]
67
-
68
- def __setitem__(self, key: str, value: Any) -> None:
69
- self.additional_properties[key] = value
70
-
71
- def __delitem__(self, key: str) -> None:
72
- del self.additional_properties[key]
73
-
74
- def __contains__(self, key: str) -> bool:
75
- return key in self.additional_properties
@@ -1,77 +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
-
11
-
12
- T = TypeVar("T", bound="ResourceEnvironmentMetricsInferencePerRegion")
13
-
14
-
15
- @_attrs_define
16
- class ResourceEnvironmentMetricsInferencePerRegion:
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 = componentsschemas_array_metric_item_data.to_dict()
32
- region.append(componentsschemas_array_metric_item)
33
-
34
- field_dict: dict[str, Any] = {}
35
- field_dict.update(self.additional_properties)
36
- field_dict.update({})
37
- if region is not UNSET:
38
- field_dict["region"] = region
39
-
40
- return field_dict
41
-
42
- @classmethod
43
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
44
- from ..models.metric import Metric
45
-
46
- if not src_dict:
47
- return None
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(componentsschemas_array_metric_item_data)
53
-
54
- region.append(componentsschemas_array_metric_item)
55
-
56
- resource_environment_metrics_inference_per_region = cls(
57
- region=region,
58
- )
59
-
60
- resource_environment_metrics_inference_per_region.additional_properties = d
61
- return resource_environment_metrics_inference_per_region
62
-
63
- @property
64
- def additional_keys(self) -> list[str]:
65
- return list(self.additional_properties.keys())
66
-
67
- def __getitem__(self, key: str) -> Any:
68
- return self.additional_properties[key]
69
-
70
- def __setitem__(self, key: str, value: Any) -> None:
71
- self.additional_properties[key] = value
72
-
73
- def __delitem__(self, key: str) -> None:
74
- del self.additional_properties[key]
75
-
76
- def __contains__(self, key: str) -> bool:
77
- return key in self.additional_properties
@@ -1,77 +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
-
11
-
12
- T = TypeVar("T", bound="ResourceEnvironmentMetricsInferencePerSecondPerRegion")
13
-
14
-
15
- @_attrs_define
16
- class ResourceEnvironmentMetricsInferencePerSecondPerRegion:
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 = componentsschemas_array_metric_item_data.to_dict()
32
- region.append(componentsschemas_array_metric_item)
33
-
34
- field_dict: dict[str, Any] = {}
35
- field_dict.update(self.additional_properties)
36
- field_dict.update({})
37
- if region is not UNSET:
38
- field_dict["region"] = region
39
-
40
- return field_dict
41
-
42
- @classmethod
43
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
44
- from ..models.metric import Metric
45
-
46
- if not src_dict:
47
- return None
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(componentsschemas_array_metric_item_data)
53
-
54
- region.append(componentsschemas_array_metric_item)
55
-
56
- resource_environment_metrics_inference_per_second_per_region = cls(
57
- region=region,
58
- )
59
-
60
- resource_environment_metrics_inference_per_second_per_region.additional_properties = d
61
- return resource_environment_metrics_inference_per_second_per_region
62
-
63
- @property
64
- def additional_keys(self) -> list[str]:
65
- return list(self.additional_properties.keys())
66
-
67
- def __getitem__(self, key: str) -> Any:
68
- return self.additional_properties[key]
69
-
70
- def __setitem__(self, key: str, value: Any) -> None:
71
- self.additional_properties[key] = value
72
-
73
- def __delitem__(self, key: str) -> None:
74
- del self.additional_properties[key]
75
-
76
- def __contains__(self, key: str) -> bool:
77
- return key in self.additional_properties
@@ -1,75 +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.qps import QPS
10
-
11
-
12
- T = TypeVar("T", bound="ResourceEnvironmentMetricsQueryPerRegionPerCode")
13
-
14
-
15
- @_attrs_define
16
- class ResourceEnvironmentMetricsQueryPerRegionPerCode:
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
- if not src_dict:
45
- return None
46
- d = src_dict.copy()
47
- _region = d.pop("region", UNSET)
48
- region: Union[Unset, QPS]
49
- if isinstance(_region, Unset):
50
- region = UNSET
51
- else:
52
- region = QPS.from_dict(_region)
53
-
54
- resource_environment_metrics_query_per_region_per_code = cls(
55
- region=region,
56
- )
57
-
58
- resource_environment_metrics_query_per_region_per_code.additional_properties = d
59
- return resource_environment_metrics_query_per_region_per_code
60
-
61
- @property
62
- def additional_keys(self) -> list[str]:
63
- return list(self.additional_properties.keys())
64
-
65
- def __getitem__(self, key: str) -> Any:
66
- return self.additional_properties[key]
67
-
68
- def __setitem__(self, key: str, value: Any) -> None:
69
- self.additional_properties[key] = value
70
-
71
- def __delitem__(self, key: str) -> None:
72
- del self.additional_properties[key]
73
-
74
- def __contains__(self, key: str) -> bool:
75
- return key in self.additional_properties
@@ -1,75 +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.qps import QPS
10
-
11
-
12
- T = TypeVar("T", bound="ResourceEnvironmentMetricsQueryPerSecondPerRegionPerCode")
13
-
14
-
15
- @_attrs_define
16
- class ResourceEnvironmentMetricsQueryPerSecondPerRegionPerCode:
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
- if not src_dict:
45
- return None
46
- d = src_dict.copy()
47
- _region = d.pop("region", UNSET)
48
- region: Union[Unset, QPS]
49
- if isinstance(_region, Unset):
50
- region = UNSET
51
- else:
52
- region = QPS.from_dict(_region)
53
-
54
- resource_environment_metrics_query_per_second_per_region_per_code = cls(
55
- region=region,
56
- )
57
-
58
- resource_environment_metrics_query_per_second_per_region_per_code.additional_properties = d
59
- return resource_environment_metrics_query_per_second_per_region_per_code
60
-
61
- @property
62
- def additional_keys(self) -> list[str]:
63
- return list(self.additional_properties.keys())
64
-
65
- def __getitem__(self, key: str) -> Any:
66
- return self.additional_properties[key]
67
-
68
- def __setitem__(self, key: str, value: Any) -> None:
69
- self.additional_properties[key] = value
70
-
71
- def __delitem__(self, key: str) -> None:
72
- del self.additional_properties[key]
73
-
74
- def __contains__(self, key: str) -> bool:
75
- return key in self.additional_properties
@@ -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="ResourceMetrics")
14
-
15
-
16
- @_attrs_define
17
- class ResourceMetrics:
18
- """Metrics for a single resource (eg. model, function)
19
-
20
- Attributes:
21
- inference_global (Union[Unset, list['Metric']]): Array of metrics
22
- query_per_region (Union[Unset, QPS]): Query per second per element, can be per response status code (e.g. 200,
23
- 400) or per location
24
- """
25
-
26
- inference_global: Union[Unset, list["Metric"]] = UNSET
27
- query_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_global: Union[Unset, list[dict[str, Any]]] = UNSET
32
- if not isinstance(self.inference_global, Unset):
33
- inference_global = []
34
- for componentsschemas_array_metric_item_data in self.inference_global:
35
- componentsschemas_array_metric_item = componentsschemas_array_metric_item_data.to_dict()
36
- inference_global.append(componentsschemas_array_metric_item)
37
-
38
- query_per_region: Union[Unset, dict[str, Any]] = UNSET
39
- if self.query_per_region and not isinstance(self.query_per_region, Unset):
40
- query_per_region = self.query_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_global is not UNSET:
46
- field_dict["inferenceGlobal"] = inference_global
47
- if query_per_region is not UNSET:
48
- field_dict["queryPerRegion"] = query_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_global = []
61
- _inference_global = d.pop("inferenceGlobal", UNSET)
62
- for componentsschemas_array_metric_item_data in _inference_global or []:
63
- componentsschemas_array_metric_item = Metric.from_dict(componentsschemas_array_metric_item_data)
64
-
65
- inference_global.append(componentsschemas_array_metric_item)
66
-
67
- _query_per_region = d.pop("queryPerRegion", UNSET)
68
- query_per_region: Union[Unset, QPS]
69
- if isinstance(_query_per_region, Unset):
70
- query_per_region = UNSET
71
- else:
72
- query_per_region = QPS.from_dict(_query_per_region)
73
-
74
- resource_metrics = cls(
75
- inference_global=inference_global,
76
- query_per_region=query_per_region,
77
- )
78
-
79
- resource_metrics.additional_properties = d
80
- return resource_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
File without changes