Skip to content

Commit

Permalink
Update InferenceSession call to latest format (#7982)
Browse files Browse the repository at this point in the history
Co-authored-by: Philip Meier <github.pmeier@posteo.de>
  • Loading branch information
Thiago Crepaldi and pmeier authored Sep 22, 2023
1 parent cb512ea commit 35677ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
conda activate ci
echo '::group::Install ONNX'
pip install --progress-bar=off onnx onnxruntime!=1.16.0
pip install --progress-bar=off onnx onnxruntime
echo '::endgroup::'
echo '::group::Install testing utilities'
Expand Down
2 changes: 1 addition & 1 deletion test/test_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def to_numpy(tensor):
inputs = list(map(to_numpy, inputs))
outputs = list(map(to_numpy, outputs))

ort_session = onnxruntime.InferenceSession(onnx_io.getvalue())
ort_session = onnxruntime.InferenceSession(onnx_io.getvalue(), providers=onnxruntime.get_available_providers())
# compute onnxruntime output prediction
ort_inputs = {ort_session.get_inputs()[i].name: inpt for i, inpt in enumerate(inputs)}
ort_outs = ort_session.run(None, ort_inputs)
Expand Down

0 comments on commit 35677ec

Please sign in to comment.