@albanD’s idea sounds good.
If your workflow would allow you to change the probability after each epoch finished, you could also directly manipulate the loader.dataset. At the beginning of each epoch, the workers of the DataLoader will be respawned and will thus use the changed dataset.