-
Notifications
You must be signed in to change notification settings - Fork 443
Incompatibility with tensorflow>=2.13.0
due to flatbuffers
version conflict
#2180
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
Comments
tensorflow2.13.0
due to flatbuffers
version conflicttensorflow==2.13.0
due to flatbuffers
version conflict
Thanks for your reminder. We will take necessary work for future upgrade. |
I am also getting this same conflict: Unfortunately I have to use the 2.13 RC version because tensorflow 2.12.0 has dependence on numpy<1.24 and I have another conflict because of that. |
Similar conflict: |
My temporary solution for this was to fork tf2onnx and create a new branch based on 1.14.0, where I relaxed the requirements. You're welcome to use it in the meanwhile: https://github.com/seidnerj/tensorflow-onnx/tree/r1.14.0b You can add it to a requirements.txt file like so: Ugly, I know, but couldn't continue working without this. |
Is it functional for you? I tried a similar patch, and while it allowed tf2onnx to build and install, the result was non-functional for me. In particular, it seems I'm far from an expert in this software, though, so I didn't try a more elaborate patch. But perhaps there is something different between our setups that explains my experience? (FYI: I'm using flatbuffers 23.5.26 instead, if that makes a difference.) |
For me it worked without a hitch, though I'm doing just the one call to tf2onnx.convert.from_keras method. Worth checking the flatbuffers version, can't tell you much more than that unfortunately. |
No worries, @seidnerj: any information is helpful. I tried flatbuffers 23.5.8 with no success. The error I get on conversion is the same, and looks like this:
The same code/NN convert without issue on python3.10, tf 2.12.0 and tf2onnx 1.14.0. Upon some more digging, I see the release notes for tf 2.13.0 indicate that the behavior of "ConcreteFunction ... as generated through I'd be more than happy to provide a minimal example if that would be helpful, but I also don't want to waste developer time on a spurious or anticipated error. In any case, I will double check my code to make sure I'm not doing anything wrong there. |
It sounds like the developers/maintainers are aware of incompatibilities with TF 2.13.0, and a more substantial patch will be necessary. Thanks in advance for your hard work on this (and past versions of tf2onnx)! Just for completeness, though, here's an example of code that doesn't work for Python3.11/TF 2.13.0/tf2onnx 1.14.0, the latter built using a newer version of flatbuffers (neuron weights don't seem to matter):
However, the same code produces correct output with Python3.10/TF 2.12.0/tf2onnx 1.14.0. Let me know if there's any other way I can help! |
I work around the graph_captures = concrete_func.graph._captures # pylint: disable=protected-access
captured_inputs = [t_name.name for _, t_name in graph_captures.values()] with try:
graph_captures = concrete_func.graph._captures # pylint: disable=protected-access
captured_inputs = [t_name.name for _, t_name in graph_captures.values()]
except AttributeError:
graph_captures = concrete_func.graph.function_captures.by_val_internal
captured_inputs = [t.name for t in graph_captures.values()] This is done by checking relevant tensorflow commits: EDIT 2023/08/07: use try-except to keep compatibility with older Tensorflow. |
Probably tf2onnx tests should be fixed for tensorflow 2.12 first #2154 |
tensorflow==2.13.0
due to flatbuffers
version conflicttensorflow==2.13.0
due to flatbuffers
version conflict
tensorflow==2.13.0
due to flatbuffers
version conflicttensorflow==2.13.0
due to flatbuffers
version conflict
This project is now tested with Tensorflow 1.15 and 2.8~2.13 [1]. Among those versions, Tensorflow 2.9 requires [1] https://github.com/onnx/tensorflow-onnx/blob/main/README.md Line 85 in a0bd3e5
[5] https://pyfound.blogspot.com/2020/11/pip-20-3-new-resolver.html |
Hello @fatcat-z, Bttw, it looks like Have you tried to remove the Thanks a lot for all your hard work! |
Your comment is confusing, when you refer to "Tensorflow 1.15", I assume you are referring to "tensorflow-onnx", correct? If so, I suggest editing your comment so it reflects the accurate package names, tensorflow-onnx/tensorflow, as applicable (and not short it to "tf"). |
Good point. I do mean Tensorflow 1.15, an old version released years ago - edited to avoid confusion. |
tensorflow==2.13.0
due to flatbuffers
version conflicttensorflow>=2.13.0
due to flatbuffers
version conflict
Closes: #2180 Signed-off-by: Chih-Hsuan Yen <[email protected]>
That limitation has been removed since tf2onnx 1.15.0. Please try the latest 1.16.0 version and hopefully it could help you. |
Describe the bug
Hey 👋 I admit this a bit early note, however, I found out
tf2onnx
will not be compatible withtensorflow==2.13
(based on their 1st release candidate) due to dependency conflict.tf2onnx
currently requiresflatbuffers<3.0
, whiletensorflow==2.13
will likely needflatbuffers>=23.1.21
.Edit:
The constraint will become even stricter for
tensorflow=2.14
, which will likely requireflatbuffers>=23.5.26
Urgency
High (Impossible to upgrade
tensorflow
to versions>=2.13.0
System information
To Reproduce
Additional context
https://github.com/tensorflow/tensorflow/releases/tag/v2.13.0-rc0
The text was updated successfully, but these errors were encountered: