OpenVINO™ Model Server Client
OpenVINO™ Model Server Client package makes the interaction with the model server easy. It is very lightweight thanks to minimal number of included dependencies. The total size of the package, along with all dependencies is less than 100 MB.
The ovmsclient
package works both with OpenVINO™ Model Server and TensorFlow Serving. It supports both gRPC and REST API calls: Predict
, GetModelMetadata
and GetModelStatus
.
The ovmsclient
can replace tensorflow-serving-api
package with reduced footprint and simplified interface.
See API reference for usage details.
Usage example
import ovmsclient
client = ovmsclient.make_grpc_client("localhost:9000")
model_metadata = client.get_model_metadata(model_name="model")
input_name = next(iter(model_metadata["inputs"]))
with open("path/to/img.jpg", 'rb') as f:
img = f.read()
inputs = {input_name: img}
results = client.predict(inputs=inputs, model_name="model")
Learn more on ovmsclient
documentation site.