That’s an interesting use case.
You could probably write a custom sampler deriving from DistributedSampler
and pass the weights
as an extra argument.
Here you would probably have to add the “extra” weigths and this line of code could probably be replaced by this one.
2 Likes