-
Notifications
You must be signed in to change notification settings - Fork 843
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
unable to use GRPC APIs via Python - torchserve_grpc_client.py not generated on Windows #907
Comments
@jeffxtang: This is a documentation issue. The path has changed from And this is not a windows specific problem. |
@jeffxtang Can you test with the updated instructions in #908 and let me know if it works? Thanks |
(py38) PS C:\Users\Warrior\repos\serve> python ts_scripts/torchserve_grpc_client.py infer densenet161 examples/image_classifier/kitten.jpg |
@jeffxtang: You will need to generate the client stubs as well using the updated command.
Also, note that the command in README.md to run inference on the densenet161 model through gRPC API expects the model to be already registered. |
@harshbafna by "expects the model to be already registered" you mean run torchserve like
So it seems working. But it'd be nice if torchserve_grpc_client.py also returns the similar results as using curl for the REST API. |
Yes, that will register the
The print statement was missing in the client's infer function. I have fixed that as well in the same PR. |
@jeffxtang Let me know if this resolves the issue. The fix has been pushed to the same PR #908 |
Cool it works. |
Your Environment
[If public url then provide link.]:
Expected Behavior
Get prediction from a model Using GRPC APIs through python client
Current Behavior
'scripts/torchserve_grpc_client.py' not generated
Possible Solution
Steps to Reproduce
See Logs below.
Failure Logs [if any]
(py38) PS C:\Users\Warrior\repos\serve> python -m grpc_tools.protoc --proto_path=frontend/server/src/main/resources/proto/ --python_out=scripts --grpc_python_out=scripts frontend/server/src/main/resources/proto/inference.proto frontend/server/src/main/resources/proto/management.proto
(py38) PS C:\Users\Warrior\repos\serve> dir .\scripts\
-a---- 12/15/2020 5:41 PM 9910 inference_pb2.py
-a---- 12/15/2020 5:41 PM 4307 inference_pb2_grpc.py
-a---- 12/15/2020 5:41 PM 23178 management_pb2.py
-a---- 12/15/2020 5:41 PM 11045 management_pb2_grpc.py
(py38) PS C:\Users\Warrior\repos\serve> python scripts/torchserve_grpc_client.py infer densenet161 examples/image_classifier/kitten.jpg
C:\Users\Warrior\anaconda3\envs\py38\python.exe: can't open file 'scripts/torchserve_grpc_client.py': [Errno 2] No such file or directory
The text was updated successfully, but these errors were encountered: