When working on #372, I noticed that there is an issue in calling len(sampler). We currently compute len by iterating the sampler and caching the number of batches. However, the number of batches (i.e., len) may change when we shuffle the cuts. I don't think there is a really elegant way to provide len (we can't recompute it at the start of an iteration, because len itself calls iter(sampler)...). Unless anybody has some idea, I'll remove len from samplers.
CC @janvainer @danpovey @csukuangfj