pytorch/docs/source
davidriazati 1d53d07566 Add docs to CI (#24435)
Summary:
Stacked PRs
 * #24445 - [jit] Misc doc updates #2
 * **#24435 - [jit] Add docs to CI**

This integrates the [doctest](http://www.sphinx-doc.org/en/master/usage/extensions/doctest.html) module into `jit.rst` so that we can run our code examples as unit tests. They're added to `test_jit.py` under the `TestDocs` class (which takes about 30s to run). This should help prevent things like #24429 from happening in the future. They can be run manually by doing `cd docs && make doctest`.

* The test setup requires a hack since `doctest` defines everything in the `builtins` module which upsets `inspect`
* There are several places where the code wasn't testable (i.e. it threw an exception on purpose). This may be resolvable, but I'd prefer to leave that for a follow up. For now there are `TODO` comments littered around.
](https://our.intern.facebook.com/intern/diff/16840882/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/24435

Pulled By: driazati

Differential Revision: D16840882

fbshipit-source-id: c4b26e7c374cd224a5a4a2d523163d7b997280ed
2019-08-20 21:40: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 Adjust maintainers list (#23693) 2019-08-01 22:59:02 -07:00
notes Document benchmarking practice for CUDA 2019-08-13 15:07:23 -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 Added torch.autograd.profiler.record_function() as context manager. (#23428) 2019-07-30 11:10:01 -07: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 Add docs to CI (#24435) 2019-08-20 21:40:44 -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 Slightly improve dataloader docs on when auto-batching is disabled (#23671) 2019-08-01 12:10:17 -07:00
distributed.rst Update distributed.rst (#23289) 2019-07-26 16:55:52 -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 Fix builtin function reference (#24056) 2019-08-09 15:58:15 -07:00
jit_builtin_functions.rst Fix builtin function reference (#24056) 2019-08-09 15:58:15 -07:00
jit.rst Add docs to CI (#24435) 2019-08-20 21:40:44 -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 Add document of functions nn.init.ones_/zeros_ (#23145) 2019-07-25 06:09:50 -07:00
nn.rst Added a flatten module (#22245) 2019-07-25 22:48:52 -07:00
onnx.rst Update docs for softmax in onnx supported operators (#24832) 2019-08-19 10:13:41 -07:00
optim.rst Implement AdamW optimizer (#21250) 2019-07-02 09:09:10 -07:00
random.rst Adds torch.random to docs/toc (#23553) 2019-08-07 16:31:32 -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 Clarify that torch.device without an index will always represent the current device (#23468) 2019-07-27 06:49:52 -07:00
tensorboard.rst Update tensorboard.rst (#22026) 2019-08-12 15:02:26 -07:00
tensors.rst Documentation for Tensor.record_stream() (#24078) 2019-08-16 08:07:33 -07:00
torch.rst Add logical_xor operator (#23847) 2019-08-15 08:40:25 -07:00
type_info.rst Allow converting char tensor to numpy; add [fi]info.min (#15046) 2018-12-24 09:11:24 -08:00