Skip to content

Commit 35677ec

Browse files
Thiago Crepaldipmeier
Thiago Crepaldi
andauthored
Update InferenceSession call to latest format (pytorch#7982)
Co-authored-by: Philip Meier <github.pmeier@posteo.de>
1 parent cb512ea commit 35677ec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
conda activate ci
125125
126126
echo '::group::Install ONNX'
127-
pip install --progress-bar=off onnx onnxruntime!=1.16.0
127+
pip install --progress-bar=off onnx onnxruntime
128128
echo '::endgroup::'
129129
130130
echo '::group::Install testing utilities'

test/test_onnx.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def to_numpy(tensor):
7979
inputs = list(map(to_numpy, inputs))
8080
outputs = list(map(to_numpy, outputs))
8181

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

0 commit comments

Comments
 (0)