pass the provided sampler as argument of sampler= to dataloader __init__ method.
See docs at
https://pytorch.org/docs/stable/data.html#torch.utils.data.DataLoader 8
Sampler docs:
https://pytorch.org/docs/stable/data.html#torch.utils.data.Sampler 6
The sampler solution shall be more efficient than using scikit library.

Another simple solution
If you want to get a shuffled Dataset, you can use Subset instead of using scikit.
ShuffledDataset = torch.utils.data.Subset(YourDataset, torch.randperm(len(YourDataset)))