我正在尝试从azure注册表加载onnx模型,但它无法找到该模式。我所犯的错误如下-
错误
"/opt/miniconda/envs/amlenv/lib/python3.7/site-packages/azureml_inference_server_http/server/aml_blueprint.py",2021-12-01 11:06:44,182
root \ File 遇到异常跟踪(最近一次调用): main.init()文件行201,在寄存器main.init()文件main.init行11,在init会话=onnxruntime.InferenceSession(模型)文件"/opt/miniconda/envs/amlenv/lib/python3.7/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py",行206中,在init self._create_inference_session(providers,provider_options) File "/opt/miniconda/envs/amlenv/lib/python3.7/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py",line 226中,在_create_inference_session sess = C.InferenceSession(session_options,self._model_path,onnxruntime.capi.onnxruntime_pybind11_state.NoSuchFile: ONNXRuntimeError :3: NO_SUCHFILE :从mnist.onnx加载模型失败: Load model mnist.onnx失败。文件不存在
我的INIT函数在score.py中如下所示
def init():
global session
model = "mnist.onnx"
session = onnxruntime.InferenceSession(model)注册表中的模型如下所示

发布于 2021-12-01 12:35:02
我找到了解决方案,路径如下- "/var/azureml-app/azureml-models/mnist/1/mnist.onnx“
https://stackoverflow.com/questions/70183452
复制相似问题