Skip to content

Commit

Permalink
chore: auto-gen by protobufs
Browse files Browse the repository at this point in the history
triggered by commit: instill-ai/protobufs@f2776d5
  • Loading branch information
droplet-bot committed Oct 22, 2024
1 parent 41ebf00 commit 0325c87
Show file tree
Hide file tree
Showing 10 changed files with 183 additions and 150 deletions.
60 changes: 32 additions & 28 deletions model/model/v1alpha/model_pb2.py

Large diffs are not rendered by default.

31 changes: 21 additions & 10 deletions model/model/v1alpha/model_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3750,6 +3750,7 @@ class ModelRun(google.protobuf.message.Message):
TASK_INPUTS_FIELD_NUMBER: builtins.int
TASK_OUTPUTS_FIELD_NUMBER: builtins.int
MODEL_ID_FIELD_NUMBER: builtins.int
REQUESTER_ID_FIELD_NUMBER: builtins.int
uid: builtins.str
"""Model Run UUID."""
model_uid: builtins.str
Expand Down Expand Up @@ -3785,6 +3786,10 @@ class ModelRun(google.protobuf.message.Message):
"""Model inference outputs."""
model_id: builtins.str
"""Model ID."""
requester_id: builtins.str
"""Requester ID. This field might be empty if the model run belongs to a
deleted namespace.
"""
def __init__(
self,
*,
Expand All @@ -3803,9 +3808,10 @@ class ModelRun(google.protobuf.message.Message):
task_inputs: collections.abc.Iterable[google.protobuf.struct_pb2.Struct] | None = ...,
task_outputs: collections.abc.Iterable[google.protobuf.struct_pb2.Struct] | None = ...,
model_id: builtins.str | None = ...,
requester_id: builtins.str = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["_credit_amount", b"_credit_amount", "_end_time", b"_end_time", "_error", b"_error", "_model_id", b"_model_id", "_runner_id", b"_runner_id", "_total_duration", b"_total_duration", "create_time", b"create_time", "credit_amount", b"credit_amount", "end_time", b"end_time", "error", b"error", "model_id", b"model_id", "runner_id", b"runner_id", "total_duration", b"total_duration", "update_time", b"update_time"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["_credit_amount", b"_credit_amount", "_end_time", b"_end_time", "_error", b"_error", "_model_id", b"_model_id", "_runner_id", b"_runner_id", "_total_duration", b"_total_duration", "create_time", b"create_time", "credit_amount", b"credit_amount", "end_time", b"end_time", "error", b"error", "model_id", b"model_id", "model_uid", b"model_uid", "runner_id", b"runner_id", "source", b"source", "status", b"status", "task_inputs", b"task_inputs", "task_outputs", b"task_outputs", "total_duration", b"total_duration", "uid", b"uid", "update_time", b"update_time", "version", b"version"]) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["_credit_amount", b"_credit_amount", "_end_time", b"_end_time", "_error", b"_error", "_model_id", b"_model_id", "_runner_id", b"_runner_id", "_total_duration", b"_total_duration", "create_time", b"create_time", "credit_amount", b"credit_amount", "end_time", b"end_time", "error", b"error", "model_id", b"model_id", "model_uid", b"model_uid", "requester_id", b"requester_id", "runner_id", b"runner_id", "source", b"source", "status", b"status", "task_inputs", b"task_inputs", "task_outputs", b"task_outputs", "total_duration", b"total_duration", "uid", b"uid", "update_time", b"update_time", "version", b"version"]) -> None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing_extensions.Literal["_credit_amount", b"_credit_amount"]) -> typing_extensions.Literal["credit_amount"] | None: ...
@typing.overload
Expand Down Expand Up @@ -3881,8 +3887,8 @@ class ListModelRunsRequest(google.protobuf.message.Message):
global___ListModelRunsRequest = ListModelRunsRequest

@typing_extensions.final
class ListModelRunsByCreditOwnerRequest(google.protobuf.message.Message):
"""ListModelRunsByCreditOwnerRequest is the request message for ListModelRunsByCreditOwner."""
class ListModelRunsByRequesterRequest(google.protobuf.message.Message):
"""ListModelRunsByRequesterRequest is the request message for ListModelRunsByRequester."""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

