Hi,
the data_source is referring to a Dataset object. This dataset won’t become reinitialised in the sampler. The sampler simply calls the dataset.len() function so that it knows how many indexes it is supposed to produce.



 marchinidavide:

Does the data_source parameter strictly need to be an instance of data.Datset or anything with a __len__ method?


I’m not sure, but I’m guessing that it would work with anything with a __len__. Report back if you find out