Sometimes, when the autocompletion doesn’t work in my IDE for whatever reason, I use e.g. dir(torch.utils.data.sampler) to get the classes and methods.
Sometimes it doesn’t show all classes, but I have no idea why or how the namespaces are resolved internally.