TaranRai:

Do you mean in terms of the time it takes to run the experiment or in terms of accuracy when you mention performance?


I meant the speed, as moving a large dataset around might be quite expensive compared to the actual training.



 TaranRai:

The issue is I am worried if it means loading an entire dataset into a dataloader or dict before the random sampling. Is this something I should be concerned about or does random sampler not even load the entire dataset and then select random samples?


If your Dataset is lazily loading each sample in its __getitem__ the recreating of DataLoaders using different Subsets or samplers should be cheap as only the Dataset.__init__ will be called (which should not load any large amount of data if you are applying lazy loading).