mirror of https://github.com/kubeflow/examples.git
407 lines
14 KiB
Python
407 lines
14 KiB
Python
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
import grpc
|
|
|
|
from proto import prediction_pb2 as proto_dot_prediction__pb2
|
|
|
|
|
|
class GenericStub(object):
|
|
"""[END Messages]
|
|
|
|
[START Services]
|
|
|
|
"""
|
|
|
|
def __init__(self, channel):
|
|
"""Constructor.
|
|
|
|
Args:
|
|
channel: A grpc.Channel.
|
|
"""
|
|
self.TransformInput = channel.unary_unary(
|
|
'/seldon.protos.Generic/TransformInput',
|
|
request_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
response_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
)
|
|
self.TransformOutput = channel.unary_unary(
|
|
'/seldon.protos.Generic/TransformOutput',
|
|
request_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
response_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
)
|
|
self.Route = channel.unary_unary(
|
|
'/seldon.protos.Generic/Route',
|
|
request_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
response_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
)
|
|
self.Aggregate = channel.unary_unary(
|
|
'/seldon.protos.Generic/Aggregate',
|
|
request_serializer=proto_dot_prediction__pb2.SeldonMessageList.SerializeToString,
|
|
response_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
)
|
|
self.SendFeedback = channel.unary_unary(
|
|
'/seldon.protos.Generic/SendFeedback',
|
|
request_serializer=proto_dot_prediction__pb2.Feedback.SerializeToString,
|
|
response_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
)
|
|
|
|
|
|
class GenericServicer(object):
|
|
"""[END Messages]
|
|
|
|
[START Services]
|
|
|
|
"""
|
|
|
|
def TransformInput(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def TransformOutput(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def Route(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def Aggregate(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def SendFeedback(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
|
|
def add_GenericServicer_to_server(servicer, server):
|
|
rpc_method_handlers = {
|
|
'TransformInput': grpc.unary_unary_rpc_method_handler(
|
|
servicer.TransformInput,
|
|
request_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
response_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
),
|
|
'TransformOutput': grpc.unary_unary_rpc_method_handler(
|
|
servicer.TransformOutput,
|
|
request_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
response_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
),
|
|
'Route': grpc.unary_unary_rpc_method_handler(
|
|
servicer.Route,
|
|
request_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
response_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
),
|
|
'Aggregate': grpc.unary_unary_rpc_method_handler(
|
|
servicer.Aggregate,
|
|
request_deserializer=proto_dot_prediction__pb2.SeldonMessageList.FromString,
|
|
response_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
),
|
|
'SendFeedback': grpc.unary_unary_rpc_method_handler(
|
|
servicer.SendFeedback,
|
|
request_deserializer=proto_dot_prediction__pb2.Feedback.FromString,
|
|
response_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
),
|
|
}
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
'seldon.protos.Generic', rpc_method_handlers)
|
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
|
|
|
|
class ModelStub(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def __init__(self, channel):
|
|
"""Constructor.
|
|
|
|
Args:
|
|
channel: A grpc.Channel.
|
|
"""
|
|
self.Predict = channel.unary_unary(
|
|
'/seldon.protos.Model/Predict',
|
|
request_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
response_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
)
|
|
|
|
|
|
class ModelServicer(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def Predict(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
|
|
def add_ModelServicer_to_server(servicer, server):
|
|
rpc_method_handlers = {
|
|
'Predict': grpc.unary_unary_rpc_method_handler(
|
|
servicer.Predict,
|
|
request_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
response_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
),
|
|
}
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
'seldon.protos.Model', rpc_method_handlers)
|
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
|
|
|
|
class RouterStub(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def __init__(self, channel):
|
|
"""Constructor.
|
|
|
|
Args:
|
|
channel: A grpc.Channel.
|
|
"""
|
|
self.Route = channel.unary_unary(
|
|
'/seldon.protos.Router/Route',
|
|
request_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
response_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
)
|
|
self.SendFeedback = channel.unary_unary(
|
|
'/seldon.protos.Router/SendFeedback',
|
|
request_serializer=proto_dot_prediction__pb2.Feedback.SerializeToString,
|
|
response_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
)
|
|
|
|
|
|
class RouterServicer(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def Route(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def SendFeedback(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
|
|
def add_RouterServicer_to_server(servicer, server):
|
|
rpc_method_handlers = {
|
|
'Route': grpc.unary_unary_rpc_method_handler(
|
|
servicer.Route,
|
|
request_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
response_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
),
|
|
'SendFeedback': grpc.unary_unary_rpc_method_handler(
|
|
servicer.SendFeedback,
|
|
request_deserializer=proto_dot_prediction__pb2.Feedback.FromString,
|
|
response_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
),
|
|
}
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
'seldon.protos.Router', rpc_method_handlers)
|
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
|
|
|
|
class TransformerStub(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def __init__(self, channel):
|
|
"""Constructor.
|
|
|
|
Args:
|
|
channel: A grpc.Channel.
|
|
"""
|
|
self.TransformInput = channel.unary_unary(
|
|
'/seldon.protos.Transformer/TransformInput',
|
|
request_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
response_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
)
|
|
|
|
|
|
class TransformerServicer(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def TransformInput(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
|
|
def add_TransformerServicer_to_server(servicer, server):
|
|
rpc_method_handlers = {
|
|
'TransformInput': grpc.unary_unary_rpc_method_handler(
|
|
servicer.TransformInput,
|
|
request_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
response_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
),
|
|
}
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
'seldon.protos.Transformer', rpc_method_handlers)
|
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
|
|
|
|
class OutputTransformerStub(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def __init__(self, channel):
|
|
"""Constructor.
|
|
|
|
Args:
|
|
channel: A grpc.Channel.
|
|
"""
|
|
self.TransformOutput = channel.unary_unary(
|
|
'/seldon.protos.OutputTransformer/TransformOutput',
|
|
request_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
response_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
)
|
|
|
|
|
|
class OutputTransformerServicer(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def TransformOutput(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
|
|
def add_OutputTransformerServicer_to_server(servicer, server):
|
|
rpc_method_handlers = {
|
|
'TransformOutput': grpc.unary_unary_rpc_method_handler(
|
|
servicer.TransformOutput,
|
|
request_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
response_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
),
|
|
}
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
'seldon.protos.OutputTransformer', rpc_method_handlers)
|
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
|
|
|
|
class CombinerStub(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def __init__(self, channel):
|
|
"""Constructor.
|
|
|
|
Args:
|
|
channel: A grpc.Channel.
|
|
"""
|
|
self.Aggregate = channel.unary_unary(
|
|
'/seldon.protos.Combiner/Aggregate',
|
|
request_serializer=proto_dot_prediction__pb2.SeldonMessageList.SerializeToString,
|
|
response_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
)
|
|
|
|
|
|
class CombinerServicer(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def Aggregate(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
|
|
def add_CombinerServicer_to_server(servicer, server):
|
|
rpc_method_handlers = {
|
|
'Aggregate': grpc.unary_unary_rpc_method_handler(
|
|
servicer.Aggregate,
|
|
request_deserializer=proto_dot_prediction__pb2.SeldonMessageList.FromString,
|
|
response_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
),
|
|
}
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
'seldon.protos.Combiner', rpc_method_handlers)
|
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
|
|
|
|
class SeldonStub(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def __init__(self, channel):
|
|
"""Constructor.
|
|
|
|
Args:
|
|
channel: A grpc.Channel.
|
|
"""
|
|
self.Predict = channel.unary_unary(
|
|
'/seldon.protos.Seldon/Predict',
|
|
request_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
response_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
)
|
|
self.SendFeedback = channel.unary_unary(
|
|
'/seldon.protos.Seldon/SendFeedback',
|
|
request_serializer=proto_dot_prediction__pb2.Feedback.SerializeToString,
|
|
response_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
)
|
|
|
|
|
|
class SeldonServicer(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def Predict(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
def SendFeedback(self, request, context):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
context.set_details('Method not implemented!')
|
|
raise NotImplementedError('Method not implemented!')
|
|
|
|
|
|
def add_SeldonServicer_to_server(servicer, server):
|
|
rpc_method_handlers = {
|
|
'Predict': grpc.unary_unary_rpc_method_handler(
|
|
servicer.Predict,
|
|
request_deserializer=proto_dot_prediction__pb2.SeldonMessage.FromString,
|
|
response_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
),
|
|
'SendFeedback': grpc.unary_unary_rpc_method_handler(
|
|
servicer.SendFeedback,
|
|
request_deserializer=proto_dot_prediction__pb2.Feedback.FromString,
|
|
response_serializer=proto_dot_prediction__pb2.SeldonMessage.SerializeToString,
|
|
),
|
|
}
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
'seldon.protos.Seldon', rpc_method_handlers)
|
|
server.add_generic_rpc_handlers((generic_handler,))
|