Skip to content

Commit

Permalink
Fix repeated samples after graceful node shutdown
Browse files Browse the repository at this point in the history
Signed-off-by: Mohamed Yousef <myb@imachines.com>
  • Loading branch information
ASDen committed Mar 19, 2022
1 parent 7b5346e commit 81f9a5f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions horovod/torch/elastic/sampler.py
Expand Up @@ -106,6 +106,7 @@ def reset(self):
self.total_size = self.num_samples * self.num_replicas

def __iter__(self):
self.reset()
self.indices = self.remaining_indices[:]

# add extra samples to make it evenly divisible
Expand Down

0 comments on commit 81f9a5f

Please sign in to comment.