Hi,
Thanks… I traced the problem to (unordered) dictionary creation and iteration which led to different results every run.  After switching to OrderedDict things work as expected.  I wasn’t aware that there is any randomness involved in standard dictionary (thought the keys are unordered but not in a random sense).
Regarding my second question, I went over the linked code but I still would like to use RandomSampler.  If I understand correctly, it is sufficient to record 2 variable: the RNG state when creating the iterator over DataLoader (since this is when the random permutation is taken) and also how many “next” requests it received so far.  Is it correct that these 2 variable capture the state of the DataLoader ?
Thanks,
-Moshe