You could use a BatchSampler and load the entire batch in your __getitem__ method as described here.
BatchSampler
__getitem__