google-deepmind / xmanager

A platform for managing machine learning experiments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to run

notooth1 opened this issue · comments

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.

We rebuilt the protos with protoc 3.21

7deb13a

How can I fix this error?

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.

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).

Did you re-install the package? Do pip uninstall xmanager and pip install ./xmanager

Can you push a new release to PyPI? People should avoid installing HEAD since it's generally unstable.

Newer releases will use features of Python3.10