Commit e1c0102e authored by Yuxin Wu's avatar Yuxin Wu

fix bug in locallyshuffledata initialization

parent 8403a009
......@@ -332,8 +332,8 @@ class LocallyShuffleData(ProxyDataFlow, RNGDataFlow):
dp = next(self.ds_itr)
for _ in range(self.nr_reuse):
self.q.append(dp)
for _ in range(self.q.maxlen - len(self.q)):
try:
while self.q.maxlen > len(self.q):
add_next()
except StopIteration:
logger.error("LocallyShuffleData: cache_size is larger than the size of ds!")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment