- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was going through https://docs.openvino.ai/nightly/ovms_docs_deploying_server.html
Item 3
I updated the script predict.py so that it can work with SSL
I am getting this error
python3 predict.py zebra.jpeg
Traceback (most recent call last):
File "//predict.py", line 4, in <module>
from ovmsclient.generated import ovms_pb2, ovms_pb2_grpc
ModuleNotFoundError: No module named 'ovmsclient.generated'
(
(tutorial-env) root@ubuntu:/# cat predict.py
import numpy as np
from classes import imagenet_classes
import grpc
from ovmsclient.generated import ovms_pb2, ovms_pb2_grpc
# Set up SSL/TLS credentials
credentials = grpc.ssl_channel_credentials()
# Create a secure channel to the gRPC server
channel = grpc.secure_channel("10.1.1.7:443", credentials)
# Create a gRPC stub
stub = ovms_pb2_grpc.OpenVinoModelServerStub(channel)
# Read image file
with open("zebra.jpeg", "rb") as f:
img = f.read()
# Make prediction request to the specified model
request = ovms_pb2.PredictRequest()
request.inputs["0"].data = img
request.model_spec.name = "resnet"
# Send the request and get the response
response = stub.Predict(request)
# Handle the prediction output
if response:
result_index = np.argmax(response.outputs["1"].data)
predicted_class = imagenet_classes[result_index]
print("Predicted class:", predicted_class)
else:
print("No prediction output received.")
(tutorial-env) root@ubuntu:/#
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Scuba,
Thanks for reaching out to us.
We'll further investigate the issue and we'll update you as soon as possible. On the other hand, could you please share the following information with us?
- Which options did you choose to deploy the OpenVINO™ Model Server?
- Which operating system are you using when deploying the OpenVINO™ Model Server?
Regards,
Wan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Which options did you choose to deploy the OpenVINO™ Model Server?
Container option :https://docs.openvino.ai/nightly/ovms_docs_deploying_server.html
- Which operating system are you using when deploying the OpenVINO™ Model Server?
AWS Ec2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Scuba,
Thanks for your patience.
I’ve deployed the OpenVINO™ Model Server in a Docker Container using the option that you shared here. I’ve validated the example from here that launched the OpenVINO™ Model Server with a ResNet50 image classification model from a cloud storage.
For your information, the error you encountered: ModuleNotFoundError: No module named ‘ovmsclient.generated’ when running from ovmsclient.generated import ovms_pb2, ovms_pb2_grpc is expected because the generated module is not available at ovmsclient package.
Sorry for the inconvenience and thank you for your support.
Regards,
Wan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Scuba,
Thanks for your question.
If you need additional information from Intel, please submit a new question as this thread will no longer be monitored.
Regards,
Wan

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page