AttributeError: module '' has no attribute 'IterableDataset'

Hi Team,
I’m using fairseq and PyTorch 1.5 version and I’m facing the following issue while running script.

AttributeError: module '' has no attribute 'IterableDataset'

On this Fairseq GitHub issue Fairseq team suggested to raise an question here so doing the same.

Please let me know if I can resolve this issue. Is there anything I’m missing? Any help or suggestion is appreciable.



What does print(torch.__version__) returns just before your try to import fairseq?
You might have an older version of pytorch somewhere on your system.

Hi @albanD
Thank you for your response. I have cross checked the PyTorch version

>>> import torch
>>> print(torch.__version__)

I’m using fairseq-master version with Pytorch 1.5. This same issue is also happening fairseq-0.9 version

I cannot reproduce this issue with PyTorch alone.
Could you run this code and check, if you are also seeing this issue without fairseq?

import torch
d =

Hi @ptrblck Thank you so much for your reply. I can able to run the given piece of code. Even I cannot see this issue without fairseq. I think then this is much more relevant to fairseq then and raising the issue there again.

Your support and time is much appreciated. Thank you again :smile:

1 Like

Could you check, if the installation of fairseq is downgrading PyTorch somehow?