Skip to content

Commit

Permalink
GRPC clients version 9.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
clarifai-prod committed Dec 13, 2023
1 parent 3867e4a commit d54ff7f
Show file tree
Hide file tree
Showing 7 changed files with 255 additions and 214 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.11.1
9.11.2
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 = "9.11.1"
CLIENT_VERSION = "9.11.2"
OS_VER = os.sys.platform
PYTHON_VERSION = ".".join(
map(
Expand Down
366 changes: 186 additions & 180 deletions clarifai_grpc/grpc/api/resources_pb2.py

Large diffs are not rendered by default.

64 changes: 44 additions & 20 deletions clarifai_grpc/grpc/api/resources_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6211,72 +6211,94 @@ class AppDuplication(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

ID_FIELD_NUMBER: builtins.int
DESTINATION_APP_FIELD_NUMBER: builtins.int
EXISTING_APP_ID_FIELD_NUMBER: builtins.int
NEW_APP_ID_FIELD_NUMBER: builtins.int
NEW_APP_NAME_FIELD_NUMBER: builtins.int
NEW_APP_DESCRIPTION_FIELD_NUMBER: builtins.int
STATUS_FIELD_NUMBER: builtins.int
CREATED_AT_FIELD_NUMBER: builtins.int
LAST_MODIFIED_AT_FIELD_NUMBER: builtins.int
FILTER_FIELD_NUMBER: builtins.int
PROGRESS_FIELD_NUMBER: builtins.int
id: builtins.str
"""the id of app duplication"""
"""The unique identifier of an app duplication job."""
@property
def destination_app(self) -> global___App:
"""The destination application where resources are written.
If the destination does not exist, then the fields from the request are
used to create the application. If a field is not set or not supported,
then it will be copied from the source app, unless otherwise noted.
Note: this field can be empty when reading app duplication jobs in cases
where the app has been deleted or is just not visible to the caller.
########## Supported fields ##########
- description
- id - if not set, then generated automatically
- user_id - if not set, then the calling user is used as the app owner
"""
existing_app_id: builtins.str
"""The ID of an existing app you want to copy data into.
If not provided, then we will create a new application as the destination instead.
The various new_app_* fields can be used to set fields of this new application.
Deprecated: Use destination_app.id with an existing ID instead.
"""
new_app_id: builtins.str
"""The ID to use when creating a new application.
You cannot set this field when copying into an existing app, i.e., when existing_app_is is set.
If not provided, then it will be generated automatically.
Deprecated: Use destination_app.id with a new ID instead.
"""
new_app_name: builtins.str
"""The name to use when creating a new application.
You cannot set this field when copying into an existing app, i.e., when existing_app_is is set.
If not provided, then the ID of the new application is also used as the name.
"""
new_app_description: builtins.str
"""The description to use when creating a new application.
You cannot set this field when copying into an existing app, i.e., when existing_app_is is set.
If not provided, then the description of the source application is copied.
Deprecated: Application names are deprecated, use application IDs instead.
"""
@property
def status(self) -> proto.clarifai.api.status.status_pb2.Status:
"""the status of app duplication"""
"""The status of the app duplication job."""
@property
def created_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
"""when is the app duplication triggered"""
"""The time when the app duplication job was created."""
@property
def last_modified_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
"""The last time when is the status got updated"""
"""The last time when the app duplication job status was updated."""
@property
def filter(self) -> global___AppDuplicationFilters:
"""Only copy resources depending on the filters"""
"""The filter specifies which resources are copied by the app duplication job."""
@property
def progress(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___AppCopyProgress]:
"""contains progress for each requested filter"""
"""Copy progress for each resource type requested by the filter. Possible fields:
- inputs
- concepts
- annotations
- models
- workflows
"""
def __init__(
self,
*,
id: builtins.str = ...,
destination_app: global___App | None = ...,
existing_app_id: builtins.str = ...,
new_app_id: builtins.str = ...,
new_app_name: builtins.str = ...,
new_app_description: builtins.str = ...,
status: proto.clarifai.api.status.status_pb2.Status | None = ...,
created_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
last_modified_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
filter: global___AppDuplicationFilters | None = ...,
progress: collections.abc.Iterable[global___AppCopyProgress] | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["created_at", b"created_at", "filter", b"filter", "last_modified_at", b"last_modified_at", "status", b"status"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["created_at", b"created_at", "existing_app_id", b"existing_app_id", "filter", b"filter", "id", b"id", "last_modified_at", b"last_modified_at", "new_app_description", b"new_app_description", "new_app_id", b"new_app_id", "new_app_name", b"new_app_name", "progress", b"progress", "status", b"status"]) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["created_at", b"created_at", "destination_app", b"destination_app", "filter", b"filter", "last_modified_at", b"last_modified_at", "status", b"status"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["created_at", b"created_at", "destination_app", b"destination_app", "existing_app_id", b"existing_app_id", "filter", b"filter", "id", b"id", "last_modified_at", b"last_modified_at", "new_app_id", b"new_app_id", "new_app_name", b"new_app_name", "progress", b"progress", "status", b"status"]) -> None: ...

global___AppDuplication = AppDuplication

Expand Down Expand Up @@ -6310,15 +6332,17 @@ class AppDuplicationFilters(google.protobuf.message.Message):
COPY_MODELS_FIELD_NUMBER: builtins.int
COPY_WORKFLOWS_FIELD_NUMBER: builtins.int
copy_inputs: builtins.bool
"""Copy inputs what what it depends on: input level annotation and concepts"""
"""Copy inputs. Requires that copy_concepts is also set.
Note that this will still copy input-level annotations even if copy_annotations is not set.
"""
copy_concepts: builtins.bool
"""Copy only concepts"""
"""Copy concepts."""
copy_annotations: builtins.bool
"""Copy annotations and what it depends on: inputs and concepts"""
"""Copy annotations. Requires that copy_inputs and copy_concepts are also set."""
copy_models: builtins.bool
"""Copy models and what it depends on: concepts"""
"""Copy models. Requires that copy_concepts is also set."""
copy_workflows: builtins.bool
"""Copy workflows and what it depends on: models and concepts"""
"""Copy workflows. Requires that copy_models and copy_concepts are also set."""
def __init__(
self,
*,
Expand Down
16 changes: 9 additions & 7 deletions clarifai_grpc/grpc/api/service_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6812,14 +6812,15 @@ global___SingleWorkflowVersionResponse = SingleWorkflowVersionResponse

@typing_extensions.final
class PostAppDuplicationsRequest(google.protobuf.message.Message):
"""Request to start a app duplication process"""
"""Request to start app duplication jobs."""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

USER_APP_ID_FIELD_NUMBER: builtins.int
APP_DUPLICATIONS_FIELD_NUMBER: builtins.int
@property
def user_app_id(self) -> proto.clarifai.api.resources_pb2.UserAppIDSet: ...
def user_app_id(self) -> proto.clarifai.api.resources_pb2.UserAppIDSet:
"""The user and application ID of the source application to duplicate."""
@property
def app_duplications(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[proto.clarifai.api.resources_pb2.AppDuplication]: ...
def __init__(
Expand All @@ -6835,16 +6836,16 @@ global___PostAppDuplicationsRequest = PostAppDuplicationsRequest

@typing_extensions.final
class GetAppDuplicationRequest(google.protobuf.message.Message):
"""Request to check app duplication status"""
"""Request to get an app duplication job."""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

USER_APP_ID_FIELD_NUMBER: builtins.int
APP_DUPLICATION_ID_FIELD_NUMBER: builtins.int
@property
def user_app_id(self) -> proto.clarifai.api.resources_pb2.UserAppIDSet: ...
def user_app_id(self) -> proto.clarifai.api.resources_pb2.UserAppIDSet:
"""The ID of the user that created the app duplication job."""
app_duplication_id: builtins.str
"""The app duplication id"""
def __init__(
self,
*,
Expand All @@ -6858,15 +6859,16 @@ global___GetAppDuplicationRequest = GetAppDuplicationRequest

@typing_extensions.final
class ListAppDuplicationsRequest(google.protobuf.message.Message):
"""Request to list all the app duplication that user triggered."""
"""Request to list all the app duplication jobs that a user created."""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

USER_APP_ID_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: ...
def user_app_id(self) -> proto.clarifai.api.resources_pb2.UserAppIDSet:
"""The ID of the user whose app duplication jobs to list."""
page: builtins.int
"""(optional URL parameter) The page number. Pagination is used to split the results into chunks.
Defaults to 1.
Expand Down
17 changes: 13 additions & 4 deletions clarifai_grpc/grpc/api/service_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2214,22 +2214,31 @@ def ListCollaborations(self, request, context):
raise NotImplementedError('Method not implemented!')

def PostAppDuplications(self, request, context):
"""start to duplicate an app which copies all the inputs, annotations, models, concepts etc. to a new app.
this is an async process, you should use ListAppDuplications or GetAppDuplication to check the status.
"""PostAppDuplications starts async app duplication jobs which copy resources
(inputs, annotations, models etc) from one application to another. It can
also create the destination application if it does not exist, with fields
(description, metadata etc) copied from the source application.
A duplication job can be started by any user that can read from the source
application (the target of this call) and can create and write to the
destination application. The duplication is associated with the user that
created it, so in order to read the status and progress of the job, that
user's ID has to be used in the call to GetAppDuplication, which might be
different to the source application owner ID in this call.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def ListAppDuplications(self, request, context):
"""list all the app duplications user triggers
"""ListAppDuplications lists all app duplication jobs created by the user.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def GetAppDuplication(self, request, context):
"""get the app duplication status
"""GetAppDuplication returns an app duplication job created by the user.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
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="9.11.1",
version="9.11.2",
author="Clarifai",
author_email="[email protected]",
description="Clarifai gRPC API Client",
Expand Down

0 comments on commit d54ff7f

Please sign in to comment.