Skip to content

Commit

Permalink
Updated protos to latest 10.8.8 (#195)
Browse files Browse the repository at this point in the history
* Updated protos to latest 10.8.8

* fix lint
  • Loading branch information
zeiler authored Oct 8, 2024
1 parent f3bcae0 commit d09c1fc
Show file tree
Hide file tree
Showing 10 changed files with 802 additions and 562 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.8.7
10.8.8
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.8.7"
CLIENT_VERSION = "10.8.8"
OS_VER = os.sys.platform
PYTHON_VERSION = ".".join(
map(
Expand Down
952 changes: 482 additions & 470 deletions clarifai_grpc/grpc/api/resources_pb2.py

Large diffs are not rendered by default.

230 changes: 191 additions & 39 deletions clarifai_grpc/grpc/api/resources_pb2.pyi

Large diffs are not rendered by default.

54 changes: 30 additions & 24 deletions clarifai_grpc/grpc/api/service_pb2.py

Large diffs are not rendered by default.

63 changes: 46 additions & 17 deletions clarifai_grpc/grpc/api/service_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,9 @@ class _PutTaskAssignmentsRequestActionEnumTypeWrapper(google.protobuf.internal.e
* when review strategy is MANUAL, then annotation status is updated to AWAITING_REVIEW.
"""
REVIEW_START: _PutTaskAssignmentsRequestAction.ValueType # 10
"""Return a list of task assignments for reviewer to review => 10 inputs are assigned to the reviewer.
"""Assign task assignments for reviewer to review => 10 task assignments are assigned to the reviewer.
This is a fully sync action.
NOT idempotent:
In the current implementation, we don't actually store the reviewer in the task assignment,
as the task assignment still stays assigned to the labeler.
Therefore, multiple calls to this endpoint may result in different set of task assignments to review.
For now, this action is practically not idempotent.
In the future, we could however store the reviewer in the task assignment and
return existing task assignments already assigned to the reviewer => this will make this action idempotent.
If task assignments are already assigned for review, then return existing task assignments.
"""
REVIEW_APPROVE: _PutTaskAssignmentsRequestAction.ValueType # 11
"""Approve task assignments.
Expand Down Expand Up @@ -132,15 +126,9 @@ Async: annotations added for the same input as the task assignment are updated a
* when review strategy is MANUAL, then annotation status is updated to AWAITING_REVIEW.
"""
REVIEW_START: PutTaskAssignmentsRequestAction.ValueType # 10
"""Return a list of task assignments for reviewer to review => 10 inputs are assigned to the reviewer.
"""Assign task assignments for reviewer to review => 10 task assignments are assigned to the reviewer.
This is a fully sync action.
NOT idempotent:
In the current implementation, we don't actually store the reviewer in the task assignment,
as the task assignment still stays assigned to the labeler.
Therefore, multiple calls to this endpoint may result in different set of task assignments to review.
For now, this action is practically not idempotent.
In the future, we could however store the reviewer in the task assignment and
return existing task assignments already assigned to the reviewer => this will make this action idempotent.
If task assignments are already assigned for review, then return existing task assignments.
"""
REVIEW_APPROVE: PutTaskAssignmentsRequestAction.ValueType # 11
"""Approve task assignments.
Expand Down Expand Up @@ -10383,6 +10371,8 @@ class ListDeploymentsRequest(google.protobuf.message.Message):
NODEPOOL_ID_FIELD_NUMBER: builtins.int
PAGE_FIELD_NUMBER: builtins.int
PER_PAGE_FIELD_NUMBER: builtins.int
MODEL_VERSION_IDS_FIELD_NUMBER: builtins.int
WORKFLOW_VERSION_IDS_FIELD_NUMBER: builtins.int
@property
def user_app_id(self) -> proto.clarifai.api.resources_pb2.UserAppIDSet: ...
nodepool_id: builtins.str
Expand All @@ -10395,16 +10385,24 @@ class ListDeploymentsRequest(google.protobuf.message.Message):
"""(optional URL parameter) The number of results that will be contained in each page. Defaults
to 128.
"""
@property
def model_version_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
"""(optional URL parameter) ModelVersion IDs. To list all deployments for the model version"""
@property
def workflow_version_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
"""(optional URL parameter) WorkflowVersion IDs. To list all deployments for the workflow version"""
def __init__(
self,
*,
user_app_id: proto.clarifai.api.resources_pb2.UserAppIDSet | None = ...,
nodepool_id: builtins.str = ...,
page: builtins.int = ...,
per_page: builtins.int = ...,
model_version_ids: collections.abc.Iterable[builtins.str] | None = ...,
workflow_version_ids: collections.abc.Iterable[builtins.str] | None = ...,
) -> 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["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["model_version_ids", b"model_version_ids", "nodepool_id", b"nodepool_id", "page", b"page", "per_page", b"per_page", "user_app_id", b"user_app_id", "workflow_version_ids", b"workflow_version_ids"]) -> None: ...

global___ListDeploymentsRequest = ListDeploymentsRequest

Expand Down Expand Up @@ -10576,3 +10574,34 @@ class MultiDeploymentResponse(google.protobuf.message.Message):
def ClearField(self, field_name: typing_extensions.Literal["deployments", b"deployments", "status", b"status"]) -> None: ...

global___MultiDeploymentResponse = MultiDeploymentResponse

@typing_extensions.final
class ListWorkflowEvaluationTemplatesRequest(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

def __init__(
self,
) -> None: ...

global___ListWorkflowEvaluationTemplatesRequest = ListWorkflowEvaluationTemplatesRequest

@typing_extensions.final
class MultiWorkflowEvaluationTemplateResponse(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

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

global___MultiWorkflowEvaluationTemplateResponse = MultiWorkflowEvaluationTemplateResponse
41 changes: 36 additions & 5 deletions clarifai_grpc/grpc/api/service_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,11 @@ def __init__(self, channel):
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.PostAuditLogSearchesRequest.SerializeToString,
response_deserializer=wrap_response_deserializer(proto_dot_clarifai_dot_api_dot_service__pb2.MultiAuditLogEntryResponse),
)
self.ListWorkflowEvaluationTemplates = channel.unary_unary(
'/clarifai.api.V2/ListWorkflowEvaluationTemplates',
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.ListWorkflowEvaluationTemplatesRequest.SerializeToString,
response_deserializer=wrap_response_deserializer(proto_dot_clarifai_dot_api_dot_service__pb2.MultiWorkflowEvaluationTemplateResponse),
)


class V2Servicer(object):
Expand Down Expand Up @@ -1448,8 +1453,7 @@ def StreamInputs(self, request, context):
raise NotImplementedError('Method not implemented!')

def GetInputSamples(self, request, context):
"""Get a specific input from an app.
"""
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
Expand Down Expand Up @@ -2754,9 +2758,8 @@ def ListNextTaskAssignments(self, request, context):
raise NotImplementedError('Method not implemented!')

def PutTaskAssignments(self, request, context):
"""PutTaskAssignments performs an action for the task assignments in given task.
All the actions are theoretically idempotent, but practically, in the current implementation,
the REVIEW_START action is not idempotent. See PutTaskAssignmentsRequestAction for more details.
"""PutTaskAssignments performs an idempotent action for the task assignments in given task.
See PutTaskAssignmentsRequestAction for more details about possible actions.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
Expand Down Expand Up @@ -3038,6 +3041,12 @@ def PostAuditLogSearches(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def ListWorkflowEvaluationTemplates(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')


def add_V2Servicer_to_server(servicer, server):
rpc_method_handlers = {
Expand Down Expand Up @@ -4226,6 +4235,11 @@ def add_V2Servicer_to_server(servicer, server):
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.PostAuditLogSearchesRequest.FromString,
response_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.MultiAuditLogEntryResponse.SerializeToString,
),
'ListWorkflowEvaluationTemplates': grpc.unary_unary_rpc_method_handler(
servicer.ListWorkflowEvaluationTemplates,
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.ListWorkflowEvaluationTemplatesRequest.FromString,
response_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.MultiWorkflowEvaluationTemplateResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'clarifai.api.V2', rpc_method_handlers)
Expand Down Expand Up @@ -8282,3 +8296,20 @@ def PostAuditLogSearches(request,
proto_dot_clarifai_dot_api_dot_service__pb2.MultiAuditLogEntryResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def ListWorkflowEvaluationTemplates(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/ListWorkflowEvaluationTemplates',
proto_dot_clarifai_dot_api_dot_service__pb2.ListWorkflowEvaluationTemplatesRequest.SerializeToString,
proto_dot_clarifai_dot_api_dot_service__pb2.MultiWorkflowEvaluationTemplateResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
4 changes: 2 additions & 2 deletions clarifai_grpc/grpc/api/status/status_code_pb2.py

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions clarifai_grpc/grpc/api/status/status_code_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,15 @@ class _StatusCodeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._Enu
TASK_PERMISSION_DENIED: _StatusCode.ValueType # 54103
"""Not allowed to perform a task-related action."""
TASK_ASSIGNMENT_SUCCESS: _StatusCode.ValueType # 54200
"""Task Assignments 542xx"""
TASK_ASSIGNMENT_PENDING: _StatusCode.ValueType # 54201
TASK_ASSIGNMENT_AWAITING_REVIEW: _StatusCode.ValueType # 54202
TASK_ASSIGNMENT_AWAITING_CONSENSUS_REVIEW: _StatusCode.ValueType # 54203
TASK_ASSIGNMENT_REVIEW_DENIED: _StatusCode.ValueType # 54204
TASK_ASSIGNMENT_REJECTED: _StatusCode.ValueType # 54204
TASK_ASSIGNMENT_REVIEW_SUCCESS: _StatusCode.ValueType # 54300
"""Task Assignment Reviews 543xx"""
TASK_ASSIGNMENT_REVIEW_PENDING: _StatusCode.ValueType # 54301
TASK_ASSIGNMENT_REVIEW_DISMISSED: _StatusCode.ValueType # 54302
LABEL_ORDER_PENDING: _StatusCode.ValueType # 55001
"""Label Order Related Status Code 55xxx"""
LABEL_ORDER_IN_PROGRESS: _StatusCode.ValueType # 55002
Expand Down Expand Up @@ -972,10 +977,15 @@ TASK_MISSING: StatusCode.ValueType # 54102
TASK_PERMISSION_DENIED: StatusCode.ValueType # 54103
"""Not allowed to perform a task-related action."""
TASK_ASSIGNMENT_SUCCESS: StatusCode.ValueType # 54200
"""Task Assignments 542xx"""
TASK_ASSIGNMENT_PENDING: StatusCode.ValueType # 54201
TASK_ASSIGNMENT_AWAITING_REVIEW: StatusCode.ValueType # 54202
TASK_ASSIGNMENT_AWAITING_CONSENSUS_REVIEW: StatusCode.ValueType # 54203
TASK_ASSIGNMENT_REVIEW_DENIED: StatusCode.ValueType # 54204
TASK_ASSIGNMENT_REJECTED: StatusCode.ValueType # 54204
TASK_ASSIGNMENT_REVIEW_SUCCESS: StatusCode.ValueType # 54300
"""Task Assignment Reviews 543xx"""
TASK_ASSIGNMENT_REVIEW_PENDING: StatusCode.ValueType # 54301
TASK_ASSIGNMENT_REVIEW_DISMISSED: StatusCode.ValueType # 54302
LABEL_ORDER_PENDING: StatusCode.ValueType # 55001
"""Label Order Related Status Code 55xxx"""
LABEL_ORDER_IN_PROGRESS: StatusCode.ValueType # 55002
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.8.7",
version="10.8.8",
author="Clarifai",
author_email="support@clarifai.com",
description="Clarifai gRPC API Client",
Expand Down

0 comments on commit d09c1fc

Please sign in to comment.