Skip to content

Commit

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

Large diffs are not rendered by default.

126 changes: 94 additions & 32 deletions clarifai_grpc/grpc/api/resources_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5209,52 +5209,105 @@ class Filter(google.protobuf.message.Message):
def annotation(self) -> global___Annotation:
"""FILTER by annotation information.
########## Supported fields ##########
- annotation_info - allows searching by empty annotation info
note that searching by empty annotation info will actually not influence the search results.
however, in order to be user-friendly, we are still supporting searching by empty annotation info.
- annotation_info.fields - filter by annotation info
# Filter by ID fields
- id - example: `{"id": "xyz"}`
- input_id
- model_version_id
- task_id
- user_id
- workflow_version_id
# Filter by other top-level fields
- annotation_info - allows searching by empty annotation-info, i.e. `{"data": "annotation_info": {}}`;
note that searching by empty annotation-info will actually not influence the search results.
however, in order to be user-friendly, we still support searching by empty annotation-info.
- annotation_info.fields - filter by annotation info
- input_level - filter only input-level annotations
- status.code - filter by annotation status code
- trusted - filter only trusted annotations
# Filter by space-time info fields, i.e. region, frames and time-segments
- data - filter only annotations without space-time info, e.g. classifications
- in order to enable this, you need to set the field to an empty object, i.e. `{"data": {}}`
- data.frames[].frame_info - filter only frame annotations
- in order to enable this, you need to set the field to an empty object, i.e. `{"data": {"frames": [{"frame_info": {}}]}}`
- data.regions[].region_info.bounding_box - filter only bounding box annotations
- in order to enable this, you need to set the field to an empty object, i.e. `{"data": {"regions": [{"region_info": {"bounding_box":{}}}]}}`
- data.regions[].region_info.mask - filter only mask annotations
- in order to enable this, you need to set the field to an empty object, i.e. `{"data": {"regions": [{"region_info": {"mask":{}}}]}}`
- data.regions[].region_info.point - filter only point annotations
- in order to enable this, you need to set the field to an empty object, i.e. `{"data": {"regions": [{"region_info": {"point":{}}}]}}`
- data.regions[].region_info.polygon - filter only polygon annotations
- in order to enable this, you need to set the field to an empty object, i.e. `{"data": {"regions": [{"region_info": {"polygon":{}}}]}}`
- data.regions[].region_info.span - filter only span annotations
- in order to enable this, you need to set the field to an empty object, i.e. `{"data": {"regions": [{"region_info": {"span":{}}}]}}`
- data.time_segments[].time_info - filter only time-segment annotations
- in order to enable this, you need to set the field to an empty object, i.e. `{"data": {"time_segments": [{"time_info": {}}]}}`
# Filter by other data fields
- data.clusters[].id
- data.concepts[].id
- data.concepts[].name
- data.concepts[].value
- data.frames[].frame_info - filter by frame annotations
- data.geo.geo_box[].geo_point.latitude
- data.geo.geo_box[].geo_point.longitude
- data.geo.geo_limit.type
- data.geo.geo_limit.value
- data.geo.geo_point.latitude
- data.geo.geo_point.longitude
- data.metadata - allow search with empty metadata
note that searching by empty metadata will actually not influence the search results.
however, in order to be user-friendly, we are still supporting searching by empty metadata.
- data.metadata.fields - filter by metadata. metadata key&value fields are OR-ed.
- data.regions[].region_info.bounding_box - filter by bounding box annotations
- data.regions[].region_info.mask - filter by mask annotations
- data.regions[].region_info.point - filter by point annotations
- data.regions[].region_info.polygon - filter by polygon annotations
- data.regions[].region_info.span - filter by span annotations
- data.text - filter by text annotations
- data.time_segments[].time_info - filter by time-segment annotations
- id
- input_id
- input_level
- model_version_id
- status.code
- task_id
- trusted
- user_id
- workflow_version_id
- data.metadata - allow search with empty metadata, i.e. `{"data": "metadata": {}}`;
note that searching by empty metadata will actually not influence the search results;
however, in order to be user-friendly, we still support searching by empty metadata.
- data.metadata.fields - filter by metadata
- Important to note: metadata key&value fields are OR-ed.
- example with 1 metadata key: searching by
`{
` "data": {
` "metadata": {
` "fields": {
` "foo": {
` "string_value": "bar"
` },
` }
` }
` }
`}
will result in a search condition like `metadata includes {"foo": "bar}`;
- example with 2 metadata keys: searching by
`{
` "data": {
` "metadata": {
` "fields": {
` "foo1": {
` "string_value": "bar2"
` },
` "foo2": {
` "string_value": "bar2"
` }
` }
` }
` }
`}
will result in a search condition like `(metadata includes {"foo1": "bar1"}) OR (metadata includes {"foo2": "bar2"})`.
- data.text - filter only text annotations
- in order to enable this, you need to set the field to an empty object, i.e. `{"data": {"text": {}}}`
"""
@property
def input(self) -> global___Input:
"""FILTER by input information.
########## Supported fields ##########
- data.audio - filter audio inputs
- data.image - filter image inputs
- data.text - filter text inputs
- data.video - filter video inputs
- dataset_ids[] - filter by dataset IDs
- status.code - filter by input status
- data.audio - filter only audio inputs
- in order to enable this, you need to set the field to an empty object, i.e. `{"audio": {}}`
- data.image - filter only image inputs
- enable using `{"image": {}}`
- data.text - filter only text inputs
- enable using `{"text": {}}`
- data.video - filter only video inputs
- enable using `{"video": {}}`
- dataset_ids[] - filter by dataset IDs
- example: `{"dataset_ids": ["d1", "d2"]}` will filter for inputs in d1 OR d2
- status.code - filter by input status
- example: `{"status": {"code": 30000}}` to filter only for SUCCESS inputs
"""
@property
def last_updated_time_range(self) -> global___TimeRange:
Expand Down Expand Up @@ -6957,6 +7010,7 @@ class Collector(google.protobuf.message.Message):
DESCRIPTION_FIELD_NUMBER: builtins.int
CREATED_AT_FIELD_NUMBER: builtins.int
PRE_QUEUE_WORKFLOW_ID_FIELD_NUMBER: builtins.int
PRE_QUEUE_RANDOM_SAMPLE_FIELD_NUMBER: builtins.int
POST_QUEUE_WORKFLOW_ID_FIELD_NUMBER: builtins.int
COLLECTOR_SOURCE_FIELD_NUMBER: builtins.int
STATUS_FIELD_NUMBER: builtins.int
Expand All @@ -6981,6 +7035,13 @@ class Collector(google.protobuf.message.Message):
outputs to make deciions (for example: thresholding based on concepts). If the workflow
output has any field that is non-empty then the input will be queued for the collector
to process with the post_queue_workflow_id.
As a simpler alternative, pre_queue_random_sample can be set to just use random sampling instead.
"""
pre_queue_random_sample: builtins.float
"""Instead of needing to create a new workflow for pre_queue_workflow_id, if just random sampling
of the model inputs is required, then pre_queue_random_sample can be set to a value from (0-1]
to denote the fraction of inputs to collect.
"""
post_queue_workflow_id: builtins.str
"""A workflow to run to after the collector is processing the queued input. This workflow
Expand Down Expand Up @@ -7015,12 +7076,13 @@ class Collector(google.protobuf.message.Message):
description: builtins.str = ...,
created_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
pre_queue_workflow_id: builtins.str = ...,
pre_queue_random_sample: builtins.float = ...,
post_queue_workflow_id: builtins.str = ...,
collector_source: global___CollectorSource | None = ...,
status: proto.clarifai.api.status.status_pb2.Status | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["collector_source", b"collector_source", "created_at", b"created_at", "status", b"status"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["collector_source", b"collector_source", "created_at", b"created_at", "description", b"description", "id", b"id", "post_queue_workflow_id", b"post_queue_workflow_id", "pre_queue_workflow_id", b"pre_queue_workflow_id", "status", b"status"]) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["collector_source", b"collector_source", "created_at", b"created_at", "description", b"description", "id", b"id", "post_queue_workflow_id", b"post_queue_workflow_id", "pre_queue_random_sample", b"pre_queue_random_sample", "pre_queue_workflow_id", b"pre_queue_workflow_id", "status", b"status"]) -> None: ...

global___Collector = Collector

Expand Down
1,144 changes: 572 additions & 572 deletions clarifai_grpc/grpc/api/service_pb2.py

Large diffs are not rendered by default.

17 changes: 15 additions & 2 deletions clarifai_grpc/grpc/api/service_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,7 @@ class ListModelConceptsRequest(google.protobuf.message.Message):
VERSION_ID_FIELD_NUMBER: builtins.int
PAGE_FIELD_NUMBER: builtins.int
PER_PAGE_FIELD_NUMBER: builtins.int
SEARCH_FIELD_NUMBER: builtins.int
@property
def user_app_id(self) -> proto.clarifai.api.resources_pb2.UserAppIDSet: ...
model_id: builtins.str
Expand All @@ -1212,6 +1213,18 @@ class ListModelConceptsRequest(google.protobuf.message.Message):
"""(optional URL parameter) The number of results that will be contained in each page. Defaults
to 128.
"""
search: builtins.str
"""Searching options:
Specify a search parameter in order to perform keyword search on the
following fields of the concept:
- id
- name
Keywords are used for partial prefix-matching (so searching for "larif" matches "clarifai").
NOTE: Both the list of fields searched and the exact keyword matching
rules are subject to change and not guaranteed to be backwards-compatible.
"""
def __init__(
self,
*,
Expand All @@ -1220,9 +1233,10 @@ class ListModelConceptsRequest(google.protobuf.message.Message):
version_id: builtins.str = ...,
page: builtins.int = ...,
per_page: builtins.int = ...,
search: 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["model_id", b"model_id", "page", b"page", "per_page", b"per_page", "user_app_id", b"user_app_id", "version_id", b"version_id"]) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["model_id", b"model_id", "page", b"page", "per_page", b"per_page", "search", b"search", "user_app_id", b"user_app_id", "version_id", b"version_id"]) -> None: ...

global___ListModelConceptsRequest = ListModelConceptsRequest

Expand Down Expand Up @@ -7456,7 +7470,6 @@ class GetCollectorRequest(google.protobuf.message.Message):
@property
def user_app_id(self) -> proto.clarifai.api.resources_pb2.UserAppIDSet: ...
collector_id: builtins.str
"""The collecgtor id"""
def __init__(
self,
*,
Expand Down
14 changes: 10 additions & 4 deletions clarifai_grpc/grpc/api/status/status_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ class Status(google.protobuf.message.Message):
code: proto.clarifai.api.status.status_code_pb2.StatusCode.ValueType
"""Status code from internal codes."""
description: builtins.str
"""A longer description of the error."""
"""A short description of the error."""
details: builtins.str
"""More details of the given error."""
"""More details of the given error.
These details may be exposed to non-technical users.
For technical details, try to use developer_notes field.
"""
@property
def stack_trace(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
"""For some environment we may return a stack trace to help debug
Expand All @@ -47,14 +50,17 @@ class Status(google.protobuf.message.Message):
time_remaining: builtins.int
"""if status is pending, how much time is remaining (in seconds)"""
req_id: builtins.str
"""If we want to return a request id in the base status field"""
"""A request ID may be present, to help monitoring and tracking requests"""
internal_details: builtins.str
"""Internal Annotation (do not set in production, for internal Clarifai use only)."""
@property
def redirect_info(self) -> global___RedirectInfo:
"""Resource location info for redirect, when resource location has been changed."""
developer_notes: builtins.str
"""Notes for developer."""
"""Notes for developer.
These notes are rather technical details for developers how to interpret the status,
e.g. why an error occurred and how to avoid getting the error.
"""
def __init__(
self,
*,
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.0",
version="9.11.1",
author="Clarifai",
author_email="[email protected]",
description="Clarifai gRPC API Client",
Expand Down

0 comments on commit 3867e4a

Please sign in to comment.