问题
I am following tutorial for deploying the inception model using tensorflow serving.I am using ubuntu 16.04 and bazel 13.0.The server is running am able to ping the server.But when I upload a pic ,It shows the following error
jennings@Jennings:~/serving$ bazel-bin/tensorflow_serving/example/inception_clie nt --server=localhost:9000 --image=./Xiang_Xiang_panda.jpg
Traceback (most recent call last):
File "/home/jennings/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/tf_serving/tensorflow_serving/example/inception_client.py", line 56, in <module>
tf.app.run()
File "/home/jennings/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/org_tensorflow/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/home/jennings/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/tf_serving/tensorflow_serving/example/inception_client.py", line 51, in main
result = stub.Predict(request, 10.0) # 10 secs timeout
File "/home/jennings/.local/lib/python2.7/site-packages/grpc/beta/_client_adaptations.py", line 309, in __call__
self._request_serializer, self._response_deserializer)
File "/home/jennings/.local/lib/python2.7/site-packages/grpc/beta/_client_adaptations.py", line 195, in _blocking_unary_unary
raise _abortion_error(rpc_error_call)
grpc.framework.interfaces.face.face.ExpirationError: ExpirationError(code=StatusCode.DEADLINE_EXCEEDED, details="Deadline Exceeded")
回答1:
This happens when the tensorflow serving client is not able to make communication with server. Or this might also occur due to network error. If you are using a docker to host your tensorflow model server, you need to open the port in the container as mentioned below,
docker run --name=tensorflow_container -p 9020:9020 -it $USER/tensorflow-serving-devel
Let me know if this works.Have a good one.
来源:https://stackoverflow.com/questions/50323168/expirationerrorcode-statuscode-deadline-exceeded-details-deadline-exceeded