File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 2121from flask import Flask , request , jsonify
2222from flask_api import status
2323from waitress import serve
24- from grpc . beta import implementations
24+ import grpc
2525from tensorflow_serving .apis import predict_pb2
2626from tensorflow_serving .apis import get_model_metadata_pb2
27- from tensorflow_serving .apis import prediction_service_pb2
27+ from tensorflow_serving .apis import prediction_service_pb2_grpc
2828from lib import util , tf_lib , package , Context
2929from lib .log import get_logger
3030from lib .exceptions import CortexException , UserRuntimeException , UserException
@@ -323,8 +323,8 @@ def start(args):
323323 input_args_schema
324324 )
325325
326- channel = implementations .insecure_channel ("localhost" , args .tf_serve_port )
327- local_cache ["stub" ] = prediction_service_pb2 . beta_create_PredictionService_stub (channel )
326+ channel = grpc .insecure_channel ("localhost:" + str ( args .tf_serve_port ) )
327+ local_cache ["stub" ] = prediction_service_pb2_grpc . PredictionServiceStub (channel )
328328
329329 local_cache ["required_inputs" ] = tf_lib .get_base_input_columns (model ["name" ], ctx )
330330
Original file line number Diff line number Diff line change 11flask == 1.0.2
22flask-api == 1.1
33waitress == 1.2.1
4- tensorflow-serving-api == 1.12 .0
4+ tensorflow-serving-api == 1.13 .0
You can’t perform that action at this time.
0 commit comments