python predict client problem
sailor88128 opened this issue · 5 comments
Hi tobe,
I want to use the python and java client to get data back from tf serving server on another PC 10.10.10.229. It seems bazel and tensorflow is not necessary here.
But when I run the predict_client.py code, it seems the connection failed. How can I fix?
~/Desktop/tensorflow_template_application/python_predict_client$ ./predict_client.py --host 10.10.10.229 --port 9000 --model_name dense --model_version 1
Traceback (most recent call last):
File "./predict_client.py", line 51, in <module>
main()
File "./predict_client.py", line 46, in main
result = stub.Predict(request, request_timeout)
File "/usr/local/lib/python2.7/dist-packages/grpc/beta/_client_adaptations.py", line 309, in __call__
self._request_serializer, self._response_deserializer)
File "/usr/local/lib/python2.7/dist-packages/grpc/beta/_client_adaptations.py", line 195, in _blocking_unary_unary
raise _abortion_error(rpc_error_call)
grpc.framework.interfaces.face.face.AbortionError: AbortionError(code=StatusCode.UNAVAILABLE, details="Connect Failed")
It seems that you have not find the file. The files are in https://github.com/tobegit3hub/tensorflow_template_application/tree/master/python_predict_client/generate_python_files .
The path of proto files should be set up in predict_client.py ?
Have you changed the error message of this problem? @sailor88128
Now it seems that the python client works but the server has not started. So you get the StatusCode.UNAVAILABLE
problem. You need to setup your tensorflow serving server in 10.10.10.229:9000
before starting the client.
Oh, it seems you are right. The serving code is running in docker, the docker port 9000 is linked with host PC port 9000. Then I want to visit serving from another PC. Maybe I need to start the serving on host PC port 9000?
It seems not a direct way... What's the usual way to provide serving?
No, I did not change the error message. @tobegit3hub