pytorch/docs/source
Tongzhou Wang 058beae411 Add IterableDataset (#19228)
Summary:
This is a modified version of https://github.com/pytorch/pytorch/pull/14705 since commit structure for that PR is quite messy.

1. Add `IterableDataset`.
3. So we have 2 data loader mods: `Iterable` and `Map`.

    1. `Iterable` if the `dataset` is an instance of `IterableDataset`
    2. `Map` o.w.

3. Add better support for non-batch loading (i.e., `batch_size=None` and `batch_sampler=None`). This is useful in doing things like bulk loading.
3. Refactor `DataLoaderIter` into two classes, `_SingleProcessDataLoaderIter` and `_MultiProcessingDataLoaderIter`. Rename some methods to be more generic, e.g., `get_batch` -> `get_data`.
4. Add `torch.utils.data.get_worker_info` which returns worker information in a worker proc (e.g., worker id, dataset obj copy, etc.) and can be used in `IterableDataset.__iter__` and `worker_init_fn` to do per-worker configuration.
5. Add `ChainDataset`, which is the analog of `ConcatDataset` for `IterableDataset`.
7. Import torch.utils.data in `torch/__init__.py`
9. data loader examples and documentations
10. Use `get_worker_info` to detect whether we are in a worker process in `default_collate`

Closes https://github.com/pytorch/pytorch/issues/17909, https://github.com/pytorch/pytorch/issues/18096, https://github.com/pytorch/pytorch/issues/19946, and some of https://github.com/pytorch/pytorch/issues/13023
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19228

Reviewed By: bddppq

Differential Revision: D15058152

fbshipit-source-id: 9e081a901a071d7e4502b88054a34b450ab5ddde
2019-06-20 20:12:44 -07:00
..
_static/img tensor_illustration with correct numbers and better fonts for README file (#20751) 2019-05-24 09:18:18 -07:00
_templates Generate sphinx docs with secure content. (#18508) 2019-03-27 11:01:48 -07:00
community fix contribution and governance links (#21243) 2019-05-31 21:02:13 -07:00
notes Add IterableDataset (#19228) 2019-06-20 20:12:44 -07:00
scripts Add CELU activation to pytorch (#8551) 2018-08-01 07:54:44 -07:00
__config__.rst Allow a non-OpenMP based build (#19749) 2019-05-06 19:34:48 -07:00
autograd.rst Update Tensor doc (#14339) 2018-11-28 15:28:17 -08:00
bottleneck.rst [docs] Clarify more CUDA profiling gotchas in bottleneck docs (#6763) 2018-04-19 13:15:27 -04:00
checkpoint.rst Stashing checkpointing RNG states based on devices of arg tensors (#14518) 2018-12-11 09:48:45 -08:00
conf.py fix copyright notice in docs 2019-06-04 14:53:45 -07:00
cpp_extension.rst Inline JIT C++ Extensions (#7059) 2018-04-30 11:48:44 -04:00
cuda_deterministic_backward.rst Amend nondeterminism notes (#12217) 2018-10-16 23:59:26 -07:00
cuda_deterministic.rst Amend nondeterminism notes (#12217) 2018-10-16 23:59:26 -07:00
cuda.rst Add cuda.reset_max_memory_* (#15985) 2019-01-14 07:31:51 -08:00
cudnn_deterministic.rst Amend nondeterminism notes (#12217) 2018-10-16 23:59:26 -07:00
cudnn_persistent_rnn.rst don't copy weight gradients in rnn (#12600) 2018-10-12 13:34:10 -07:00
data.rst Add IterableDataset (#19228) 2019-06-20 20:12:44 -07:00
distributed_deprecated.rst Documentation for c10d: torch.distributed and deprecate the old distributed doc (#11450) 2018-09-11 02:10:28 -07:00
distributed.rst fix typo: pytoch -> pytorch 2019-04-25 06:40:40 -07:00
distributions.rst More doc edits (#19929) 2019-04-30 13:52:07 -07:00
dlpack.rst document torch.utils.dlpack (#9343) 2018-07-11 07:46:09 -07:00
hub.rst better example for local weights (#21685) 2019-06-13 17:56:25 -07:00
index.rst Breaks up NN module in docs so it loads faster. 2019-06-11 09:38:41 -07:00
jit.rst Update Refinement Docs (#20912) 2019-05-24 10:17:55 -07:00
model_zoo.rst add/move a few apis in torch.hub (#18758) 2019-04-10 23:10:39 -07:00
multiprocessing.rst Update multiprocessing note now that shared CUDA tensors are refcounted (#19904) 2019-05-25 17:40:42 -07:00
nn.functional.rst Breaks up NN module in docs so it loads faster. 2019-06-11 09:38:41 -07:00
nn.init.rst Breaks up NN module in docs so it loads faster. 2019-06-11 09:38:41 -07:00
nn.rst Add/edit docs for nn.transformer (#21746) 2019-06-13 12:27:26 -07:00
onnx.rst Support Exports to Multiple ONNX Opset (#19294) 2019-05-10 18:37:12 -07:00
optim.rst Fixes #20124 (#20203) 2019-05-29 14:15:01 -07:00
sparse.rst sparse.mm(), reland #14526 (#14661) 2018-12-03 10:39:27 -08:00
storage.rst Start documenting torch.Tensor (#377) 2016-12-30 01:21:34 -05:00
tensor_attributes.rst Fix the error in the note about torch.device documentation. (#16839) 2019-02-09 20:18:58 -08:00
tensorboard.rst Support 3D mesh/point cloud (#20413) 2019-05-24 14:30:58 -07:00
tensors.rst Add qscheme() method (#20608) 2019-06-14 16:29:29 -07:00
torch.rst Refactor Random Number Generators in ATen (#21555) 2019-06-19 13:54:09 -07:00
type_info.rst Allow converting char tensor to numpy; add [fi]info.min (#15046) 2018-12-24 09:11:24 -08:00