Serving: grpc Issue in sending request to tensorflow serving from a python client

Created on 11 Sep 2018  路  4Comments  路  Source: tensorflow/serving

I am trying to connect to send a request to tensorflow serving through a python web client on linux server and gettting below error.

File "/usr/local/lib/python3.6/site-packages/grpc/_channel.py", line 532, in __call__
return _end_unary_response_blocking(state, call, False, None)
File "/usr/local/lib/python3.6/site-packages/grpc/_channel.py", line 466, in _end_unary_response_blocking
raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "Name resolution failure"
debug_error_string = "{"created":"@1536670498.684467800","description":"Failed to create subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":2636,"referenced_errors":[{"created":"@1536670498.684464700","description":"Name resolution failure","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":2941,"grpc_status":14}]}"

Below is my extract of my code

server = 'localhost:8500'
channel = grpc.insecure_channel(server)
stub = prediction_service_pb2_grpc.PredictionServiceStub(channel)
request= predict_pb2.PredictRequest()
request.model_spec.name = 'model1'
request.model_spec.signature_name = 'seq_seq'

request.inputs['enc_input'].CopyFrom(tf.contrib.util.make_tensor_proto(en_tokens_1))
request.inputs['enc_len'].CopyFrom(tf.contrib.util.make_tensor_proto(en_sen_len_1))
request.inputs['dec_input'].CopyFrom(tf.contrib.util.make_tensor_proto(dec_inputs))
request.inputs['dec_len'].CopyFrom(tf.contrib.util.make_tensor_proto(dec_len))
result = stub.Predict(request, 5.0)

support

All 4 comments

Please go to Stack Overflow for help and support:

https://stackoverflow.com/questions/tagged/tensorflow-serving

If you open a GitHub issue, it must be a bug, a feature request, or a
significant problem with documentation (for small docs fixes please send
a PR instead).

Thanks!

This definitely looks like a bug for me.
Maybe gRPC bug rather than TF Serving one, but yet

@prateekgupta11 ,
Did you invoke Tensorflow Model Server before running the Client. I got the same error. Running the Client after invoking the Sever fetched me the results.

By invoking the TF Model Server, I mean running the below commands.

_sudo docker pull tensorflow/serving_

_sudo docker run -p 8500:8500 --mount type=bind,source=/usr/local/google/home/abc/Jupyter_Notebooks/TF_Serving/MNIST_Export,target=/models/MNIST_Export -e MODEL_NAME=MNIST_Export -t tensorflow/serving &_

For more details on how to run a Client, refer this link.

This definitely looks like a bug for me.
Maybe gRPC bug rather than TF Serving one, but yet

Hi, did you solve the problem锛孖 meet the same problem

Was this page helpful?
0 / 5 - 0 ratings

Related issues

johnsrude picture johnsrude  路  4Comments

prateekgupta11 picture prateekgupta11  路  4Comments

daikankan picture daikankan  路  4Comments

cchung100m picture cchung100m  路  4Comments

rsk-07 picture rsk-07  路  3Comments