Skip to content

Commit

Permalink
Upgrade to protobuf 4 (#695)
Browse files Browse the repository at this point in the history
* Update protobuf and protoc version

* Regenerate protobuf code

* Fix broken tests by not comparing string representations of protobufs

* fix test

* temp fix: imageio 2.27 and 2.28 have different behavior

---------

Co-authored-by: Tzu-Wei Huang <huang.dexter@gmail.com>
  • Loading branch information
fg91 and lanpa committed May 14, 2023
1 parent 5f1f074 commit 781a0e2
Show file tree
Hide file tree
Showing 20 changed files with 352 additions and 4,036 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
python-version: 3.9
- name: Run examples
run: |
pip install six tensorboard pytest matplotlib torchvision==0.10.0 protobuf==3.8 moviepy==1.0.3
pip install six tensorboard pytest matplotlib torchvision protobuf==4.22.3 moviepy==1.0.3 imageio==2.27
python examples/demo.py
python examples/demo_graph.py
python examples/demo_embedding.py
Expand Down
2 changes: 1 addition & 1 deletion compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Exit on error
# set -e

DESIRED_PROTO_VERSION="3.8.0"
DESIRED_PROTO_VERSION="22.3"

# call protoc direclty, if version is not the desired one, download the desired vesrion.

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def run(self):
requirements = [
'numpy',
'packaging',
'protobuf>=3.8.0,<4',
'protobuf>=4.22.3,<5',

This comment has been minimized.

Copy link
@LarsDu

LarsDu Jun 6, 2023

Please remove this upper <5 pin on protobuf! it's entirely unnecessary and makes tensorboardx a nightmare to install in large environments with many dependencies.

]


Expand Down
1,162 changes: 51 additions & 1,111 deletions tensorboardX/proto/api_pb2.py

Large diffs are not rendered by default.

381 changes: 30 additions & 351 deletions tensorboardX/proto/attr_value_pb2.py

Large diffs are not rendered by default.

0 comments on commit 781a0e2

Please sign in to comment.