Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loosening protobuf version limit breaking downstream packages #716

Closed
psfoley opened this issue Aug 1, 2023 · 7 comments · Fixed by #717
Closed

Loosening protobuf version limit breaking downstream packages #716

psfoley opened this issue Aug 1, 2023 · 7 comments · Fixed by #717

Comments

@psfoley
Copy link

psfoley commented Aug 1, 2023

Describe the bug
The recent removal of the protobuf version version limit (#712) has breaking implications for downstream packages dependent on tensorboardX and protobuf<3.20.

Minimal runnable code to reproduce the behavior

$ pip install tensorboardX==2.6.2
$ pip install protobuf<3.20

$ python
>>>  import tensorboardX
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/lab_phe3223/anaconda3/envs/tensorboard/lib/python3.8/site-packages/tensorboardX/__init__.py", line 5, in <module>
    from .torchvis import TorchVis
  File "/home/lab_phe3223/anaconda3/envs/tensorboard/lib/python3.8/site-packages/tensorboardX/torchvis.py", line 10, in <module>
    from .writer import SummaryWriter
  File "/home/lab_phe3223/anaconda3/envs/tensorboard/lib/python3.8/site-packages/tensorboardX/writer.py", line 16, in <module>
    from .comet_utils import CometLogger
  File "/home/lab_phe3223/anaconda3/envs/tensorboard/lib/python3.8/site-packages/tensorboardX/comet_utils.py", line 7, in <module>
    from .summary import _clean_tag
  File "/home/lab_phe3223/anaconda3/envs/tensorboard/lib/python3.8/site-packages/tensorboardX/summary.py", line 12, in <module>
    from .proto.summary_pb2 import Summary
  File "/home/lab_phe3223/anaconda3/envs/tensorboard/lib/python3.8/site-packages/tensorboardX/proto/summary_pb2.py", line 5, in <module>
    from google.protobuf.internal import builder as _builder
ImportError: cannot import name 'builder' from 'google.protobuf.internal' (/home/lab_phe3223/anaconda3/envs/tensorboard/lib/python3.8/site-packages/google/protobuf/internal/__init__.py) 
...
@ryadom
Copy link

ryadom commented Aug 16, 2023

It broke our build too.
Pinning tensorboardX==2.5.1
solves this issue for
protobuf>=3.8.0,<=3.20.1

@lanpa
Copy link
Owner

lanpa commented Aug 20, 2023

Hi @psfoley, does v2.6.2.2 work for you?

@psfoley
Copy link
Author

psfoley commented Aug 21, 2023

Thanks @lanpa for working to address this! Manually installing v2.6.2.2 does fix the problem, but for prior releases of our package we had only required tensorboardX, so v2.6.2.1 is still getting installed because doesn't have the protobuf>3.20 limit. Is there any chance it would be possible to revoke the 2.6.2.1 and 2.6.2 releases from PyPi?

@lanpa
Copy link
Owner

lanpa commented Aug 22, 2023

Hi @psfoley, I have yanked v2.6.2.1. Now pip install tensorboardX should install v2.6.2.2 by default. Would you help me verify?

@psfoley
Copy link
Author

psfoley commented Aug 22, 2023

Thanks @lanpa. We have protobuf 3.19 as a requirement in our framework, so now v2.6.2 is installed instead of v2.6.2.1 (because 2.6.2 is where the protobuf requirement was loosened). If v2.6.2 is yanked as well, everything should work again. Really appreciate all your help with this!

@lanpa
Copy link
Owner

lanpa commented Aug 23, 2023

I have just yanked v2.6.2! Sorry for the inconvenience. Please try again.

@psfoley
Copy link
Author

psfoley commented Aug 23, 2023

That fixed it! Thanks so much @lanpa!

@psfoley psfoley closed this as completed Aug 23, 2023
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 a pull request may close this issue.

3 participants