ExpirationError(code = StatusCode.DEADLINE_EXCEEDED,details =“Deadline Exceeded”)

时间:2018-05-14 04:37:14

标签: tensorflow tensorflow-serving

我正在关注tutorial使用tensorflow服务部署初始模型。我正在使用ubuntu 16.04和bazel 13.0。服务器正在运行我能够ping服务器。但是当我上传图片时,它显示了跟随错误

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 个答案:

答案 0 :(得分:0)

当tensorflow服务客户端无法与服务器进行通信时,会发生这种情况。或者由于网络错误也可能发生这种情况。如果您使用docker来托管tensorflow模型服务器,则需要打开容器中的端口,如下所述,

docker run --name=tensorflow_container -p 9020:9020 -it $USER/tensorflow-serving-devel

让我知道这是否有效。有一个好的。