data
data copied to clipboard
`DataLoader2.shutdown` should guarantee `finalize_iteration` is called for `ReadingService`
🐛 Describe the bug
Per title: https://github.com/pytorch/data/blob/c42587a828d05f24f6f0586d17d3e9d55e1433ed/torchdata/dataloader2/dataloader2.py#L176-L183
Even though the ReadingService
should guarantee the finalize_iteration
called in finalize
, it's better to guard this behavior in DataLoader2
as well.
Versions
main branch
In addition to it, DLv2 should guarantee that finalize
of ReadingService
is called, even if Exception raised during iterations.