pytorch
928754b6 - make more iterator attributes private (#23744)

Commit
6 years ago
make more iterator attributes private (#23744) Summary: 1. Prefixed underscores to any `DataLoaderIter` attribute that is not part of the data loader ctor argument list. 2. Prefixed `DataLoader.dataset_kind` with underscore because it only makes sense with the private enum `_DatasetKind`, and is an implementation detail. 3. Disallow setting `DataLoader.dataset` and `DataLoader.batch_sampler` after initializing a `DataLoader` because they affect other attributes in `__init__`. These changes should not have major BC breaking effect since the big changes are on the iterator class and most users don't even store it. I GitHub searched `pin_memory_thread` and (while I didn't look through all result pages) results I see are forks of pytorch and blog posts on how data loader works. Pull Request resolved: https://github.com/pytorch/pytorch/pull/23744 Differential Revision: D16732507 Pulled By: ezyang fbshipit-source-id: 9f04d000b4200b8047f31eaa3473780b66cebd26
Author
Parents
Loading