Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python predict client problem #32

Open
sailor88128 opened this issue Nov 22, 2017 · 5 comments
Open

python predict client problem #32

sailor88128 opened this issue Nov 22, 2017 · 5 comments

Comments

@sailor88128
Copy link

sailor88128 commented Nov 22, 2017

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")

@tobegit3hub
Copy link
Owner

@sailor88128
Copy link
Author

The path of proto files should be set up in predict_client.py ?

@tobegit3hub
Copy link
Owner

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.

@sailor88128
Copy link
Author

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?

@sailor88128
Copy link
Author

No, I did not change the error message. @tobegit3hub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants