我正在尝试使用OpenVINO model server repo中提到的过程为OpenVINO模型提供服务,但是在尝试获取模型的元数据时遇到了以下问题。
我正在执行的命令是
python get_serving_meta.py --grpc_address 0.0.0.0 --grpc_port 9001 \
--model_name my_model --model_version 1
我收到的错误是:
Getting model metadata for model: my_model
Traceback (most recent call last):
File "get_serving_meta.py", line 97, in <module>
result = stub.GetModelMetadata(request, 10.0) # result includes a dictionary with all model outputs
File "/root/.pyenv/versions/3.6.8/lib/python3.6/site-packages/grpc/_channel.py", line 549, in __call__
return _end_unary_response_blocking(state, call, False, None)
File "/root/.pyenv/versions/3.6.8/lib/python3.6/site-packages/grpc/_channel.py", line 466, in _end_unary_response_blocking
raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.NOT_FOUND
details = "Servable not found for request:Specific(my_model, 1)"
debug_error_string = "{"created":"@1555239621.319103888","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Servable not found for request: Specific(my_model, 1)","grpc_status":5}"
要启动docker容器,我使用的cmd是:
docker run --rm -d -v /home/rachit/models/:/opt/ml:ro -p 9001:9001 \
docker.io/intelaipg/openvino-model-server:latest \
/ie-serving-py/start_server.sh ie_serving model \
--model_path /opt/ml/model1 --model_name my_model --port 9001
/ home / rachit / models的目录树结构为
models/
|-- model1/
|---|---1/
|---|---|--- frozen_inference_graph.bin
|---|---|--- frozen_inference_graph.xml
Docker日志:
2019-04-14 10:36:03,862-ie_serving.main-INFO-日志级别集:INFO
2019-04-14 10:36:03,863-ie_serving.models.model-信息-服务器开始加载模型:my_model
2019-04-14 10:36:03,865-ie_serving.models.model-信息-my_model模型的可用版本列表:[]
2019-04-14 10:36:03,865-ie_serving.models.model-INFO-my_model模型的默认版本为-1
2019-04-14 10:36:03,876-ie_serving.server.start-信息-服务器在端口9001上侦听并将服务模型:['my_model']
我是新手,所以任何帮助都会非常有帮助。谢谢
答案 0 :(得分:0)
根据问题描述,-grpc_address参数不正确。
它应该是openvino模型服务器docker容器中公开的服务的IP地址。如果从启动docker的同一主机进行连接,则只需使用localhost值:
python get_serving_meta.py --grpc_address localhost --grpc_port 9001 --model_name my_model --model_version 1
此外,您需要注意客户端代理设置。对于您来说,http_proxy
应该未设置,或者localhost
应该包含在no_proxy
变量中。