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

Fixes for onnx==1.11.0 #824

Merged
merged 16 commits into from
Feb 18, 2022
Merged

Fixes for onnx==1.11.0 #824

merged 16 commits into from
Feb 18, 2022

Conversation

xadupre
Copy link
Collaborator

@xadupre xadupre commented Feb 9, 2022

  • remove many lines of codes introduced in the early stages of the development and not needed anymore
  • introduce TARGET_OPSET_ML for testing purpose
  • use TARGET_OPSET to enable, disable unittest instead of onnx.version

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
@xadupre xadupre added the CI label Feb 9, 2022
Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
@BowenBao
Copy link
Collaborator

BowenBao commented Feb 9, 2022

Thanks @xadupre for doing this check, I can follow up on this if you want.
The CI for onnx 1.11-rc seems to need installing wget beforehand.

@BowenBao BowenBao mentioned this pull request Feb 9, 2022
@xadupre
Copy link
Collaborator Author

xadupre commented Feb 9, 2022

Thanks @xadupre for doing this check, I can follow up on this if you want. The CI for onnx 1.11-rc seems to need installing wget beforehand.

It seems so. That's a surprising dependency.

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
@xadupre xadupre changed the title Check onnx==1.11.0 Fixes for onnx==1.11.0 Feb 17, 2022
Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
Copy link
Collaborator

@BowenBao BowenBao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates. Looks good. Left a few questions checking if my understanding is correct.

@@ -25,8 +23,7 @@

class TestOnnxOperatorsCascade(unittest.TestCase):

@unittest.skipIf(StrictVersion(onnx.__version__) < StrictVersion("1.4.0"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does onnx "1.4.0" matches target opset "9"?

From

def max_onnxruntime_opset():
it looks like opset 12? Let me know what I'm missing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update: after looking at more changes, it seems the new opset version should be more accurate. Feel free to resolve if that's the case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -21,8 +19,7 @@ class TestAlgebraComplex(unittest.TestCase):

@unittest.skipIf(Complex64TensorType is None,
reason="not available")
@unittest.skipIf(StrictVersion(onnx.__version__) < StrictVersion('1.8.0'),
reason="not implemented")
@unittest.skipIf(TARGET_OPSET < 13, reason="not implemented")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to above should it be <14

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -18,8 +16,7 @@

class TestAlgebraConverters(unittest.TestCase):

@unittest.skipIf(StrictVersion(onnx.__version__) < StrictVersion("1.4.0"),
reason="not available")
@unittest.skipIf(TARGET_OPSET < 10, reason="not available")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@@ -72,21 +61,13 @@ def test_ada_boost_classifier_samme_r_decision_function(self):
)
self.assertIsNotNone(model_onnx)
dump_data_and_model(
X_test,
X_test[:5],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you briefly explain this update?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to remove it. I did it after adding verbose=True to understand the failure.

from onnxruntime import InferenceSession
from test_utils import dump_data_and_model, TARGET_OPSET


ort_version = '.'.join(ort_version.split('.')[:2])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this appears multiple time, maybe put into test_utils?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then the code can work with onnxruntime-training as well.

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
@xadupre xadupre merged commit c0a0eb8 into onnx:master Feb 18, 2022
@xadupre xadupre deleted the onnx111 branch February 24, 2022 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants