Skip to content

Fix onnxfs2_test regression for onnx 1.13 #307

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

Merged
merged 2 commits into from
Jan 11, 2023

Conversation

BowenBao
Copy link
Contributor

@BowenBao BowenBao commented Jan 11, 2023

Root cause is new "Reduce ops" spec promotes axes from attributes to inputs, resulting in onnx test cases having more inputs than expected by these onnx-script tests. This PR updates these onnx-script test functions to match the signature of the updated onnx test cases.

However, since onnx test cases are not versioned, I feel tests like this that seemingly want to represent older opset onnx operator with function should not depend on it.

Fixes #249
Fixes #298

@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Merging #307 (bcd1005) into main (42be235) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #307      +/-   ##
==========================================
- Coverage   72.95%   72.86%   -0.10%     
==========================================
  Files          97       97              
  Lines        9436     9426      -10     
==========================================
- Hits         6884     6868      -16     
- Misses       2552     2558       +6     
Impacted Files Coverage Δ
onnxscript/test/functions/onnxfns2_test.py 97.36% <ø> (-0.31%) ⬇️
onnxscript/test/models/onnxfns2.py 62.71% <100.00%> (-2.92%) ⬇️
onnxscript/type_annotation.py 85.71% <0.00%> (-11.43%) ⬇️
onnxscript/onnx_opset/_impl/opset16.py 71.42% <0.00%> (-9.53%) ⬇️
onnxscript/onnx_opset/_impl/opset13.py 88.07% <0.00%> (-7.34%) ⬇️
onnxscript/onnx_opset/_impl/opset12.py 49.39% <0.00%> (-3.62%) ⬇️
onnxscript/onnx_opset/_impl/opset11.py 55.29% <0.00%> (-3.53%) ⬇️
onnxscript/utils.py 56.25% <0.00%> (-3.13%) ⬇️
onnxscript/autocast.py 96.15% <0.00%> (-1.93%) ⬇️
onnxscript/onnx_opset/_impl/opset1.py 32.30% <0.00%> (-1.54%) ⬇️
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@justinchuby
Copy link
Collaborator

Thanks a lot for fixing the ci! cc @gramalingam for comments around test usage in the PR description

@justinchuby justinchuby merged commit 91701fa into microsoft:main Jan 11, 2023
@gramalingam
Copy link
Collaborator

Thanks, seems worth looking into a bit more. At the least, the definition of the Reduce functions does target opset18 (where the attribute was promoted to input), so onnxfns2.py should be importing opset18 instead of opset15. But I believe it should support the case where the axes is not specified or axes=None.

Adding @liqunfu .

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

Successfully merging this pull request may close these issues.

Field 'type' of 'value_info' is required but missing. Fix tests for onnx 1.13
3 participants