Skip to content

Commit

Permalink
GRPC clients version 10.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
clarifai-prod committed Nov 19, 2024
1 parent cfb06c8 commit 02d11ff
Show file tree
Hide file tree
Showing 10 changed files with 1,488 additions and 1,430 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.9.11
10.10.0
2 changes: 1 addition & 1 deletion clarifai_grpc/channel/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from clarifai_grpc.channel.errors import ApiError

CLIENT_VERSION = "10.9.11"
CLIENT_VERSION = "10.10.0"
OS_VER = os.sys.platform
PYTHON_VERSION = ".".join(
map(
Expand Down
1,064 changes: 550 additions & 514 deletions clarifai_grpc/grpc/api/resources_pb2.py

Large diffs are not rendered by default.

267 changes: 221 additions & 46 deletions clarifai_grpc/grpc/api/resources_pb2.pyi

Large diffs are not rendered by default.

1,398 changes: 694 additions & 704 deletions clarifai_grpc/grpc/api/service_pb2.py

Large diffs are not rendered by default.

107 changes: 14 additions & 93 deletions clarifai_grpc/grpc/api/service_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ class ListAppsRequest(google.protobuf.message.Message):
SORT_BY_MODIFIED_AT_FIELD_NUMBER: builtins.int
SORT_BY_CREATED_AT_FIELD_NUMBER: builtins.int
SORT_BY_STAR_COUNT_FIELD_NUMBER: builtins.int
SORT_BY_ID_FIELD_NUMBER: builtins.int
FEATURED_ONLY_FIELD_NUMBER: builtins.int
STARRED_ONLY_FIELD_NUMBER: builtins.int
TEMPLATE_ONLY_FIELD_NUMBER: builtins.int
Expand All @@ -664,7 +665,7 @@ class ListAppsRequest(google.protobuf.message.Message):
Whether to sort in ascending order. If false, will order in descending order.
"""
sort_by_name: builtins.bool
"""Whether to order by the name"""
"""Whether to order by the name."""
sort_by_modified_at: builtins.bool
"""Whether to order by the modified_at time.
If none of the sort options is set to true, will sort by modified_at.
Expand All @@ -673,6 +674,8 @@ class ListAppsRequest(google.protobuf.message.Message):
"""Whether to order by the created_at time."""
sort_by_star_count: builtins.bool
"""Whether to order by the number of users stared the app"""
sort_by_id: builtins.bool
"""Whether to order by the id"""
featured_only: builtins.bool
"""Filtering options:
If true, we only return apps that are handpicked by clarifai staff
Expand Down Expand Up @@ -721,6 +724,7 @@ class ListAppsRequest(google.protobuf.message.Message):
sort_by_modified_at: builtins.bool = ...,
sort_by_created_at: builtins.bool = ...,
sort_by_star_count: builtins.bool = ...,
sort_by_id: builtins.bool = ...,
featured_only: builtins.bool = ...,
starred_only: builtins.bool = ...,
template_only: builtins.bool = ...,
Expand All @@ -729,9 +733,9 @@ class ListAppsRequest(google.protobuf.message.Message):
name: builtins.str = ...,
id: builtins.str = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["sort_by", b"sort_by", "sort_by_created_at", b"sort_by_created_at", "sort_by_modified_at", b"sort_by_modified_at", "sort_by_name", b"sort_by_name", "sort_by_star_count", b"sort_by_star_count", "user_app_id", b"user_app_id"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["additional_fields", b"additional_fields", "featured_only", b"featured_only", "id", b"id", "name", b"name", "page", b"page", "per_page", b"per_page", "query", b"query", "search", b"search", "sort_ascending", b"sort_ascending", "sort_by", b"sort_by", "sort_by_created_at", b"sort_by_created_at", "sort_by_modified_at", b"sort_by_modified_at", "sort_by_name", b"sort_by_name", "sort_by_star_count", b"sort_by_star_count", "starred_only", b"starred_only", "template_only", b"template_only", "user_app_id", b"user_app_id"]) -> None: ...
def WhichOneof(self, oneof_group: typing_extensions.Literal["sort_by", b"sort_by"]) -> typing_extensions.Literal["sort_by_name", "sort_by_modified_at", "sort_by_created_at", "sort_by_star_count"] | None: ...
def HasField(self, field_name: typing_extensions.Literal["sort_by", b"sort_by", "sort_by_created_at", b"sort_by_created_at", "sort_by_id", b"sort_by_id", "sort_by_modified_at", b"sort_by_modified_at", "sort_by_name", b"sort_by_name", "sort_by_star_count", b"sort_by_star_count", "user_app_id", b"user_app_id"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["additional_fields", b"additional_fields", "featured_only", b"featured_only", "id", b"id", "name", b"name", "page", b"page", "per_page", b"per_page", "query", b"query", "search", b"search", "sort_ascending", b"sort_ascending", "sort_by", b"sort_by", "sort_by_created_at", b"sort_by_created_at", "sort_by_id", b"sort_by_id", "sort_by_modified_at", b"sort_by_modified_at", "sort_by_name", b"sort_by_name", "sort_by_star_count", b"sort_by_star_count", "starred_only", b"starred_only", "template_only", b"template_only", "user_app_id", b"user_app_id"]) -> None: ...
def WhichOneof(self, oneof_group: typing_extensions.Literal["sort_by", b"sort_by"]) -> typing_extensions.Literal["sort_by_name", "sort_by_modified_at", "sort_by_created_at", "sort_by_star_count", "sort_by_id"] | None: ...

global___ListAppsRequest = ListAppsRequest

Expand Down Expand Up @@ -6827,7 +6831,7 @@ class PostWorkflowResultsRequest(google.protobuf.message.Message):
If node.id is not in the provided map, it will fall back to searching for
an adequate deployment the model owner owns or fall back to
the serverless nodepools provided by Clarifai.
the shared nodepools provided by Clarifai.
We recommend you specify these RunnerSelectors so that you have better understanding of where
processing occurs.
"""
Expand Down Expand Up @@ -7951,93 +7955,6 @@ class MultiStatValueAggregateResponse(google.protobuf.message.Message):

global___MultiStatValueAggregateResponse = MultiStatValueAggregateResponse

@typing_extensions.final
class PostTrendingMetricsViewRequest(google.protobuf.message.Message):
"""PostTrendingMetricsViewRequest"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

USER_APP_ID_FIELD_NUMBER: builtins.int
VIEW_TYPE_FIELD_NUMBER: builtins.int
OBJECT_ID_FIELD_NUMBER: builtins.int
@property
def user_app_id(self) -> proto.clarifai.api.resources_pb2.UserAppIDSet:
"""The user_id and app_id information."""
view_type: builtins.str
"""For now view types 'apps', 'workflows', and 'models' are supported."""
object_id: builtins.str
"""ID of the views object."""
def __init__(
self,
*,
user_app_id: proto.clarifai.api.resources_pb2.UserAppIDSet | None = ...,
view_type: builtins.str = ...,
object_id: builtins.str = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["user_app_id", b"user_app_id"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["object_id", b"object_id", "user_app_id", b"user_app_id", "view_type", b"view_type"]) -> None: ...

global___PostTrendingMetricsViewRequest = PostTrendingMetricsViewRequest

@typing_extensions.final
class ListTrendingMetricsViewsRequest(google.protobuf.message.Message):
"""ListTrendingMetricsViewsRequest"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

USER_APP_ID_FIELD_NUMBER: builtins.int
VIEW_TYPE_FIELD_NUMBER: builtins.int
PAGE_FIELD_NUMBER: builtins.int
PER_PAGE_FIELD_NUMBER: builtins.int
@property
def user_app_id(self) -> proto.clarifai.api.resources_pb2.UserAppIDSet:
"""The user_id and app_id information."""
view_type: builtins.str
"""For now view types 'apps', 'workflows', and 'models' are supported."""
page: builtins.int
"""(optional URL parameter) The page number. Pagination is used to split the results into chunks.
Defaults to 1.
"""
per_page: builtins.int
"""(optional URL parameter) The number of results that will be contained in each page. Defaults
to 128.
"""
def __init__(
self,
*,
user_app_id: proto.clarifai.api.resources_pb2.UserAppIDSet | None = ...,
view_type: builtins.str = ...,
page: builtins.int = ...,
per_page: builtins.int = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["user_app_id", b"user_app_id"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["page", b"page", "per_page", b"per_page", "user_app_id", b"user_app_id", "view_type", b"view_type"]) -> None: ...

global___ListTrendingMetricsViewsRequest = ListTrendingMetricsViewsRequest

@typing_extensions.final
class MultiTrendingMetricsViewResponse(google.protobuf.message.Message):
"""MultiTrendingMetricsViewResponse"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

STATUS_FIELD_NUMBER: builtins.int
METRICS_FIELD_NUMBER: builtins.int
@property
def status(self) -> proto.clarifai.api.status.status_pb2.Status: ...
@property
def metrics(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[proto.clarifai.api.resources_pb2.TrendingMetric]: ...
def __init__(
self,
*,
status: proto.clarifai.api.status.status_pb2.Status | None = ...,
metrics: collections.abc.Iterable[proto.clarifai.api.resources_pb2.TrendingMetric] | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["status", b"status"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["metrics", b"metrics", "status", b"status"]) -> None: ...

global___MultiTrendingMetricsViewResponse = MultiTrendingMetricsViewResponse

@typing_extensions.final
class GetModuleRequest(google.protobuf.message.Message):
"""GetModuleRequest"""
Expand Down Expand Up @@ -9588,6 +9505,7 @@ class ListRunnersRequest(google.protobuf.message.Message):
PAGE_FIELD_NUMBER: builtins.int
PER_PAGE_FIELD_NUMBER: builtins.int
COMPUTE_CLUSTER_ID_FIELD_NUMBER: builtins.int
MIN_REPLICAS_FIELD_NUMBER: builtins.int
@property
def user_app_id(self) -> proto.clarifai.api.resources_pb2.UserAppIDSet: ...
nodepool_id: builtins.str
Expand All @@ -9600,6 +9518,8 @@ class ListRunnersRequest(google.protobuf.message.Message):
to 128.
"""
compute_cluster_id: builtins.str
min_replicas: builtins.int
"""Only return runners whose replicas are >= min_replicas."""
def __init__(
self,
*,
Expand All @@ -9608,9 +9528,10 @@ class ListRunnersRequest(google.protobuf.message.Message):
page: builtins.int = ...,
per_page: builtins.int = ...,
compute_cluster_id: builtins.str = ...,
min_replicas: builtins.int = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["user_app_id", b"user_app_id"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["compute_cluster_id", b"compute_cluster_id", "nodepool_id", b"nodepool_id", "page", b"page", "per_page", b"per_page", "user_app_id", b"user_app_id"]) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["compute_cluster_id", b"compute_cluster_id", "min_replicas", b"min_replicas", "nodepool_id", b"nodepool_id", "page", b"page", "per_page", b"per_page", "user_app_id", b"user_app_id"]) -> None: ...

global___ListRunnersRequest = ListRunnersRequest

Expand Down
68 changes: 0 additions & 68 deletions clarifai_grpc/grpc/api/service_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,16 +909,6 @@ def __init__(self, channel):
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.PostStatValuesAggregateRequest.SerializeToString,
response_deserializer=wrap_response_deserializer(proto_dot_clarifai_dot_api_dot_service__pb2.MultiStatValueAggregateResponse),
)
self.PostTrendingMetricsView = channel.unary_unary(
'/clarifai.api.V2/PostTrendingMetricsView',
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.PostTrendingMetricsViewRequest.SerializeToString,
response_deserializer=wrap_response_deserializer(proto_dot_clarifai_dot_api_dot_status_dot_status__pb2.BaseResponse),
)
self.ListTrendingMetricsViews = channel.unary_unary(
'/clarifai.api.V2/ListTrendingMetricsViews',
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.ListTrendingMetricsViewsRequest.SerializeToString,
response_deserializer=wrap_response_deserializer(proto_dot_clarifai_dot_api_dot_service__pb2.MultiTrendingMetricsViewResponse),
)
self.GetModule = channel.unary_unary(
'/clarifai.api.V2/GetModule',
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.GetModuleRequest.SerializeToString,
Expand Down Expand Up @@ -2580,20 +2570,6 @@ def PostStatValuesAggregate(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def PostTrendingMetricsView(self, request, context):
"""Increase the view metric for a detail view
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def ListTrendingMetricsViews(self, request, context):
"""List the view metrics for a detail view
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def GetModule(self, request, context):
"""Get a specific module from an app.
"""
Expand Down Expand Up @@ -3925,16 +3901,6 @@ def add_V2Servicer_to_server(servicer, server):
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.PostStatValuesAggregateRequest.FromString,
response_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.MultiStatValueAggregateResponse.SerializeToString,
),
'PostTrendingMetricsView': grpc.unary_unary_rpc_method_handler(
servicer.PostTrendingMetricsView,
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.PostTrendingMetricsViewRequest.FromString,
response_serializer=proto_dot_clarifai_dot_api_dot_status_dot_status__pb2.BaseResponse.SerializeToString,
),
'ListTrendingMetricsViews': grpc.unary_unary_rpc_method_handler(
servicer.ListTrendingMetricsViews,
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.ListTrendingMetricsViewsRequest.FromString,
response_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.MultiTrendingMetricsViewResponse.SerializeToString,
),
'GetModule': grpc.unary_unary_rpc_method_handler(
servicer.GetModule,
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.GetModuleRequest.FromString,
Expand Down Expand Up @@ -7243,40 +7209,6 @@ def PostStatValuesAggregate(request,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def PostTrendingMetricsView(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/clarifai.api.V2/PostTrendingMetricsView',
proto_dot_clarifai_dot_api_dot_service__pb2.PostTrendingMetricsViewRequest.SerializeToString,
proto_dot_clarifai_dot_api_dot_status_dot_status__pb2.BaseResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def ListTrendingMetricsViews(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/clarifai.api.V2/ListTrendingMetricsViews',
proto_dot_clarifai_dot_api_dot_service__pb2.ListTrendingMetricsViewsRequest.SerializeToString,
proto_dot_clarifai_dot_api_dot_service__pb2.MultiTrendingMetricsViewResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def GetModule(request,
target,
Expand Down
4 changes: 2 additions & 2 deletions clarifai_grpc/grpc/api/status/status_code_pb2.py

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions clarifai_grpc/grpc/api/status/status_code_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ class _StatusCodeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._Enu
"""when a request method is not allowed"""
CONN_NO_GDPR_CONSENT: _StatusCode.ValueType # 11104
"""lack GDPR consent"""
CONN_INVALID_RANGE: _StatusCode.ValueType # 11105
"""when invalid range of a resource is requested"""
CONN_AUTH_METHOD_DISABLED: _StatusCode.ValueType # 11200
"""authentication method is disabled"""
MODEL_TRAINED: _StatusCode.ValueType # 21100
Expand Down Expand Up @@ -607,6 +609,8 @@ CONN_METHOD_NOT_ALLOWED: StatusCode.ValueType # 11103
"""when a request method is not allowed"""
CONN_NO_GDPR_CONSENT: StatusCode.ValueType # 11104
"""lack GDPR consent"""
CONN_INVALID_RANGE: StatusCode.ValueType # 11105
"""when invalid range of a resource is requested"""
CONN_AUTH_METHOD_DISABLED: StatusCode.ValueType # 11200
"""authentication method is disabled"""
MODEL_TRAINED: StatusCode.ValueType # 21100
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setuptools.setup(
name="clarifai-grpc",
version="10.9.11",
version="10.10.0",
author="Clarifai",
author_email="[email protected]",
description="Clarifai gRPC API Client",
Expand Down

0 comments on commit 02d11ff

Please sign in to comment.