Repository navigation
Conversation
Signed-off-by: Parth Vadera <parthvadera@gmail.com>
|
Thanks, the change is correct and Two notes:
|
|
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #22052 +/- ##
=========================================
- Coverage 87% 79% -8%
=========================================
Files 270 267 -3
Lines 24015 23957 -58
=========================================
- Hits 20855 18826 -2029
- Misses 3160 5131 +1971 |
…instance Suggested-by: Deependu Jha <deependujha@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Parth Vadera <parthvadera@gmail.com>
_PrefetchDataFetcherdeque for batch queue in _PrefetchDataFetcher
|
Thanks @deependujha! Updated in 60ff6ed:
Verified locally with targeted tests ( |
What does this PR do?
_PrefetchDataFetcherinsrc/lightning/pytorch/loops/fetchers.pyusesself.batchesas a FIFO queue for prefetched batches on unsized iterables (appending at the tail and popping from the head on each__next__()call).This cleanup switches
self.batchesfrom alist(pop(0)/= []) tocollections.deque(popleft()/clear()) to use the idiomatic FIFO container.Verification
pytest tests/tests_pytorch/loops/test_fetchers.py(98 passed)