Failed to run
notooth1 opened this issue · comments
notooth1 commented
Can anyone help me fix this error?
$ xmanager launch ./xmanager/examples/cifar10_tensorflow/launcher.py
...
TypeError: Descriptors cannot not 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).
I put protobuf==3.20.* in ./xmanager/requirements.txt, but it did not fix the issue.
Andrew Chen commented
We rebuilt the protos with protoc 3.21
notooth1 commented
How can I fix this error?
Andrew Chen commented
Are you running from HEAD? If you clone the repository and install the package, the protos should be up to date and you don't get the error.
notooth1 commented
This is what I did:
$ pip show protobuf
Name: protobuf
Version: 4.22.0
$ git clone https://github.com/deepmind/xmanager
$ xmanager launch ./xmanager/examples/cifar10_tensorflow/launcher.py
...
TypeError: Descriptors cannot not 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).
Andrew Chen commented
Did you re-install the package? Do pip uninstall xmanager
and pip install ./xmanager
Qingyao Sun commented
Can you push a new release to PyPI? People should avoid installing HEAD since it's generally unstable.
Andrew Chen commented
Newer releases will use features of Python3.10