Skip to content

Commit

Permalink
GRPC clients version 10.6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
clarifai-prod committed Jul 22, 2024
1 parent 618930a commit 7df4027
Show file tree
Hide file tree
Showing 12 changed files with 618 additions and 463 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.6.5
10.6.6
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.6.5"
CLIENT_VERSION = "10.6.6"
OS_VER = os.sys.platform
PYTHON_VERSION = ".".join(
map(
Expand Down
806 changes: 406 additions & 400 deletions clarifai_grpc/grpc/api/resources_pb2.py

Large diffs are not rendered by default.

66 changes: 57 additions & 9 deletions clarifai_grpc/grpc/api/resources_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,23 @@ STREAMING_STREAMING: RunnerMethodType.ValueType # 4
"""stream of requests, stream of responses. stream() in code"""
global___RunnerMethodType = RunnerMethodType

class _AuditOperationType:
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _AuditOperationTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_AuditOperationType.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
AUDIT_OPERATION_TYPE_NOT_SET: _AuditOperationType.ValueType # 0
APPLICATION_CREATE: _AuditOperationType.ValueType # 100
"""APPLICATION event types : 100 - 199"""

class AuditOperationType(_AuditOperationType, metaclass=_AuditOperationTypeEnumTypeWrapper): ...

AUDIT_OPERATION_TYPE_NOT_SET: AuditOperationType.ValueType # 0
APPLICATION_CREATE: AuditOperationType.ValueType # 100
"""APPLICATION event types : 100 - 199"""
global___AuditOperationType = AuditOperationType

@typing_extensions.final
class Annotation(google.protobuf.message.Message):
"""Annotation of an asset with metadata"""
Expand Down Expand Up @@ -2205,11 +2222,30 @@ class Image(google.protobuf.message.Message):

DESCRIPTOR: google.protobuf.descriptor.Descriptor

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

KEY_FIELD_NUMBER: builtins.int
VALUE_FIELD_NUMBER: builtins.int
key: builtins.str
@property
def value(self) -> global___ImageInfo: ...
def __init__(
self,
*,
key: builtins.str = ...,
value: global___ImageInfo | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["value", b"value"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ...

URL_FIELD_NUMBER: builtins.int
BASE64_FIELD_NUMBER: builtins.int
ALLOW_DUPLICATE_URL_FIELD_NUMBER: builtins.int
HOSTED_FIELD_NUMBER: builtins.int
IMAGE_INFO_FIELD_NUMBER: builtins.int
HOSTED_IMAGE_INFO_FIELD_NUMBER: builtins.int
url: builtins.str
"""This is a URL to a publicly accessible image file. The platform will download this file server
side and then process.
Expand All @@ -2228,7 +2264,12 @@ class Image(google.protobuf.message.Message):
"""The hosted field lists images in different sizes hosted in Clarifai storage."""
@property
def image_info(self) -> global___ImageInfo:
"""image info"""
"""image info for original size. for image info for other sizes, use hosted_image_info"""
@property
def hosted_image_info(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___ImageInfo]:
"""The map of hosted image info of different sizes (see hosted.sizes), excluding the original image.
Note: keys(hosted_image_info) = hosted.sizes - "orig"
"""
def __init__(
self,
*,
Expand All @@ -2237,9 +2278,10 @@ class Image(google.protobuf.message.Message):
allow_duplicate_url: builtins.bool = ...,
hosted: global___HostedURL | None = ...,
image_info: global___ImageInfo | None = ...,
hosted_image_info: collections.abc.Mapping[builtins.str, global___ImageInfo] | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["hosted", b"hosted", "image_info", b"image_info"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["allow_duplicate_url", b"allow_duplicate_url", "base64", b"base64", "hosted", b"hosted", "image_info", b"image_info", "url", b"url"]) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["allow_duplicate_url", b"allow_duplicate_url", "base64", b"base64", "hosted", b"hosted", "hosted_image_info", b"hosted_image_info", "image_info", b"image_info", "url", b"url"]) -> None: ...

global___Image = Image

Expand Down Expand Up @@ -9454,21 +9496,27 @@ class ComputeInfo(google.protobuf.message.Message):

DESCRIPTOR: google.protobuf.descriptor.Descriptor

NUM_CPUS_FIELD_NUMBER: builtins.int
CPU_LIMIT_FIELD_NUMBER: builtins.int
CPU_MEMORY_FIELD_NUMBER: builtins.int
NUM_ACCELERATORS_FIELD_NUMBER: builtins.int
ACCELERATOR_MEMORY_FIELD_NUMBER: builtins.int
ACCELERATOR_TYPE_FIELD_NUMBER: builtins.int
num_cpus: builtins.int
"""Number of CPUs."""
cpu_limit: builtins.str
"""Amount of CPUs to use. This follows kubernetes notation like: "1", "100m", "4.5", etc.
See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/
"""
cpu_memory: builtins.str
"""Amount of CPU memory to use as a minimum."""
"""Amount of CPU memory to use as a minimum. This follows kubernetes notation like:
1Ki, 1500Mi, 3Gi, 4Ti, etc.
See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/
"""
num_accelerators: builtins.int
"""Number of accelerators (typically GPUs, TPUs, etc. not CPUs) for this resource."""
"""Amount of GPU/TPUs to use."""
accelerator_memory: builtins.str
"""Amount of accelerator/GPU memory to use as a minimum.
This is defined per accelerator.
This follows the format used by kubernetes like 1Ki, 2Mi, 3Gi, 4Ti.
See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/
The supported accelerators that the resource can run on. If the resource requires a specific
accelerator type then it will only be scheduled on nodes that have that type of accelerator.
If there is no hard requirements beyond the number of accelerators and their memory then this
Expand All @@ -9483,13 +9531,13 @@ class ComputeInfo(google.protobuf.message.Message):
def __init__(
self,
*,
num_cpus: builtins.int = ...,
cpu_limit: builtins.str = ...,
cpu_memory: builtins.str = ...,
num_accelerators: builtins.int = ...,
accelerator_memory: builtins.str = ...,
accelerator_type: collections.abc.Iterable[builtins.str] | None = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["accelerator_memory", b"accelerator_memory", "accelerator_type", b"accelerator_type", "cpu_memory", b"cpu_memory", "num_accelerators", b"num_accelerators", "num_cpus", b"num_cpus"]) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["accelerator_memory", b"accelerator_memory", "accelerator_type", b"accelerator_type", "cpu_limit", b"cpu_limit", "cpu_memory", b"cpu_memory", "num_accelerators", b"num_accelerators"]) -> None: ...

global___ComputeInfo = ComputeInfo

Expand Down
102 changes: 55 additions & 47 deletions clarifai_grpc/grpc/api/service_pb2.py

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions clarifai_grpc/grpc/api/service_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9997,6 +9997,53 @@ class MultiTrainingTimeEstimateResponse(google.protobuf.message.Message):

global___MultiTrainingTimeEstimateResponse = MultiTrainingTimeEstimateResponse

@typing_extensions.final
class ListInstanceTypesRequest(google.protobuf.message.Message):
"""List InstanceTypes"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

CLOUD_PROVIDER_FIELD_NUMBER: builtins.int
REGION_FIELD_NUMBER: builtins.int
@property
def cloud_provider(self) -> proto.clarifai.api.resources_pb2.CloudProvider:
"""The cloud provider to list compute clusters for."""
region: builtins.str
"""The region to list for so when there are multiple regions we get only the clusters
that are supposed to be up in that region.
"""
def __init__(
self,
*,
cloud_provider: proto.clarifai.api.resources_pb2.CloudProvider | None = ...,
region: builtins.str = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["cloud_provider", b"cloud_provider"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["cloud_provider", b"cloud_provider", "region", b"region"]) -> None: ...

global___ListInstanceTypesRequest = ListInstanceTypesRequest

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

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

global___MultiInstanceTypeResponse = MultiInstanceTypeResponse

@typing_extensions.final
class GetComputeClusterRequest(google.protobuf.message.Message):
"""ComputeCLuster CRUD requests and responses"""
Expand Down
34 changes: 34 additions & 0 deletions clarifai_grpc/grpc/api/service_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,11 @@ def __init__(self, channel):
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.PostModelVersionsTrainingTimeEstimateRequest.SerializeToString,
response_deserializer=wrap_response_deserializer(proto_dot_clarifai_dot_api_dot_service__pb2.MultiTrainingTimeEstimateResponse),
)
self.ListInstanceTypes = channel.unary_unary(
'/clarifai.api.V2/ListInstanceTypes',
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.ListInstanceTypesRequest.SerializeToString,
response_deserializer=wrap_response_deserializer(proto_dot_clarifai_dot_api_dot_service__pb2.MultiInstanceTypeResponse),
)
self.GetComputeCluster = channel.unary_unary(
'/clarifai.api.V2/GetComputeCluster',
request_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.GetComputeClusterRequest.SerializeToString,
Expand Down Expand Up @@ -2922,6 +2927,13 @@ def PostModelVersionsTrainingTimeEstimate(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def ListInstanceTypes(self, request, context):
"""Get InstanceTypes given Cloud Provider and Region
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def GetComputeCluster(self, request, context):
"""ComputeCluster CRUD
"""
Expand Down Expand Up @@ -4125,6 +4137,11 @@ def add_V2Servicer_to_server(servicer, server):
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.PostModelVersionsTrainingTimeEstimateRequest.FromString,
response_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.MultiTrainingTimeEstimateResponse.SerializeToString,
),
'ListInstanceTypes': grpc.unary_unary_rpc_method_handler(
servicer.ListInstanceTypes,
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.ListInstanceTypesRequest.FromString,
response_serializer=proto_dot_clarifai_dot_api_dot_service__pb2.MultiInstanceTypeResponse.SerializeToString,
),
'GetComputeCluster': grpc.unary_unary_rpc_method_handler(
servicer.GetComputeCluster,
request_deserializer=proto_dot_clarifai_dot_api_dot_service__pb2.GetComputeClusterRequest.FromString,
Expand Down Expand Up @@ -7997,6 +8014,23 @@ def PostModelVersionsTrainingTimeEstimate(request,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def ListInstanceTypes(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/ListInstanceTypes',
proto_dot_clarifai_dot_api_dot_service__pb2.ListInstanceTypesRequest.SerializeToString,
proto_dot_clarifai_dot_api_dot_service__pb2.MultiInstanceTypeResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def GetComputeCluster(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.

8 changes: 8 additions & 0 deletions clarifai_grpc/grpc/api/status/status_code_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ class _StatusCodeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._Enu
"""Deployment related codes 259xx"""
DEPLOYMENT_INVALID_ARGUMENT: _StatusCode.ValueType # 25901
DEPLOYMENT_INVALID_REQUEST: _StatusCode.ValueType # 25902
INSTANCE_TYPE_DOES_NOT_EXIST: _StatusCode.ValueType # 26000
"""InstanceType related codes 260xx"""
INSTANCE_TYPE_INVALID_ARGUMENT: _StatusCode.ValueType # 26001
INSTANCE_TYPE_INVALID_REQUEST: _StatusCode.ValueType # 26002
INPUT_DOWNLOAD_SUCCESS: _StatusCode.ValueType # 30000
"""Input:Image related 30xxx"""
INPUT_DOWNLOAD_PENDING: _StatusCode.ValueType # 30001
Expand Down Expand Up @@ -787,6 +791,10 @@ DEPLOYMENT_DOES_NOT_EXIST: StatusCode.ValueType # 25900
"""Deployment related codes 259xx"""
DEPLOYMENT_INVALID_ARGUMENT: StatusCode.ValueType # 25901
DEPLOYMENT_INVALID_REQUEST: StatusCode.ValueType # 25902
INSTANCE_TYPE_DOES_NOT_EXIST: StatusCode.ValueType # 26000
"""InstanceType related codes 260xx"""
INSTANCE_TYPE_INVALID_ARGUMENT: StatusCode.ValueType # 26001
INSTANCE_TYPE_INVALID_REQUEST: StatusCode.ValueType # 26002
INPUT_DOWNLOAD_SUCCESS: StatusCode.ValueType # 30000
"""Input:Image related 30xxx"""
INPUT_DOWNLOAD_PENDING: StatusCode.ValueType # 30001
Expand Down
Loading

0 comments on commit 7df4027

Please sign in to comment.