Expand All @@ -3892,6 +3898,7 @@ class ListModelRunsByCreditOwnerRequest(google.protobuf.message.Message):
FILTER_FIELD_NUMBER: builtins.int
START_FIELD_NUMBER: builtins.int
STOP_FIELD_NUMBER: builtins.int
REQUESTER_ID_FIELD_NUMBER: builtins.int
page_size: builtins.int
"""The maximum number of runs to return. The default and cap values are 10
and 100, respectively.
Expand All @@ -3908,9 +3915,10 @@ class ListModelRunsByCreditOwnerRequest(google.protobuf.message.Message):
filter: builtins.str
"""Filter can hold an [AIP-160](https://google.aip.dev/160)-compliant filter
expression.
- Example: `create_time>timestamp("2000-06-19T23:31:08.657Z")`.
- Example: `status="RUN_STATUS_COMPLETED"`.
The filter can be applied to the following fields:
- `create_time`
- `status`
- `source`
"""
@property
def start(self) -> google.protobuf.timestamp_pb2.Timestamp:
Expand All @@ -3922,6 +3930,8 @@ class ListModelRunsByCreditOwnerRequest(google.protobuf.message.Message):
"""End of the time range from which the records will be fetched.
The default value is the current timestamp.
"""
requester_id: builtins.str
"""Requester ID."""
def __init__(
self,
*,
Expand All @@ -3931,9 +3941,10 @@ class ListModelRunsByCreditOwnerRequest(google.protobuf.message.Message):
filter: builtins.str | None = ...,
start: google.protobuf.timestamp_pb2.Timestamp | None = ...,
stop: google.protobuf.timestamp_pb2.Timestamp | None = ...,
requester_id: builtins.str = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["_filter", b"_filter", "_order_by", b"_order_by", "_page", b"_page", "_page_size", b"_page_size", "_start", b"_start", "_stop", b"_stop", "filter", b"filter", "order_by", b"order_by", "page", b"page", "page_size", b"page_size", "start", b"start", "stop", b"stop"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["_filter", b"_filter", "_order_by", b"_order_by", "_page", b"_page", "_page_size", b"_page_size", "_start", b"_start", "_stop", b"_stop", "filter", b"filter", "order_by", b"order_by", "page", b"page", "page_size", b"page_size", "start", b"start", "stop", b"stop"]) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["_filter", b"_filter", "_order_by", b"_order_by", "_page", b"_page", "_page_size", b"_page_size", "_start", b"_start", "_stop", b"_stop", "filter", b"filter", "order_by", b"order_by", "page", b"page", "page_size", b"page_size", "requester_id", b"requester_id", "start", b"start", "stop", b"stop"]) -> None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing_extensions.Literal["_filter", b"_filter"]) -> typing_extensions.Literal["filter"] | None: ...
@typing.overload
Expand All @@ -3947,7 +3958,7 @@ class ListModelRunsByCreditOwnerRequest(google.protobuf.message.Message):
@typing.overload
def WhichOneof(self, oneof_group: typing_extensions.Literal["_stop", b"_stop"]) -> typing_extensions.Literal["stop"] | None: ...

global___ListModelRunsByCreditOwnerRequest = ListModelRunsByCreditOwnerRequest
global___ListModelRunsByRequesterRequest = ListModelRunsByRequesterRequest

@typing_extensions.final
class ListModelRunsResponse(google.protobuf.message.Message):
Expand Down Expand Up @@ -3981,8 +3992,8 @@ class ListModelRunsResponse(google.protobuf.message.Message):
global___ListModelRunsResponse = ListModelRunsResponse

@typing_extensions.final
class ListModelRunsByCreditOwnerResponse(google.protobuf.message.Message):
"""ListModelRunsByCreditOwnerResponse is the request message for ListModelRunsByCreditOwner."""
class ListModelRunsByRequesterResponse(google.protobuf.message.Message):
"""ListModelRunsByRequesterResponse is the request message for ListModelRunsByRequester."""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

Expand All @@ -4009,4 +4020,4 @@ class ListModelRunsByCreditOwnerResponse(google.protobuf.message.Message):
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["page", b"page", "page_size", b"page_size", "runs", b"runs", "total_size", b"total_size"]) -> None: ...

global___ListModelRunsByCreditOwnerResponse = ListModelRunsByCreditOwnerResponse
global___ListModelRunsByRequesterResponse = ListModelRunsByRequesterResponse
8 changes: 4 additions & 4 deletions model/model/v1alpha/model_public_service_pb2.py

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions model/model/v1alpha/model_public_service_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,10 @@ def __init__(self, channel):
request_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsRequest.SerializeToString,
response_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsResponse.FromString,
)
self.ListModelRunsByCreditOwner = channel.unary_unary(
'/model.model.v1alpha.ModelPublicService/ListModelRunsByCreditOwner',
request_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsByCreditOwnerRequest.SerializeToString,
response_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsByCreditOwnerResponse.FromString,
self.ListModelRunsByRequester = channel.unary_unary(
'/model.model.v1alpha.ModelPublicService/ListModelRunsByRequester',
request_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsByRequesterRequest.SerializeToString,
response_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsByRequesterResponse.FromString,
)


Expand Down Expand Up @@ -939,11 +939,11 @@ def ListModelRuns(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def ListModelRunsByCreditOwner(self, request, context):
def ListModelRunsByRequester(self, request, context):
"""List Model Runs of a Namespace (user or organization)
Returns a paginated list of runs for 1 or more models. This is mainly used by credit dashboard.
The requester can view all the runs that consumed their credits across different models.
Returns a paginated list of runs for 1 or more models. This is mainly used by dashboard.
The requester can view all the runs by the requester across different models.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
Expand Down Expand Up @@ -1247,10 +1247,10 @@ def add_ModelPublicServiceServicer_to_server(servicer, server):
request_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsRequest.FromString,
response_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsResponse.SerializeToString,
),
'ListModelRunsByCreditOwner': grpc.unary_unary_rpc_method_handler(
servicer.ListModelRunsByCreditOwner,
request_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsByCreditOwnerRequest.FromString,
response_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsByCreditOwnerResponse.SerializeToString,
'ListModelRunsByRequester': grpc.unary_unary_rpc_method_handler(
servicer.ListModelRunsByRequester,
request_deserializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsByRequesterRequest.FromString,
response_serializer=model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsByRequesterResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
Expand Down Expand Up @@ -2270,7 +2270,7 @@ def ListModelRuns(request,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def ListModelRunsByCreditOwner(request,
def ListModelRunsByRequester(request,
target,
options=(),
channel_credentials=None,
Expand All @@ -2280,8 +2280,8 @@ def ListModelRunsByCreditOwner(request,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/model.model.v1alpha.ModelPublicService/ListModelRunsByCreditOwner',
model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsByCreditOwnerRequest.SerializeToString,
model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsByCreditOwnerResponse.FromString,
return grpc.experimental.unary_unary(request, target, '/model.model.v1alpha.ModelPublicService/ListModelRunsByRequester',
model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsByRequesterRequest.SerializeToString,
model_dot_model_dot_v1alpha_dot_model__pb2.ListModelRunsByRequesterResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
30 changes: 15 additions & 15 deletions model/model/v1alpha/model_public_service_pb2_grpc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -578,14 +578,14 @@ class ModelPublicServiceStub:
Returns a paginated list of model runs.
"""
ListModelRunsByCreditOwner: grpc.UnaryUnaryMultiCallable[
model.model.v1alpha.model_pb2.ListModelRunsByCreditOwnerRequest,
model.model.v1alpha.model_pb2.ListModelRunsByCreditOwnerResponse,
ListModelRunsByRequester: grpc.UnaryUnaryMultiCallable[
model.model.v1alpha.model_pb2.ListModelRunsByRequesterRequest,
model.model.v1alpha.model_pb2.ListModelRunsByRequesterResponse,
]
"""List Model Runs of a Namespace (user or organization)
Returns a paginated list of runs for 1 or more models. This is mainly used by credit dashboard.
The requester can view all the runs that consumed their credits across different models.
Returns a paginated list of runs for 1 or more models. This is mainly used by dashboard.
The requester can view all the runs by the requester across different models.
"""

class ModelPublicServiceAsyncStub:
Expand Down Expand Up @@ -1147,14 +1147,14 @@ class ModelPublicServiceAsyncStub:
Returns a paginated list of model runs.
"""
ListModelRunsByCreditOwner: grpc.aio.UnaryUnaryMultiCallable[
model.model.v1alpha.model_pb2.ListModelRunsByCreditOwnerRequest,
model.model.v1alpha.model_pb2.ListModelRunsByCreditOwnerResponse,
ListModelRunsByRequester: grpc.aio.UnaryUnaryMultiCallable[
model.model.v1alpha.model_pb2.ListModelRunsByRequesterRequest,
model.model.v1alpha.model_pb2.ListModelRunsByRequesterResponse,
]
"""List Model Runs of a Namespace (user or organization)
Returns a paginated list of runs for 1 or more models. This is mainly used by credit dashboard.
The requester can view all the runs that consumed their credits across different models.
Returns a paginated list of runs for 1 or more models. This is mainly used by dashboard.
The requester can view all the runs by the requester across different models.
"""

class ModelPublicServiceServicer(metaclass=abc.ABCMeta):
Expand Down Expand Up @@ -1835,15 +1835,15 @@ class ModelPublicServiceServicer(metaclass=abc.ABCMeta):
Returns a paginated list of model runs.
"""
@abc.abstractmethod
def ListModelRunsByCreditOwner(
def ListModelRunsByRequester(
self,
request: model.model.v1alpha.model_pb2.ListModelRunsByCreditOwnerRequest,
request: model.model.v1alpha.model_pb2.ListModelRunsByRequesterRequest,
context: _ServicerContext,
) -> typing.Union[model.model.v1alpha.model_pb2.ListModelRunsByCreditOwnerResponse, collections.abc.Awaitable[model.model.v1alpha.model_pb2.ListModelRunsByCreditOwnerResponse]]:
) -> typing.Union[model.model.v1alpha.model_pb2.ListModelRunsByRequesterResponse, collections.abc.Awaitable[model.model.v1alpha.model_pb2.ListModelRunsByRequesterResponse]]:
"""List Model Runs of a Namespace (user or organization)
Returns a paginated list of runs for 1 or more models. This is mainly used by credit dashboard.
The requester can view all the runs that consumed their credits across different models.
Returns a paginated list of runs for 1 or more models. This is mainly used by dashboard.
The requester can view all the runs by the requester across different models.
"""

def add_ModelPublicServiceServicer_to_server(servicer: ModelPublicServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
74 changes: 39 additions & 35 deletions vdp/pipeline/v1beta/pipeline_pb2.py

Large diffs are not rendered by default.

Loading

0 comments on commit 0325c87

Please sign in to comment.