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

Pin onnx version #3003

Closed
wants to merge 5 commits into from
Closed

Pin onnx version #3003

wants to merge 5 commits into from

Conversation

snnn
Copy link
Member

@snnn snnn commented Feb 11, 2020

Description:

Pin onnx version so that onnxruntime won't accidentally get broken because of a new ONNX release

Motivation and Context

  • Why is this change required? What problem does it solve?

ONNX defines some python interface(base classes)
We implemented these inferface.
However, nobody guarantee the inferface won't have backward incompatible changes in ONNX.

  • If it fixes an open issue, please link to the issue here.

@snnn snnn requested a review from a team as a code owner February 11, 2020 02:27
setup.py Outdated
@@ -223,7 +223,7 @@ def run(self):
},
py_modules=python_modules_list,
install_requires=[
'onnx>=1.2.3',
'onnx>=1.6.0,<1.7.0',
'numpy>=1.18.0'
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Does onnx guarantee backward compatibility for versions between 1.6.0 and 1.7.0?
  2. Should we pin numpy as well?

Copy link
Member

Choose a reason for hiding this comment

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

  1. Does onnx guarantee backward compatibility for versions between 1.6.0 and 1.7.0?
  2. Should we pin numpy as well?

btw, why are we requiring numpy 1.18.0 ? it was only released on Dec 22, 2019.
I don't think many users would like requiring such new software. and we don't even use numpy 1.18 specific api's in ORT.

Copy link
Member Author

Choose a reason for hiding this comment

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

Because ort is built with that version, and numpy equal or older than 1.16 has security issues. We can change it to 1.17 but it doesn't make too much difference

Copy link
Member

Choose a reason for hiding this comment

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

Because ort is built with that version, and numpy equal or older than 1.16 has security issues. We can change it to 1.17 but it doesn't make too much difference

yes, older than 1.16, that means the user could use 1.16, 1.17 or 1.18
ideally we should be using the lowest version possible to maximize numpy compatibility.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's fine. Numpy is always backward compatible (as long as the major version didn't change), so it won't cause any compatibility issue to the end users. They just get the lastest version and use it.

Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine. Numpy is always backward compatible (as long as the major version didn't change), so it won't cause any compatibility issue to the end users. They just get the lastest version and use it.

users do not like (and may not be able) to change stable production environments. software version updates can have other unintended downstream impacts.
numpy doesn't actually guarantee backwards compatibility for minor version updates. (it doesn't follow semver)
1.18 does have various api changes/deprecations. so i don't think it's safe to assume that users have zero impact for updates.

it's highly unusual to require users to update a dependency to the latest version that was only released a little over a month ago.
i suspect we will get complaints if we do this. if numpy 1.16 is secure and supported, we shouldn't move to 1.18 without good reason. especially as we are not using any specific features in 1.18

Copy link
Member Author

Choose a reason for hiding this comment

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

The security team says: "An issue was discovered in NumPy 1.16.0 and earlier." So 1.16 isn't an option.

Copy link
Member

Choose a reason for hiding this comment

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

The security team says: "An issue was discovered in NumPy 1.16.0 and earlier." So 1.16 isn't an option.

do you know which security issue it is? i.e. which 1.16.x works? I assume they would have backported security fixes to 1.16.x release?
note that 1.16.6 was released Dec 29, 2019 and is the most current 1.16.x release.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Talked offline. We definitely can try it, but I suggest spliting the change into a different PR, because it requires to change a lot of files.

setup.py Outdated Show resolved Hide resolved
@pranavsharma
Copy link
Contributor

@jywu-msft what was the final decision around this? would be good to include it in 1.2 release.

@jywu-msft
Copy link
Member

@jywu-msft what was the final decision around this? would be good to include it in 1.2 release.

The conclusion was to use the lowest numpy version possible, no?
1.16.1

@snnn
Copy link
Member Author

snnn commented May 4, 2020

Close it to avoid doing unnecessary changes at the end of code freeze.

@snnn snnn closed this May 4, 2020
@snnn snnn deleted the snnn/pin_onnx branch August 12, 2020 22:28
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.

4 participants