Hello there.
I’m the author of pytorch-resample 8.
It’s difficult for me to answer precisely because I have no experience with distributed training. It seems to me that you want to do sampling on your dataset. The samplers provided in the library I just mentionned take an IterableDataset as input. They also inherit from IterableDatasets, which means that you can use them instead of an existing IterableDataset.
What exactly are you expecting? What do you need the __iter__ method of the sampler to do exactly?