diff --git a/mlserver/grpc/dataplane_pb2.py b/mlserver/grpc/dataplane_pb2.py index b7edbc6a1..79bd10d16 100644 --- a/mlserver/grpc/dataplane_pb2.py +++ b/mlserver/grpc/dataplane_pb2.py @@ -1,13 +1,18 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: dataplane.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.27.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, 5, 27, 2, "", "dataplane.proto" +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -20,38 +25,44 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "dataplane_pb2", _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals["DESCRIPTOR"]._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals["DESCRIPTOR"]._loaded_options = None _globals["DESCRIPTOR"]._serialized_options = b"\n\007ex.grpc\242\002\003HSW" - _globals["_MODELMETADATARESPONSE_TENSORMETADATA_PARAMETERSENTRY"]._options = None + _globals[ + "_MODELMETADATARESPONSE_TENSORMETADATA_PARAMETERSENTRY" + ]._loaded_options = None _globals[ "_MODELMETADATARESPONSE_TENSORMETADATA_PARAMETERSENTRY" ]._serialized_options = b"8\001" - _globals["_MODELMETADATARESPONSE_PARAMETERSENTRY"]._options = None + _globals["_MODELMETADATARESPONSE_PARAMETERSENTRY"]._loaded_options = None _globals["_MODELMETADATARESPONSE_PARAMETERSENTRY"]._serialized_options = b"8\001" - _globals["_MODELINFERREQUEST_INFERINPUTTENSOR_PARAMETERSENTRY"]._options = None + _globals["_MODELINFERREQUEST_INFERINPUTTENSOR_PARAMETERSENTRY"]._loaded_options = ( + None + ) _globals[ "_MODELINFERREQUEST_INFERINPUTTENSOR_PARAMETERSENTRY" ]._serialized_options = b"8\001" _globals[ "_MODELINFERREQUEST_INFERREQUESTEDOUTPUTTENSOR_PARAMETERSENTRY" - ]._options = None + ]._loaded_options = None _globals[ "_MODELINFERREQUEST_INFERREQUESTEDOUTPUTTENSOR_PARAMETERSENTRY" ]._serialized_options = b"8\001" - _globals["_MODELINFERREQUEST_PARAMETERSENTRY"]._options = None + _globals["_MODELINFERREQUEST_PARAMETERSENTRY"]._loaded_options = None _globals["_MODELINFERREQUEST_PARAMETERSENTRY"]._serialized_options = b"8\001" - _globals["_MODELINFERRESPONSE_INFEROUTPUTTENSOR_PARAMETERSENTRY"]._options = None + _globals[ + "_MODELINFERRESPONSE_INFEROUTPUTTENSOR_PARAMETERSENTRY" + ]._loaded_options = None _globals[ "_MODELINFERRESPONSE_INFEROUTPUTTENSOR_PARAMETERSENTRY" ]._serialized_options = b"8\001" - _globals["_MODELINFERRESPONSE_PARAMETERSENTRY"]._options = None + _globals["_MODELINFERRESPONSE_PARAMETERSENTRY"]._loaded_options = None _globals["_MODELINFERRESPONSE_PARAMETERSENTRY"]._serialized_options = b"8\001" - _globals["_REPOSITORYMODELLOADREQUEST_PARAMETERSENTRY"]._options = None + _globals["_REPOSITORYMODELLOADREQUEST_PARAMETERSENTRY"]._loaded_options = None _globals["_REPOSITORYMODELLOADREQUEST_PARAMETERSENTRY"]._serialized_options = ( b"8\001" ) - _globals["_REPOSITORYMODELUNLOADREQUEST_PARAMETERSENTRY"]._options = None + _globals["_REPOSITORYMODELUNLOADREQUEST_PARAMETERSENTRY"]._loaded_options = None _globals["_REPOSITORYMODELUNLOADREQUEST_PARAMETERSENTRY"]._serialized_options = ( b"8\001" ) diff --git a/mlserver/grpc/dataplane_pb2_grpc.py b/mlserver/grpc/dataplane_pb2_grpc.py index 266d34de7..c1dc1b4ef 100644 --- a/mlserver/grpc/dataplane_pb2_grpc.py +++ b/mlserver/grpc/dataplane_pb2_grpc.py @@ -1,9 +1,32 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings from . import dataplane_pb2 as dataplane__pb2 +GRPC_GENERATED_VERSION = "1.67.1" +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + + _version_not_supported = first_version_is_lower( + GRPC_VERSION, GRPC_GENERATED_VERSION + ) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f"The grpc package installed is at version {GRPC_VERSION}," + + f" but the generated code in dataplane_pb2_grpc.py depends on" + + f" grpcio>={GRPC_GENERATED_VERSION}." + + f" Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}" + + f" or downgrade your generated code using grpcio-tools<={GRPC_VERSION}." + ) + class GRPCInferenceServiceStub(object): """ @@ -21,51 +44,61 @@ def __init__(self, channel): "/inference.GRPCInferenceService/ServerLive", request_serializer=dataplane__pb2.ServerLiveRequest.SerializeToString, response_deserializer=dataplane__pb2.ServerLiveResponse.FromString, + _registered_method=True, ) self.ServerReady = channel.unary_unary( "/inference.GRPCInferenceService/ServerReady", request_serializer=dataplane__pb2.ServerReadyRequest.SerializeToString, response_deserializer=dataplane__pb2.ServerReadyResponse.FromString, + _registered_method=True, ) self.ModelReady = channel.unary_unary( "/inference.GRPCInferenceService/ModelReady", request_serializer=dataplane__pb2.ModelReadyRequest.SerializeToString, response_deserializer=dataplane__pb2.ModelReadyResponse.FromString, + _registered_method=True, ) self.ServerMetadata = channel.unary_unary( "/inference.GRPCInferenceService/ServerMetadata", request_serializer=dataplane__pb2.ServerMetadataRequest.SerializeToString, response_deserializer=dataplane__pb2.ServerMetadataResponse.FromString, + _registered_method=True, ) self.ModelMetadata = channel.unary_unary( "/inference.GRPCInferenceService/ModelMetadata", request_serializer=dataplane__pb2.ModelMetadataRequest.SerializeToString, response_deserializer=dataplane__pb2.ModelMetadataResponse.FromString, + _registered_method=True, ) self.ModelInfer = channel.unary_unary( "/inference.GRPCInferenceService/ModelInfer", request_serializer=dataplane__pb2.ModelInferRequest.SerializeToString, response_deserializer=dataplane__pb2.ModelInferResponse.FromString, + _registered_method=True, ) self.ModelStreamInfer = channel.stream_stream( "/inference.GRPCInferenceService/ModelStreamInfer", request_serializer=dataplane__pb2.ModelInferRequest.SerializeToString, response_deserializer=dataplane__pb2.ModelInferResponse.FromString, + _registered_method=True, ) self.RepositoryIndex = channel.unary_unary( "/inference.GRPCInferenceService/RepositoryIndex", request_serializer=dataplane__pb2.RepositoryIndexRequest.SerializeToString, response_deserializer=dataplane__pb2.RepositoryIndexResponse.FromString, + _registered_method=True, ) self.RepositoryModelLoad = channel.unary_unary( "/inference.GRPCInferenceService/RepositoryModelLoad", request_serializer=dataplane__pb2.RepositoryModelLoadRequest.SerializeToString, response_deserializer=dataplane__pb2.RepositoryModelLoadResponse.FromString, + _registered_method=True, ) self.RepositoryModelUnload = channel.unary_unary( "/inference.GRPCInferenceService/RepositoryModelUnload", request_serializer=dataplane__pb2.RepositoryModelUnloadRequest.SerializeToString, response_deserializer=dataplane__pb2.RepositoryModelUnloadResponse.FromString, + _registered_method=True, ) @@ -193,6 +226,9 @@ def add_GRPCInferenceServiceServicer_to_server(servicer, server): "inference.GRPCInferenceService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers( + "inference.GRPCInferenceService", rpc_method_handlers + ) # This class is part of an EXPERIMENTAL API. @@ -229,6 +265,7 @@ def ServerLive( wait_for_ready, timeout, metadata, + _registered_method=True, ) @staticmethod @@ -258,6 +295,7 @@ def ServerReady( wait_for_ready, timeout, metadata, + _registered_method=True, ) @staticmethod @@ -287,6 +325,7 @@ def ModelReady( wait_for_ready, timeout, metadata, + _registered_method=True, ) @staticmethod @@ -316,6 +355,7 @@ def ServerMetadata( wait_for_ready, timeout, metadata, + _registered_method=True, ) @staticmethod @@ -345,6 +385,7 @@ def ModelMetadata( wait_for_ready, timeout, metadata, + _registered_method=True, ) @staticmethod @@ -374,6 +415,7 @@ def ModelInfer( wait_for_ready, timeout, metadata, + _registered_method=True, ) @staticmethod @@ -403,6 +445,7 @@ def ModelStreamInfer( wait_for_ready, timeout, metadata, + _registered_method=True, ) @staticmethod @@ -432,6 +475,7 @@ def RepositoryIndex( wait_for_ready, timeout, metadata, + _registered_method=True, ) @staticmethod @@ -461,6 +505,7 @@ def RepositoryModelLoad( wait_for_ready, timeout, metadata, + _registered_method=True, ) @staticmethod @@ -490,4 +535,5 @@ def RepositoryModelUnload( wait_for_ready, timeout, metadata, + _registered_method=True, ) diff --git a/mlserver/grpc/model_repository_pb2.py b/mlserver/grpc/model_repository_pb2.py index fb1c3ae44..b823e95f1 100644 --- a/mlserver/grpc/model_repository_pb2.py +++ b/mlserver/grpc/model_repository_pb2.py @@ -1,13 +1,18 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: model_repository.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.27.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, 5, 27, 2, "", "model_repository.proto" +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -20,8 +25,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "model_repository_pb2", _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None _globals["_REPOSITORYINDEXREQUEST"]._serialized_start = 54 _globals["_REPOSITORYINDEXREQUEST"]._serialized_end = 118 _globals["_REPOSITORYINDEXRESPONSE"]._serialized_start = 121 diff --git a/mlserver/grpc/model_repository_pb2_grpc.py b/mlserver/grpc/model_repository_pb2_grpc.py index 280d5c304..5c3fd2e2f 100644 --- a/mlserver/grpc/model_repository_pb2_grpc.py +++ b/mlserver/grpc/model_repository_pb2_grpc.py @@ -1,9 +1,32 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings from . import model_repository_pb2 as model__repository__pb2 +GRPC_GENERATED_VERSION = "1.67.1" +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + + _version_not_supported = first_version_is_lower( + GRPC_VERSION, GRPC_GENERATED_VERSION + ) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f"The grpc package installed is at version {GRPC_VERSION}," + + f" but the generated code in model_repository_pb2_grpc.py depends on" + + f" grpcio>={GRPC_GENERATED_VERSION}." + + f" Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}" + + f" or downgrade your generated code using grpcio-tools<={GRPC_VERSION}." + ) + class ModelRepositoryServiceStub(object): """Missing associated documentation comment in .proto file.""" @@ -18,16 +41,19 @@ def __init__(self, channel): "/inference.model_repository.ModelRepositoryService/RepositoryIndex", request_serializer=model__repository__pb2.RepositoryIndexRequest.SerializeToString, response_deserializer=model__repository__pb2.RepositoryIndexResponse.FromString, + _registered_method=True, ) self.RepositoryModelLoad = channel.unary_unary( "/inference.model_repository.ModelRepositoryService/RepositoryModelLoad", request_serializer=model__repository__pb2.RepositoryModelLoadRequest.SerializeToString, response_deserializer=model__repository__pb2.RepositoryModelLoadResponse.FromString, + _registered_method=True, ) self.RepositoryModelUnload = channel.unary_unary( "/inference.model_repository.ModelRepositoryService/RepositoryModelUnload", request_serializer=model__repository__pb2.RepositoryModelUnloadRequest.SerializeToString, response_deserializer=model__repository__pb2.RepositoryModelUnloadResponse.FromString, + _registered_method=True, ) @@ -75,6 +101,9 @@ def add_ModelRepositoryServiceServicer_to_server(servicer, server): "inference.model_repository.ModelRepositoryService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers( + "inference.model_repository.ModelRepositoryService", rpc_method_handlers + ) # This class is part of an EXPERIMENTAL API. @@ -108,6 +137,7 @@ def RepositoryIndex( wait_for_ready, timeout, metadata, + _registered_method=True, ) @staticmethod @@ -137,6 +167,7 @@ def RepositoryModelLoad( wait_for_ready, timeout, metadata, + _registered_method=True, ) @staticmethod @@ -166,4 +197,5 @@ def RepositoryModelUnload( wait_for_ready, timeout, metadata, + _registered_method=True, )