in utils.py [0:0]
def cull_blocks(self):
to_delete = set()
# create a list of samples that are older than self.timeout
curr_t = time.time()
for block in self.blocks:
block_t, sha, data, label, yps = self.blocks[block]
if curr_t - block_t > self.timeout:
to_delete.add(block)
# print an informative message
if len(to_delete) > 0:
print("** Clearing out %d blocks from replay buffer**" % len(to_delete))
# clear out the blocks
for block in to_delete:
del self.blocks[block]