That wouldn’t change anything, as the weight is still assigned to the same sample.
Inside the WeightedRandomSampler this line of code 73 will return the samples.
If the order of the weights and samples is shuffled it won’t make a difference, as torch.multinomial will still use the same weight for the corresponding sample.