Here is an example using Pytorch 0.4.0
In [1]: import torch
In [2]: import torch.utils.data
In [3]:
In [3]: torch.utils.data.distributed.DistributedSampler()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-89779c61da10> in <module>
----> 1 torch.utils.data.distributed.DistributedSampler()
AttributeError: module 'torch.utils.data' has no attribute 'distributed'
In [4]: torch.utils.data.DataLoader
Out[4]: torch.utils.data.dataloader.DataLoader
I am importing the right modules, I can see the distributed submodule in the documentation, yet I have no idea why I can’t load this module… but able to load others like dataloader. In fact, when I hit Tab for autocomplete, the suggestions show me a bunch of submodules to import except distributed.
Am I missing something here?
Thanks.