tensorflow / tensorflow/tensorboard

protoc compiler is too old for tensorflow 2.12

Open
#6,307 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.2k
Forks
1.7k
Avg merge
4d 22h
Merged PRs (30d)
1

Description

tensorflow 2.12 has upgrade its protoc compiler to 3.21.9 while tensorboard still keeps 3.19.6, this will make profiler data(xplane.xxx.pb) failed to load by tensorboard.
tensorboard proto:
https://github.com/tensorflow/tensorboard/blob/56b38b75dfb993d0da6a241114bb475d072b5ab9/WORKSPACE#L138
tensorflow proto
https://github.com/tensorflow/tensorflow/blob/e8473900214fb5508699ebeafd7ea5f3ef0c2fd1/tensorflow/workspace2.bzl#L463

The error messeage is as follows:

ackages/tensorboard_plugin_profile/protobuf/diagnostics_pb2.py", line 36, in <module>
    _descriptor.FieldDescriptor(
  File "/home/subratag/mc3/envs/23ww14/lib/python3.9/site-packages/google/protobuf/descriptor.py", line 561, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
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). 

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the TensorBoard WORKSPACE line and the TensorFlow workspace2.bzl line linked in the issue, then compare their protoc versions. Reproduce the failure by loading the profiler protobuf generated file shown in the traceback; done means profiler data loads without the outdated-generated-code error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
backend, build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.