Just read the class for the dataloader, need to update the batch sampler as well. e.g
batch_sampler = torch.utils.data.sampler.BatchSampler(sampler, batch_size, False)
dataloders.sampler = sampler
dataloders.batch_sampler = batch_sampler