From 59374ec1de0a44be5821f38aef8a4738b33ecc00 Mon Sep 17 00:00:00 2001 From: "Julien B." <xm9q8f80@jlnbrtn.me> Date: Sun, 25 Aug 2024 19:25:31 +0200 Subject: [PATCH] fix(inferer): add inferer processing --- microservices/inferer/inferer_pb2_grpc.py | 65 +++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 microservices/inferer/inferer_pb2_grpc.py diff --git a/microservices/inferer/inferer_pb2_grpc.py b/microservices/inferer/inferer_pb2_grpc.py new file mode 100644 index 0000000..b32782c --- /dev/null +++ b/microservices/inferer/inferer_pb2_grpc.py @@ -0,0 +1,65 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import inferer_pb2 as api_dot_protos_dot_inferer_dot_inferer__pb2 + + +class InfererStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.StartInference = channel.unary_unary( + '/Inferer/StartInference', + request_serializer=api_dot_protos_dot_inferer_dot_inferer__pb2.InferenceInput.SerializeToString, + response_deserializer=api_dot_protos_dot_inferer_dot_inferer__pb2.InferenceResult.FromString, + ) + + +class InfererServicer(object): + """Missing associated documentation comment in .proto file.""" + + def StartInference(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_InfererServicer_to_server(servicer, server): + rpc_method_handlers = { + 'StartInference': grpc.unary_unary_rpc_method_handler( + servicer.StartInference, + request_deserializer=api_dot_protos_dot_inferer_dot_inferer__pb2.InferenceInput.FromString, + response_serializer=api_dot_protos_dot_inferer_dot_inferer__pb2.InferenceResult.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'Inferer', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class Inferer(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def StartInference(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, '/Inferer/StartInference', + api_dot_protos_dot_inferer_dot_inferer__pb2.InferenceInput.SerializeToString, + api_dot_protos_dot_inferer_dot_inferer__pb2.InferenceResult.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) -- GitLab