You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be an issue with Python 3.11 support. For Python 3.11, protobuf 4.25.2 is installed, but the tfma protobuf modules seem to require protobuf 3.19 or earlier. This causes tfma to crash on import (shown below).
Source code / logs
$ python -c "import tensorflow_model_analysis as tfma"
Traceback (most recent call last):
File "<string>", line 1, in<module>
File "/tmp/tmp.PTkD1g2WBK/model-analysis/tensorflow_model_analysis/__init__.py", line 30, in<module>
from tensorflow_model_analysis.sdk import *
File "/tmp/tmp.PTkD1g2WBK/model-analysis/tensorflow_model_analysis/sdk.py", line 60, in<module>
from tensorflow_model_analysis.proto.config_pb2 import AggregationOptions
File "/tmp/tmp.PTkD1g2WBK/model-analysis/tensorflow_model_analysis/proto/config_pb2.py", line 35, in<module>
_descriptor.EnumValueDescriptor(
File "/tmp/tmp.PTkD1g2WBK/model-analysis/.venv/lib/python3.11/site-packages/google/protobuf/descriptor.py", line 789, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
The text was updated successfully, but these errors were encountered:
System information
provided in TensorFlow Model Analysis): No
83cd413a68e8d743aca4b1319304cc525a736e88
(not unique to this commit)Describe the problem
There seems to be an issue with Python 3.11 support. For Python 3.11, protobuf 4.25.2 is installed, but the tfma protobuf modules seem to require protobuf 3.19 or earlier. This causes tfma to crash on import (shown below).
Source code / logs
The text was updated successfully, but these errors were encountered: