Closed dpaleka closed 2 years ago
Counterintuitively, calling len() on a ffcv.loader.Loader instance modifies its internal state: https://github.com/libffcv/ffcv/blob/bfd9b3d85e31360fada2ecf63bea5602e4774ba3/ffcv/loader/loader.py#L253-L258
len()
ffcv.loader.Loader
This causes the bug in #140 when paired with OrderOption.QUASI_RANDOM. I suppose the culprit is this line: https://github.com/libffcv/ffcv/blob/bfd9b3d85e31360fada2ecf63bea5602e4774ba3/ffcv/traversal_order/quasi_random.py#L24
OrderOption.QUASI_RANDOM
Thanks @dpaleka It should be an easy fix :)
Thanks for the report, it will be in the next release
Counterintuitively, calling
len()
on affcv.loader.Loader
instance modifies its internal state: https://github.com/libffcv/ffcv/blob/bfd9b3d85e31360fada2ecf63bea5602e4774ba3/ffcv/loader/loader.py#L253-L258This causes the bug in #140 when paired with
OrderOption.QUASI_RANDOM
. I suppose the culprit is this line: https://github.com/libffcv/ffcv/blob/bfd9b3d85e31360fada2ecf63bea5602e4774ba3/ffcv/traversal_order/quasi_random.py#L24