Hi everyone 
Quick question about the torch.utils.data.Sampler class and the DataLoader.
What is the behaviour of
self.data_source = data_source in the definition of all Samplers?
I have my custom data.Dataset class that needs a very expensive initialisation: does calling
self.data_source = data_source in the __init__ of the sampler init a copy of the dataset?
My custom data.Dataset also has a variable self.dataset_index (instance of pandas.DataFrame) that is pretty much all I would need in to access from the sampler. Does the data_source parameter strictly need to be an instance of data.Datset or anything with a __len__ method?
As always thanks in advance!