Skip to content

Fix TensorBoard build and runtime compatibility with TensorFlow v2.21.0-rc1#7070

Closed
psamanoelton wants to merge 2 commits intotensorflow:masterfrom
psamanoelton:tb_v2.210-rc1
Closed

Fix TensorBoard build and runtime compatibility with TensorFlow v2.21.0-rc1#7070
psamanoelton wants to merge 2 commits intotensorflow:masterfrom
psamanoelton:tb_v2.210-rc1

Conversation

@psamanoelton
Copy link

@psamanoelton psamanoelton commented Mar 6, 2026

Motivation for features / changes

Update TensorBoard dependency configuration to work with TensorFlow 2.21.0rc1

Technical description of changes

  • Add six>=1.16.0 to runtime requirements (required by TensorFlow).
  • Update development dependencies for S3 tests to modern versions:
    • boto3>=1.28
    • moto[s3]>=4.2
  • Relax grpcio-testing requirement to a modern compatible range.
  • Python>=3.10" in setup.py (TF 2.21 doesnt support 3.9 anymore).

These updates resolve dependency conflicts observed when installing TensorBoard alongside TensorFlow 2.21.0rc1 in a clean Python environment and allow successful build, installation, and execution of TensorBoard.

Screenshots of UI changes (or N/A)

N/A

Detailed steps to verify changes work correctly (as executed by you)

python3.12 -m venv venv
source venv/bin/activate
pip install --upgrade pip

pip install -r tensorboard/pip_package/requirements.txt \
            -r tensorboard/pip_package/requirements_dev.txt

pip install --pre tensorflow==2.21.0rc1

Validation steps

TensorFlow import:

python -c "import tensorflow as tf; print(tf.__version__)"

Build TensorBoard:

bazel build //tensorboard/pip_package:build_pip_package

Run tests:

bazel test //tensorboard/... --test_output=errors

Build and install wheel:

./bazel-bin/tensorboard/pip_package/build_pip_package /tmp/tb_wheel

pip install /tmp/tb_wheel/tensorboard-*.whl

Launch TensorBoard:

tensorboard --logdir /tmp/tb_logs

Alternate designs / implementations considered (or N/A)

N/A

Notes:

Some existing test failures appear unrelated to these dependency updates and were already present prior to this change.

This PR focuses only on resolving dependency conflicts and ensuring that TensorBoard builds and runs correctly with TensorFlow 2.21.

To properly run the tests were required the usage of openjdk-17-jdk

apt-get update
apt-get install -y openjdk-17-jdk
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
export PATH="$JAVA_HOME/bin:$PATH"

java -version
bazel test //tensorboard/... --test_output=errors

@cantonios
Copy link

@arcra can you please take a look? Thanks!

# can get rid of the packaging dependency.
packaging
pillow
# NOTE: this version must be >= the protoc version in our WORKSPACE file.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my previous iteration, I was trying to bring this protoc version from our WORKSPACE file to 6.x, which was the challenging part.

I suppose that mostly matters for the no-TF mode... the "compat" protos that we copy from TF for TB to be used without TF would then likely require a runtime protobuf than what would be used with TF.

Let's see if CI passes as is, and if it does, I suppose it should be ok. Honestly, this whole protobuf version compatibility issue is a bit confusing for me.

@psamanoelton
Copy link
Author

@arcra I realized I used the branch 2.21 as the base for this branch (Trying to run locally the jobs of the CL but faced many issues), can we continue in the following PR?

#7071

Note:
It seems various jobs will not work cause of the drop of python3.9 (as TF 2.21 doesnt supports it anymore).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants