In newer version of onnxruntime InferenceSession method is not compitable with the package and throws this exception:
File "/usr/local/lib/python3.10/site-packages/nudenet/nudenet.py", line 104, in __init__
self.onnx_session = onnxruntime.InferenceSession(
File "/usr/local/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 432, in __init__
raise e
File "/usr/local/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 419, in __init__
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "/usr/local/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 451, in _create_inference_session
raise ValueError(
ValueError: This ORT build has ['AzureExecutionProvider', 'CPUExecutionProvider'] enabled. Since ORT 1.9, you are required to explicitly set the providers parameter when instantiating InferenceSession. For example, onnxruntime.InferenceSession(..., providers=['AzureExecutionProvider', 'CPUExecutionProvider'], ...)
In newer version of onnxruntime InferenceSession method is not compitable with the package and throws this exception:
We noticed that in
setup.py
"onnxruntime" forces to install latest version.
This causes old versions (2.0.9 in our case) not to work.