Multiple wokers with customed sampler

Hi, I’m trying to use self-defined sampler with multiple workers with some random mechanism. How does multiple workers share the sampler? I generate a random seed in the sampler’s iter function, but it seems that it’s only called once even with multiple wokers. So my understanding is that the mechanism is they share the sampler and the sampler first generate a index list, and then multiple workers deal with the same random index list in parallel?

The workers are fetching the data according to the index sampled from sampler.

There are no samplers in workers.