You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
tensorboardX only has NumPy and Protobuf listed as dependencies, but if you try to import it, it tries to import PIL and torch as well.
This is a regression from 2.2.
Minimal runnable code to reproduce the behavior
$ python3 -mvenv /tmp/venv
$ /tmp/venv/bin/pip install -U pip
[...]
Successfully installed pip-21.1.3
$ /tmp/venv/bin/pip install tensorboardX==2.3
[...]
Successfully installed numpy-1.19.5 protobuf-3.17.3 six-1.16.0 tensorboardX-2.3
$ /tmp/venv/bin/python -c 'import tensorboardX'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/venv/lib/python3.6/site-packages/tensorboardX/__init__.py", line 5, in <module>
from .torchvis import TorchVis
File "/tmp/venv/lib/python3.6/site-packages/tensorboardX/torchvis.py", line 11, in <module>
from .writer import SummaryWriter
File "/tmp/venv/lib/python3.6/site-packages/tensorboardX/writer.py", line 17, in <module>
from .comet_utils import CometLogger
File "/tmp/venv/lib/python3.6/site-packages/tensorboardX/comet_utils.py", line 4, in <module>
from PIL import Image
ModuleNotFoundError: No module named 'PIL'
(If you install Pillow, the same error happens with import torch in the same module.)
Expected behavior
The import should succeed. All functionality that doesn't depend on Pillow or PyTorch should work.
Screenshots
N/A
Environment
What is the result of pip list|grep -E "torch|proto|tensor"
If the version is too old, please try to update first.
protobuf 3.17.3
tensorboardX 2.3
Python environment
I'm using Python 3.6.9 from the Ubuntu 18.04 repositories.
Additional context
N/A
The text was updated successfully, but these errors were encountered:
This has caused a problem/minor annoyance for my company's project. We are now forced to install pytorch and allocate more ram on our containers despite not needing either for anything else.
Describe the bug
tensorboardX only has NumPy and Protobuf listed as dependencies, but if you try to import it, it tries to import
PIL
andtorch
as well.This is a regression from 2.2.
Minimal runnable code to reproduce the behavior
(If you install Pillow, the same error happens with
import torch
in the same module.)Expected behavior
The import should succeed. All functionality that doesn't depend on Pillow or PyTorch should work.
Screenshots
N/A
Environment
What is the result of
pip list|grep -E "torch|proto|tensor"
If the version is too old, please try to update first.
Python environment
I'm using Python 3.6.9 from the Ubuntu 18.04 repositories.
Additional context
N/A
The text was updated successfully, but these errors were encountered: