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
ImportError is thrown by imagenet_dataset.py due to inability to import PY3 from torch._six.
PY3 is no longer available for import from torch._six as of PR #46579 in Torch.
To Reproduce
This bug was found when trying to import the AMDIM bolts package
Steps to reproduce the behavior:
from pl_bolts.models.self_supervised import AMDIM
This results in the following stack trace and error:
from pl_bolts.datasets import BinaryMNIST
File "C:\Users\Elijah\miniconda3\envs\torch\lib\site-packages\pl_bolts\datasets\__init__.py", line 11, in <module>
from pl_bolts.datasets.imagenet_dataset import extract_archive, parse_devkit_archive, UnlabeledImagenet
File "C:\Users\Elijah\miniconda3\envs\torch\lib\site-packages\pl_bolts\datasets\imagenet_dataset.py", line 12, in <module>
from torch._six import PY3
ImportError: cannot import name 'PY3' from 'torch._six' (C:\Users\Elijah\miniconda3\envs\torch\lib\site-packages\torch\_six.py)
Expected behavior
Successful import
Environment
PyTorch Version 1.8.0
OS: Windows
Installation method: both pip install and conda install were tried
Python version: 3.8
The text was updated successfully, but these errors were encountered:
…579)
* Update imagenet_dataset.py dependencies
- The import PY3 from Torch._six no longer exists as of Torch PR #46579
- Updated to use PY37, which is the current only available import
* Remove torch._six dependency from imagenet_dataset.py
Removed dependency on torch._six for checking if Python 3 is used. This relaxes the condition of Python >=3.7 if dependency is to be kept.
🐛 Bug
ImportError is thrown by imagenet_dataset.py due to inability to import PY3 from torch._six.
PY3 is no longer available for import from torch._six as of PR #46579 in Torch.
To Reproduce
This bug was found when trying to import the AMDIM bolts package
Steps to reproduce the behavior:
from pl_bolts.models.self_supervised import AMDIM
Expected behavior
Successful import
Environment
The text was updated successfully, but these errors were encountered: