1414# ==============================================================================
1515# Generated by the protocol buffer compiler. DO NOT EDIT!
1616# source: tensorflow_serving/apis/prediction_service.proto
17+ # To regenerate run
18+ # python -m grpc.tools.protoc --python_out=. --grpc_python_out=. -I. tensorflow_serving/apis/prediction_service.proto
1719
1820import sys
1921_b = sys .version_info [0 ]< 3 and (lambda x :x ) or (lambda x :x .encode ('latin1' ))
2729_sym_db = _symbol_database .Default ()
2830
2931
32+ from tensorflow_serving .apis import classification_pb2 as tensorflow__serving_dot_apis_dot_classification__pb2
3033from tensorflow_serving .apis import get_model_metadata_pb2 as tensorflow__serving_dot_apis_dot_get__model__metadata__pb2
3134from tensorflow_serving .apis import predict_pb2 as tensorflow__serving_dot_apis_dot_predict__pb2
35+ from tensorflow_serving .apis import regression_pb2 as tensorflow__serving_dot_apis_dot_regression__pb2
3236
3337
3438DESCRIPTOR = _descriptor .FileDescriptor (
3539 name = 'tensorflow_serving/apis/prediction_service.proto' ,
3640 package = 'tensorflow.serving' ,
3741 syntax = 'proto3' ,
38- serialized_pb = _b ('\n 0tensorflow_serving/apis/prediction_service.proto\x12 \x12 tensorflow.serving\x1a \ x30 tensorflow_serving/apis/get_model_metadata.proto\x1a %tensorflow_serving/apis/predict.proto2\xd6 \x01 \n \x11 PredictionService\x12 R\n \x07 Predict\x12 \" .tensorflow.serving.PredictRequest\x1a #.tensorflow.serving.PredictResponse\x12 m\n \x10 GetModelMetadata\x12 +.tensorflow.serving.GetModelMetadataRequest\x1a ,.tensorflow.serving.GetModelMetadataResponseB\x03 \xf8 \x01 \x01 \x62 \x06 proto3' )
42+ serialized_pb = _b ('\n 0tensorflow_serving/apis/prediction_service.proto\x12 \x12 tensorflow.serving\x1a ,tensorflow_serving/apis/classification.proto \x1a \ x30 tensorflow_serving/apis/get_model_metadata.proto\x1a %tensorflow_serving/apis/predict.proto \x1a (tensorflow_serving/apis/regression. proto2\x93 \x03 \n \x11 PredictionService\x12 \x61 \n \x08 \x43 lassify \x12 ).tensorflow.serving.ClassificationRequest \x1a *.tensorflow.serving.ClassificationResponse \x12 X \n \x07 Regress \x12 %.tensorflow.serving.RegressionRequest \x1a &.tensorflow.serving.RegressionResponse \x12 R\n \x07 Predict\x12 \" .tensorflow.serving.PredictRequest\x1a #.tensorflow.serving.PredictResponse\x12 m\n \x10 GetModelMetadata\x12 +.tensorflow.serving.GetModelMetadataRequest\x1a ,.tensorflow.serving.GetModelMetadataResponseB\x03 \xf8 \x01 \x01 \x62 \x06 proto3' )
3943 ,
40- dependencies = [tensorflow__serving_dot_apis_dot_get__model__metadata__pb2 .DESCRIPTOR ,tensorflow__serving_dot_apis_dot_predict__pb2 .DESCRIPTOR ,])
44+ dependencies = [tensorflow__serving_dot_apis_dot_classification__pb2 . DESCRIPTOR , tensorflow__serving_dot_apis_dot_get__model__metadata__pb2 .DESCRIPTOR ,tensorflow__serving_dot_apis_dot_predict__pb2 . DESCRIPTOR , tensorflow__serving_dot_apis_dot_regression__pb2 .DESCRIPTOR ,])
4145_sym_db .RegisterFileDescriptor (DESCRIPTOR )
4246
4347
@@ -66,6 +70,16 @@ def __init__(self, channel):
6670 Args:
6771 channel: A grpc.Channel.
6872 """
73+ self .Classify = channel .unary_unary (
74+ '/tensorflow.serving.PredictionService/Classify' ,
75+ request_serializer = tensorflow__serving_dot_apis_dot_classification__pb2 .ClassificationRequest .SerializeToString ,
76+ response_deserializer = tensorflow__serving_dot_apis_dot_classification__pb2 .ClassificationResponse .FromString ,
77+ )
78+ self .Regress = channel .unary_unary (
79+ '/tensorflow.serving.PredictionService/Regress' ,
80+ request_serializer = tensorflow__serving_dot_apis_dot_regression__pb2 .RegressionRequest .SerializeToString ,
81+ response_deserializer = tensorflow__serving_dot_apis_dot_regression__pb2 .RegressionResponse .FromString ,
82+ )
6983 self .Predict = channel .unary_unary (
7084 '/tensorflow.serving.PredictionService/Predict' ,
7185 request_serializer = tensorflow__serving_dot_apis_dot_predict__pb2 .PredictRequest .SerializeToString ,
@@ -84,6 +98,20 @@ class PredictionServiceServicer(object):
8498 model_servers.
8599 """
86100
101+ def Classify (self , request , context ):
102+ """Classify.
103+ """
104+ context .set_code (grpc .StatusCode .UNIMPLEMENTED )
105+ context .set_details ('Method not implemented!' )
106+ raise NotImplementedError ('Method not implemented!' )
107+
108+ def Regress (self , request , context ):
109+ """Regress.
110+ """
111+ context .set_code (grpc .StatusCode .UNIMPLEMENTED )
112+ context .set_details ('Method not implemented!' )
113+ raise NotImplementedError ('Method not implemented!' )
114+
87115 def Predict (self , request , context ):
88116 """Predict -- provides access to loaded TensorFlow model.
89117 """
@@ -101,6 +129,16 @@ def GetModelMetadata(self, request, context):
101129
102130def add_PredictionServiceServicer_to_server (servicer , server ):
103131 rpc_method_handlers = {
132+ 'Classify' : grpc .unary_unary_rpc_method_handler (
133+ servicer .Classify ,
134+ request_deserializer = tensorflow__serving_dot_apis_dot_classification__pb2 .ClassificationRequest .FromString ,
135+ response_serializer = tensorflow__serving_dot_apis_dot_classification__pb2 .ClassificationResponse .SerializeToString ,
136+ ),
137+ 'Regress' : grpc .unary_unary_rpc_method_handler (
138+ servicer .Regress ,
139+ request_deserializer = tensorflow__serving_dot_apis_dot_regression__pb2 .RegressionRequest .FromString ,
140+ response_serializer = tensorflow__serving_dot_apis_dot_regression__pb2 .RegressionResponse .SerializeToString ,
141+ ),
104142 'Predict' : grpc .unary_unary_rpc_method_handler (
105143 servicer .Predict ,
106144 request_deserializer = tensorflow__serving_dot_apis_dot_predict__pb2 .PredictRequest .FromString ,
@@ -127,6 +165,14 @@ class BetaPredictionServiceServicer(object):
127165 PredictionService provides access to machine-learned models loaded by
128166 model_servers.
129167 """
168+ def Classify (self , request , context ):
169+ """Classify.
170+ """
171+ context .code (beta_interfaces .StatusCode .UNIMPLEMENTED )
172+ def Regress (self , request , context ):
173+ """Regress.
174+ """
175+ context .code (beta_interfaces .StatusCode .UNIMPLEMENTED )
130176 def Predict (self , request , context ):
131177 """Predict -- provides access to loaded TensorFlow model.
132178 """
@@ -147,6 +193,16 @@ class BetaPredictionServiceStub(object):
147193 PredictionService provides access to machine-learned models loaded by
148194 model_servers.
149195 """
196+ def Classify (self , request , timeout , metadata = None , with_call = False , protocol_options = None ):
197+ """Classify.
198+ """
199+ raise NotImplementedError ()
200+ Classify .future = None
201+ def Regress (self , request , timeout , metadata = None , with_call = False , protocol_options = None ):
202+ """Regress.
203+ """
204+ raise NotImplementedError ()
205+ Regress .future = None
150206 def Predict (self , request , timeout , metadata = None , with_call = False , protocol_options = None ):
151207 """Predict -- provides access to loaded TensorFlow model.
152208 """
@@ -166,16 +222,22 @@ def beta_create_PredictionService_server(servicer, pool=None, pool_size=None, de
166222 file not marked beta) for all further purposes. This function was
167223 generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
168224 request_deserializers = {
225+ ('tensorflow.serving.PredictionService' , 'Classify' ): tensorflow__serving_dot_apis_dot_classification__pb2 .ClassificationRequest .FromString ,
169226 ('tensorflow.serving.PredictionService' , 'GetModelMetadata' ): tensorflow__serving_dot_apis_dot_get__model__metadata__pb2 .GetModelMetadataRequest .FromString ,
170227 ('tensorflow.serving.PredictionService' , 'Predict' ): tensorflow__serving_dot_apis_dot_predict__pb2 .PredictRequest .FromString ,
228+ ('tensorflow.serving.PredictionService' , 'Regress' ): tensorflow__serving_dot_apis_dot_regression__pb2 .RegressionRequest .FromString ,
171229 }
172230 response_serializers = {
231+ ('tensorflow.serving.PredictionService' , 'Classify' ): tensorflow__serving_dot_apis_dot_classification__pb2 .ClassificationResponse .SerializeToString ,
173232 ('tensorflow.serving.PredictionService' , 'GetModelMetadata' ): tensorflow__serving_dot_apis_dot_get__model__metadata__pb2 .GetModelMetadataResponse .SerializeToString ,
174233 ('tensorflow.serving.PredictionService' , 'Predict' ): tensorflow__serving_dot_apis_dot_predict__pb2 .PredictResponse .SerializeToString ,
234+ ('tensorflow.serving.PredictionService' , 'Regress' ): tensorflow__serving_dot_apis_dot_regression__pb2 .RegressionResponse .SerializeToString ,
175235 }
176236 method_implementations = {
237+ ('tensorflow.serving.PredictionService' , 'Classify' ): face_utilities .unary_unary_inline (servicer .Classify ),
177238 ('tensorflow.serving.PredictionService' , 'GetModelMetadata' ): face_utilities .unary_unary_inline (servicer .GetModelMetadata ),
178239 ('tensorflow.serving.PredictionService' , 'Predict' ): face_utilities .unary_unary_inline (servicer .Predict ),
240+ ('tensorflow.serving.PredictionService' , 'Regress' ): face_utilities .unary_unary_inline (servicer .Regress ),
179241 }
180242 server_options = beta_implementations .server_options (request_deserializers = request_deserializers , response_serializers = response_serializers , thread_pool = pool , thread_pool_size = pool_size , default_timeout = default_timeout , maximum_timeout = maximum_timeout )
181243 return beta_implementations .server (method_implementations , options = server_options )
@@ -188,16 +250,22 @@ def beta_create_PredictionService_stub(channel, host=None, metadata_transformer=
188250 file not marked beta) for all further purposes. This function was
189251 generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
190252 request_serializers = {
253+ ('tensorflow.serving.PredictionService' , 'Classify' ): tensorflow__serving_dot_apis_dot_classification__pb2 .ClassificationRequest .SerializeToString ,
191254 ('tensorflow.serving.PredictionService' , 'GetModelMetadata' ): tensorflow__serving_dot_apis_dot_get__model__metadata__pb2 .GetModelMetadataRequest .SerializeToString ,
192255 ('tensorflow.serving.PredictionService' , 'Predict' ): tensorflow__serving_dot_apis_dot_predict__pb2 .PredictRequest .SerializeToString ,
256+ ('tensorflow.serving.PredictionService' , 'Regress' ): tensorflow__serving_dot_apis_dot_regression__pb2 .RegressionRequest .SerializeToString ,
193257 }
194258 response_deserializers = {
259+ ('tensorflow.serving.PredictionService' , 'Classify' ): tensorflow__serving_dot_apis_dot_classification__pb2 .ClassificationResponse .FromString ,
195260 ('tensorflow.serving.PredictionService' , 'GetModelMetadata' ): tensorflow__serving_dot_apis_dot_get__model__metadata__pb2 .GetModelMetadataResponse .FromString ,
196261 ('tensorflow.serving.PredictionService' , 'Predict' ): tensorflow__serving_dot_apis_dot_predict__pb2 .PredictResponse .FromString ,
262+ ('tensorflow.serving.PredictionService' , 'Regress' ): tensorflow__serving_dot_apis_dot_regression__pb2 .RegressionResponse .FromString ,
197263 }
198264 cardinalities = {
265+ 'Classify' : cardinality .Cardinality .UNARY_UNARY ,
199266 'GetModelMetadata' : cardinality .Cardinality .UNARY_UNARY ,
200267 'Predict' : cardinality .Cardinality .UNARY_UNARY ,
268+ 'Regress' : cardinality .Cardinality .UNARY_UNARY ,
201269 }
202270 stub_options = beta_implementations .stub_options (host = host , metadata_transformer = metadata_transformer , request_serializers = request_serializers , response_deserializers = response_deserializers , thread_pool = pool , thread_pool_size = pool_size )
203271 return beta_implementations .dynamic_stub (channel , 'tensorflow.serving.PredictionService' , cardinalities , options = stub_options )
0 commit comments