Some problems with WeightedRandomSampler

Yes, the limitation is explained in this post where you have also posted this question.