Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
# need to install torchvision dependencies due to transitive imports
pip install --user --progress-bar off --editable .
pip install --user onnx
pip install --user -i https://test.pypi.org/simple/ ort-nightly==1.5.2.dev202012031
pip install --user onnxruntime
python test/test_onnx.py

binary_linux_wheel:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
# need to install torchvision dependencies due to transitive imports
pip install --user --progress-bar off --editable .
pip install --user onnx
pip install --user -i https://test.pypi.org/simple/ ort-nightly==1.5.2.dev202012031
pip install --user onnxruntime
python test/test_onnx.py

binary_linux_wheel:
Expand Down
6 changes: 5 additions & 1 deletion test/test_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ def run_model(self, model, inputs_list, tolerate_small_mismatch=False, do_consta
model.eval()

onnx_io = io.BytesIO()
if isinstance(inputs_list[0][-1], dict):
torch_onnx_input = inputs_list[0] + ({},)
else:
torch_onnx_input = inputs_list[0]
# export to onnx with the first input
torch.onnx.export(model, inputs_list[0], onnx_io,
torch.onnx.export(model, torch_onnx_input, onnx_io,
do_constant_folding=do_constant_folding, opset_version=_onnx_opset_version,
dynamic_axes=dynamic_axes, input_names=input_names, output_names=output_names)
# validate the exported model with onnx runtime
Expand Down