Skip to content

Commit c26d9b9

Browse files
committed
GRPC clients version 11.8.0
1 parent edadb61 commit c26d9b9

File tree

8 files changed

+453
-166
lines changed

8 files changed

+453
-166
lines changed

clarifai_grpc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "11.7.9"
1+
__version__ = "11.8.0"
22

33
import os
44

clarifai_grpc/grpc/api/resources_pb2.py

Lines changed: 162 additions & 156 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clarifai_grpc/grpc/api/resources_pb2.pyi

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14477,6 +14477,7 @@ class InstanceType(google.protobuf.message.Message):
1447714477
CLOUD_PROVIDER_FIELD_NUMBER: builtins.int
1447814478
REGION_FIELD_NUMBER: builtins.int
1447914479
ALLOWED_CAPACITY_TYPES_FIELD_NUMBER: builtins.int
14480+
FEATURE_FLAG_GROUP_FIELD_NUMBER: builtins.int
1448014481
id: builtins.str
1448114482
description: builtins.str
1448214483
"""Short description of instance type."""
@@ -14491,6 +14492,8 @@ class InstanceType(google.protobuf.message.Message):
1449114492
@property
1449214493
def allowed_capacity_types(self) -> global___NodeCapacityType:
1449314494
"""The capacity types allowed for this instance type. If empty - all capacity types are allowed."""
14495+
feature_flag_group: builtins.str
14496+
"""The feature flag group associated with this instance type."""
1449414497
def __init__(
1449514498
self,
1449614499
*,
@@ -14501,6 +14504,7 @@ class InstanceType(google.protobuf.message.Message):
1450114504
cloud_provider: global___CloudProvider | None = ...,
1450214505
region: builtins.str = ...,
1450314506
allowed_capacity_types: global___NodeCapacityType | None = ...,
14507+
feature_flag_group: builtins.str = ...,
1450414508
) -> None: ...
1450514509
def HasField(
1450614510
self,
@@ -14524,6 +14528,8 @@ class InstanceType(google.protobuf.message.Message):
1452414528
b"compute_info",
1452514529
"description",
1452614530
b"description",
14531+
"feature_flag_group",
14532+
b"feature_flag_group",
1452714533
"id",
1452814534
b"id",
1452914535
"price",
@@ -14710,6 +14716,7 @@ class ComputeInfo(google.protobuf.message.Message):
1471014716
NUM_ACCELERATORS_FIELD_NUMBER: builtins.int
1471114717
ACCELERATOR_MEMORY_FIELD_NUMBER: builtins.int
1471214718
ACCELERATOR_TYPE_FIELD_NUMBER: builtins.int
14719+
ACCELERATOR_TOPOLOGY_FIELD_NUMBER: builtins.int
1471314720
cpu_limit: builtins.str
1471414721
"""Amount of CPUs to use as a limit. This follows kubernetes notation like: "1", "100m", "4.5", etc.
1471514722
See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/
@@ -14755,6 +14762,19 @@ class ComputeInfo(google.protobuf.message.Message):
1475514762
"""Or should it be removed completely and use the nodepool accelerator type itself.
1475614763
These are the supported accelerators that the model can run on.
1475714764
"""
14765+
@property
14766+
def accelerator_topology(
14767+
self,
14768+
) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
14769+
"""The number of nodes of this type needed to serve this resource.
14770+
Since 0 is not valid, this will default to 1 if 0 is provided.
14771+
uint32 num_nodes = 6; // FUTURE
14772+
14773+
For multi-host accelerators (i.e., TPU Slices), this defines the slice topology.
14774+
Corresponds to the tpu.googleapis.com/topology annotation.
14775+
Example: "2x2x1" for a 16-chip slice using v4 TPUs.
14776+
Leave empty for single-host accelerators like GPUs or non-slice TPUs.
14777+
"""
1475814778
def __init__(
1475914779
self,
1476014780
*,
@@ -14765,12 +14785,15 @@ class ComputeInfo(google.protobuf.message.Message):
1476514785
num_accelerators: builtins.int = ...,
1476614786
accelerator_memory: builtins.str = ...,
1476714787
accelerator_type: collections.abc.Iterable[builtins.str] | None = ...,
14788+
accelerator_topology: collections.abc.Iterable[builtins.str] | None = ...,
1476814789
) -> None: ...
1476914790
def ClearField(
1477014791
self,
1477114792
field_name: typing_extensions.Literal[
1477214793
"accelerator_memory",
1477314794
b"accelerator_memory",
14795+
"accelerator_topology",
14796+
b"accelerator_topology",
1477414797
"accelerator_type",
1477514798
b"accelerator_type",
1477614799
"cpu_limit",
@@ -17485,3 +17508,51 @@ class MetricSearchQuery(google.protobuf.message.Message):
1748517508
) -> None: ...
1748617509

1748717510
global___MetricSearchQuery = MetricSearchQuery
17511+
17512+
@typing_extensions.final
17513+
class MetricTypeLabels(google.protobuf.message.Message):
17514+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
17515+
17516+
@typing_extensions.final
17517+
class LabelWithValues(google.protobuf.message.Message):
17518+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
17519+
17520+
LABEL_FIELD_NUMBER: builtins.int
17521+
VALUES_FIELD_NUMBER: builtins.int
17522+
label: global___MetricLabel.ValueType
17523+
@property
17524+
def values(
17525+
self,
17526+
) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
17527+
"""sample values for this label"""
17528+
def __init__(
17529+
self,
17530+
*,
17531+
label: global___MetricLabel.ValueType = ...,
17532+
values: collections.abc.Iterable[builtins.str] | None = ...,
17533+
) -> None: ...
17534+
def ClearField(
17535+
self, field_name: typing_extensions.Literal["label", b"label", "values", b"values"]
17536+
) -> None: ...
17537+
17538+
METRIC_TYPE_FIELD_NUMBER: builtins.int
17539+
LABELS_FIELD_NUMBER: builtins.int
17540+
metric_type: global___MetricType.ValueType
17541+
@property
17542+
def labels(
17543+
self,
17544+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[
17545+
global___MetricTypeLabels.LabelWithValues
17546+
]: ...
17547+
def __init__(
17548+
self,
17549+
*,
17550+
metric_type: global___MetricType.ValueType = ...,
17551+
labels: collections.abc.Iterable[global___MetricTypeLabels.LabelWithValues] | None = ...,
17552+
) -> None: ...
17553+
def ClearField(
17554+
self,
17555+
field_name: typing_extensions.Literal["labels", b"labels", "metric_type", b"metric_type"],
17556+
) -> None: ...
17557+
17558+
global___MetricTypeLabels = MetricTypeLabels

clarifai_grpc/grpc/api/service_pb2.py

Lines changed: 19 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clarifai_grpc/grpc/api/service_pb2.pyi

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17959,3 +17959,131 @@ class MultiSecretResponse(google.protobuf.message.Message):
1795917959
) -> None: ...
1796017960

1796117961
global___MultiSecretResponse = MultiSecretResponse
17962+
17963+
@typing_extensions.final
17964+
class PostMetricsQueryRequest(google.protobuf.message.Message):
17965+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
17966+
17967+
USER_APP_ID_FIELD_NUMBER: builtins.int
17968+
QUERY_FIELD_NUMBER: builtins.int
17969+
@property
17970+
def user_app_id(self) -> proto.clarifai.api.resources_pb2.UserAppIDSet: ...
17971+
@property
17972+
def query(self) -> proto.clarifai.api.resources_pb2.MetricSearchQuery: ...
17973+
def __init__(
17974+
self,
17975+
*,
17976+
user_app_id: proto.clarifai.api.resources_pb2.UserAppIDSet | None = ...,
17977+
query: proto.clarifai.api.resources_pb2.MetricSearchQuery | None = ...,
17978+
) -> None: ...
17979+
def HasField(
17980+
self,
17981+
field_name: typing_extensions.Literal["query", b"query", "user_app_id", b"user_app_id"],
17982+
) -> builtins.bool: ...
17983+
def ClearField(
17984+
self,
17985+
field_name: typing_extensions.Literal["query", b"query", "user_app_id", b"user_app_id"],
17986+
) -> None: ...
17987+
17988+
global___PostMetricsQueryRequest = PostMetricsQueryRequest
17989+
17990+
@typing_extensions.final
17991+
class MetricsQueryResponse(google.protobuf.message.Message):
17992+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
17993+
17994+
STATUS_FIELD_NUMBER: builtins.int
17995+
DATA_FIELD_NUMBER: builtins.int
17996+
RESOLUTION_FIELD_NUMBER: builtins.int
17997+
@property
17998+
def status(self) -> proto.clarifai.api.status.status_pb2.Status: ...
17999+
@property
18000+
def data(self) -> proto.clarifai.api.resources_pb2.MetricData: ...
18001+
resolution: builtins.str
18002+
def __init__(
18003+
self,
18004+
*,
18005+
status: proto.clarifai.api.status.status_pb2.Status | None = ...,
18006+
data: proto.clarifai.api.resources_pb2.MetricData | None = ...,
18007+
resolution: builtins.str = ...,
18008+
) -> None: ...
18009+
def HasField(
18010+
self, field_name: typing_extensions.Literal["data", b"data", "status", b"status"]
18011+
) -> builtins.bool: ...
18012+
def ClearField(
18013+
self,
18014+
field_name: typing_extensions.Literal[
18015+
"data", b"data", "resolution", b"resolution", "status", b"status"
18016+
],
18017+
) -> None: ...
18018+
18019+
global___MetricsQueryResponse = MetricsQueryResponse
18020+
18021+
@typing_extensions.final
18022+
class ListMetricLabelsRequest(google.protobuf.message.Message):
18023+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
18024+
18025+
USER_APP_ID_FIELD_NUMBER: builtins.int
18026+
METRIC_TYPES_FIELD_NUMBER: builtins.int
18027+
@property
18028+
def user_app_id(self) -> proto.clarifai.api.resources_pb2.UserAppIDSet: ...
18029+
@property
18030+
def metric_types(
18031+
self,
18032+
) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[
18033+
proto.clarifai.api.resources_pb2.MetricType.ValueType
18034+
]: ...
18035+
def __init__(
18036+
self,
18037+
*,
18038+
user_app_id: proto.clarifai.api.resources_pb2.UserAppIDSet | None = ...,
18039+
metric_types: collections.abc.Iterable[
18040+
proto.clarifai.api.resources_pb2.MetricType.ValueType
18041+
]
18042+
| None = ...,
18043+
) -> None: ...
18044+
def HasField(
18045+
self, field_name: typing_extensions.Literal["user_app_id", b"user_app_id"]
18046+
) -> builtins.bool: ...
18047+
def ClearField(
18048+
self,
18049+
field_name: typing_extensions.Literal[
18050+
"metric_types", b"metric_types", "user_app_id", b"user_app_id"
18051+
],
18052+
) -> None: ...
18053+
18054+
global___ListMetricLabelsRequest = ListMetricLabelsRequest
18055+
18056+
@typing_extensions.final
18057+
class MultiMetricLabelsResponse(google.protobuf.message.Message):
18058+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
18059+
18060+
STATUS_FIELD_NUMBER: builtins.int
18061+
METRIC_TYPE_LABELS_FIELD_NUMBER: builtins.int
18062+
@property
18063+
def status(self) -> proto.clarifai.api.status.status_pb2.Status: ...
18064+
@property
18065+
def metric_type_labels(
18066+
self,
18067+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[
18068+
proto.clarifai.api.resources_pb2.MetricTypeLabels
18069+
]: ...
18070+
def __init__(
18071+
self,
18072+
*,
18073+
status: proto.clarifai.api.status.status_pb2.Status | None = ...,
18074+
metric_type_labels: collections.abc.Iterable[
18075+
proto.clarifai.api.resources_pb2.MetricTypeLabels
18076+
]
18077+
| None = ...,
18078+
) -> None: ...
18079+
def HasField(
18080+
self, field_name: typing_extensions.Literal["status", b"status"]
18081+
) -> builtins.bool: ...
18082+
def ClearField(
18083+
self,
18084+
field_name: typing_extensions.Literal[
18085+
"metric_type_labels", b"metric_type_labels", "status", b"status"
18086+
],
18087+
) -> None: ...
18088+
18089+
global___MultiMetricLabelsResponse = MultiMetricLabelsResponse

clarifai_grpc/grpc/api/service_pb2_grpc.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,6 +1424,16 @@ def __init__(self, channel):
14241424
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.DeleteSecretsRequest.SerializeToString,
14251425
response_deserializer=wrap_response_deserializer(proto_dot_clarifai_dot_api_dot_service__pb2.MultiSecretResponse),
14261426
)
1427+
self.PostMetricsQuery = channel.unary_unary(
1428+
'/clarifai.api.V2/PostMetricsQuery',
1429+
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.PostMetricsQueryRequest.SerializeToString,
1430+
response_deserializer=wrap_response_deserializer(proto_dot_clarifai_dot_api_dot_service__pb2.MetricsQueryResponse),
1431+
)
1432+
self.ListMetricLabels = channel.unary_unary(
1433+
'/clarifai.api.V2/ListMetricLabels',
1434+
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.ListMetricLabelsRequest.SerializeToString,
1435+
response_deserializer=wrap_response_deserializer(proto_dot_clarifai_dot_api_dot_service__pb2.MultiMetricLabelsResponse),
1436+
)
14271437

14281438

14291439
class V2Servicer(object):
@@ -3501,6 +3511,18 @@ def DeleteSecrets(self, request, context):
35013511
context.set_details('Method not implemented!')
35023512
raise NotImplementedError('Method not implemented!')
35033513

3514+
def PostMetricsQuery(self, request, context):
3515+
"""Missing associated documentation comment in .proto file."""
3516+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
3517+
context.set_details('Method not implemented!')
3518+
raise NotImplementedError('Method not implemented!')
3519+
3520+
def ListMetricLabels(self, request, context):
3521+
"""Missing associated documentation comment in .proto file."""
3522+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
3523+
context.set_details('Method not implemented!')
3524+
raise NotImplementedError('Method not implemented!')
3525+
35043526

35053527
def add_V2Servicer_to_server(servicer, server):
35063528
rpc_method_handlers = {
@@ -4894,6 +4916,16 @@ def add_V2Servicer_to_server(servicer, server):
48944916
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.DeleteSecretsRequest.FromString,
48954917
response_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.MultiSecretResponse.SerializeToString,
48964918
),
4919+
'PostMetricsQuery': grpc.unary_unary_rpc_method_handler(
4920+
servicer.PostMetricsQuery,
4921+
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.PostMetricsQueryRequest.FromString,
4922+
response_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.MetricsQueryResponse.SerializeToString,
4923+
),
4924+
'ListMetricLabels': grpc.unary_unary_rpc_method_handler(
4925+
servicer.ListMetricLabels,
4926+
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.ListMetricLabelsRequest.FromString,
4927+
response_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.MultiMetricLabelsResponse.SerializeToString,
4928+
),
48974929
}
48984930
generic_handler = grpc.method_handlers_generic_handler(
48994931
'clarifai.api.V2', rpc_method_handlers)
@@ -9647,3 +9679,37 @@ def DeleteSecrets(request,
96479679
proto_dot_clarifai_dot_api_dot_service__pb2.MultiSecretResponse.FromString,
96489680
options, channel_credentials,
96499681
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
9682+
9683+
@staticmethod
9684+
def PostMetricsQuery(request,
9685+
target,
9686+
options=(),
9687+
channel_credentials=None,
9688+
call_credentials=None,
9689+
insecure=False,
9690+
compression=None,
9691+
wait_for_ready=None,
9692+
timeout=None,
9693+
metadata=None):
9694+
return grpc.experimental.unary_unary(request, target, '/clarifai.api.V2/PostMetricsQuery',
9695+
proto_dot_clarifai_dot_api_dot_service__pb2.PostMetricsQueryRequest.SerializeToString,
9696+
proto_dot_clarifai_dot_api_dot_service__pb2.MetricsQueryResponse.FromString,
9697+
options, channel_credentials,
9698+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
9699+
9700+
@staticmethod
9701+
def ListMetricLabels(request,
9702+
target,
9703+
options=(),
9704+
channel_credentials=None,
9705+
call_credentials=None,
9706+
insecure=False,
9707+
compression=None,
9708+
wait_for_ready=None,
9709+
timeout=None,
9710+
metadata=None):
9711+
return grpc.experimental.unary_unary(request, target, '/clarifai.api.V2/ListMetricLabels',
9712+
proto_dot_clarifai_dot_api_dot_service__pb2.ListMetricLabelsRequest.SerializeToString,
9713+
proto_dot_clarifai_dot_api_dot_service__pb2.MultiMetricLabelsResponse.FromString,
9714+
options, channel_credentials,
9715+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

0 commit comments

Comments
 (0)