Results 7 comments of Scott Schneider

pybind11 exposes a [`py::tuple`](https://pybind11.readthedocs.io/en/stable/reference.html#_CPPv45tuple) type on the C++ side, so this should probably be trivial for us to support in the same way we do for lists. I'll investigate.

Thanks for the work, @daviswer! Some first-level comments: 1. Let's create some unit tests based on the example demo. I think it makes sense for them to live in `test/stateful_dataloader`....

@yoyolicoris, @christhetree, thanks for taking the time to reply. I understand that removing C++ implementations may be a performance regression for those components. I would like to further explain the...

@pytorchmergebot rebase

According to https://github.com/python-pillow/Pillow/pull/9063#issuecomment-3121046271, the fix should be merged into the 12.0.0 Pillow release on October 15. We should check after then.

@nehdiii, I think this is really two issues: 1. `torch.utils.data.DataLoader` depends on multiprocessing for parallelism, and it must be able to pickle all `Dataset` objects to send to parallel workers....