-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Relax protobuf version requirement for version below 4 #4535
Conversation
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
But I found an interesting thing: ORT's Windows CI build pipelines build ONNX python package from source with protobuf 3.21.8. Then when ORT tries to run its python tests(which depends on protobuf and onnx python packages), then if the protobuf version is 3.18.3, the tests fail. However, if we uninstall protobuf and install onnx again, because onnx says the max supported protobuf version is 3.20.1, then pip will get that version, and it works! |
Thanks for bringing this up. I bumped into similar issue before... I was considering to aggressively bump Protobuf version as 3.20 for building ONNX, but there were some test failures if the built ONNX played with Python Protobuf<=3.19. Therefore, if ONNX decides to bump its Protobuf version for building ONNX as 3.20, probably ONNX needs to upgrade its required Python Protobuf as Thus, I took a step back in next release: I decided to bump Protobuf version as 3.18.3 for building ONNX instead and so ONNX can preserve much broader compatibility for Python Protobuf version: #4544. Still, in the future while ONNX needs higher Protobuf version, this issue will hit us again anyway. We need to keep in mind about the limited compatibility issue for Protobuf>=3.20 or Protobuf>=3.21. |
But they say 3.18.x releases are end of support? Should you use a newer one? |
Good question. Protobuf 3.19.5 or 3.19.6 has another issue about fixed build_type in their build config. So the options we have here are 3.18.3 or 3.20.2+. I slightly prefer 3.18.3, because other ONNX related tools might have Protobuf version requirement and using Protobuf 3.20.2+ for building ONNX might break something, as your example above, if they really need lower Python Protobuf version (<3.20) somehow. In addition, we can add an announcement in next release and say in the following release ONNX will upgrade its Protobuf version to 3.20 for build and the minimum required Python Protobuf version will be 3.20, to let users be aware of it in advance. IIRC, ONNX Runtime is using Protobuf 3.18.3 for build also. @snnn Are you planning to upgrade ORT's Protobuf version to 3.20+ soon? If yes, definitely we should re-evaluate if ONNX should upgrade its Protobuf version to 3.20, to prevent some conflict issue in the near future. |
Forgot to answer your question -- yes Protobuf people said 3.18.x are out of their support window, but 3.18.3 is a quite fresh patch they have released last month. |
yes. For this issue: microsoft/onnxruntime#13335 But the change won't be as trivial as before. It needs some code changes. |
Description
Protobuf now has 3.20.2. Using Protobuf<4 should be better.
Motivation and Context
Fixes #4532.