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

Update InferenceSession call to latest format #7982

Merged
merged 3 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
3 changes: 2 additions & 1 deletion test/test_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ 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())
pmeier marked this conversation as resolved.
Show resolved Hide resolved
# 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
Loading