Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onxxruntime _create_inference_session: ValueError #41

Closed
klaasdewaele opened this issue Sep 25, 2023 · 2 comments
Closed

onxxruntime _create_inference_session: ValueError #41

klaasdewaele opened this issue Sep 25, 2023 · 2 comments

Comments

@klaasdewaele
Copy link

Thanks for creating this software.

After an apparently succesful install, I run into an error with the example code provided in the README file:

  File "/home/adopt_test.py", line 19, in <module>
    predicted_z_scores = z_score_pred.get_z_score(representation)
  File "/home/kdewaele/adopt/lib/python3.9/site-packages/adopt-0.4.2.dev0-py3.9.egg/adopt/inference.py", line 79, in get_z_score
  File "/home/kdewaele/adopt/lib/python3.9/site-packages/adopt-0.4.2.dev0-py3.9.egg/adopt/utils.py", line 94, in get_onnx_model_preds
  File "/home/kdewaele/adopt/lib/python3.9/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 432, in __init__
    raise e
  File "/home/kdewaele/adopt/lib/python3.9/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 419, in __init__
    self._create_inference_session(providers, provider_options, disabled_optimizers)
  File "/home/kdewaele/adopt/lib/python3.9/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'], ...) 

Could this have to do with microsoft/onnxruntime#17631? Is there a workaround for ADOPT?

@klaasdewaele
Copy link
Author

Downgrading to onnxruntime 1.15 resolved the issue.

@cellini-tone
Copy link
Contributor

Thank you @klaasdewaele for the interest and also for posting the solution. Following your comment, we're closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants