THOR-Net icon indicating copy to clipboard operation
THOR-Net copied to clipboard

ImportError: cannot import name 'StreamWrapper' from 'torch.utils.data.datapipes.utils.common'

Open SUOXIAOXI opened this issue 2 years ago • 2 comments

Hello, Thank you for your nice works! I have problems when trying to run the code: my environment: torch==1.10.1 ; torchvision==0.11.2 ; torchtext==0.11.1 ; torchdata==0.3.0a0; Where is my mistake?

SUOXIAOXI avatar May 05 '23 11:05 SUOXIAOXI

Hi,

I guess this is solvable by installing a newer version of TorchData like 0.4, however, you don't really need TorchData because we use it for creating an iterable dataset from tar files for the H2O dataset using an internal library.

I suggest installing a newer version of TorchData or removing it from the installation process and also removing all mentions of datapipes imports from the code. I guess also installing a newer PyTorch version >=1.12 could be useful. I hope this helps.

Kind regards, Ahmed

ATAboukhadra avatar May 05 '23 13:05 ATAboukhadra

Thank you for your replying! I installed torch ==1.12.1 and solved the problem.

SUOXIAOXI avatar May 06 '23 01:05 SUOXIAOXI