Weighted sampler giving error with DataLoader

I’m not sure you can pass a list as the weights.
Could you create a tensor using sampling_weights and try it again?
I’ve created dummy code here.