Is your feature request related to a problem? Please describe.
Currently ShardDataset, implements __iter__() to build batch. Inside the iter, the order of data is determined by self.epoch. Unfortunately, the self.epoch is incremented only for the child process and not for the parent process as a result, each epoch thus results in same shuffling order.
Describe the solution you'd like
Having access to the trainer to retrieve epoch number or set up communication across child processes under the __iter__().
Is your feature request related to a problem? Please describe. Currently
ShardDataset
, implements__iter__()
to build batch. Inside theiter
, the order of data is determined byself.epoch
. Unfortunately, theself.epoch
is incremented only for the child process and not for the parent process as a result, each epoch thus results in same shuffling order.Describe the solution you'd like Having access to the
trainer
to retrieve epoch number or set up communication across child processes under the__iter__()
.