If you use idist.auto_dataloader you do not need to specify distributed sampler if using the default one.
However, dataloader definition should be inside the training function, such that distributed group is initialized and rank, world size are defined.