pytorch/docs/source
HDCharles ffdc5eebc7 [ao][docs] tests for quantization docs (#79923)
Summary: per https://github.com/pytorch/pytorch/issues/79135 the code
snippets in the docs don't run. This is a recurring problem since
previously there was no unit test to check that these code snippets
actually ran. This PR adds support for such a test, importing the
snippet as a string and evaluating it to make sure that it actually runs
if the code snippet has user defined code, you can pass in dummy
versions using global_inputs. Sometimes the imports of the code snippets
behave oddly but you can pass them in as in test_quantization_doc_custom
where nnq is passed in.

Test Plan: python test/test_quantization.py TestQuantizationDocs
also see https://github.com/pytorch/pytorch/pull/79994 to see what shows up in CI when the docs get broken

Reviewers:

Subscribers:

Tasks:

Tags:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79923
Approved by: https://github.com/z-a-f, https://github.com/vspenubarthi
2022-06-23 20:50:31 +00:00
..
_static
_templates Fix left nav (#78552) 2022-06-01 00:49:53 +00:00
community Adjust wording for consistency (#79758) 2022-06-17 01:39:30 +00:00
elastic
notes [AMP] Use generic autocast in example, specify dtype (#79579) 2022-06-17 21:32:51 +00:00
rpc
scripts [ONNX] Clean up onnx_supported_ops (#79424) 2022-06-23 20:44:51 +00:00
amp.rst
autograd.rst Docs: build with Sphinx 5 (#70309) 2022-06-01 22:28:29 +00:00
backends.rst Revert "[cuDNN V8 API] (reopen) Allow the number of kernels profiled under torch.backends.cudnn.benchmark = True to be limitedCudnnv8 benchmark limit (#77002)" 2022-05-24 21:52:35 +00:00
benchmark_utils.rst
bottleneck.rst
checkpoint.rst
complex_numbers.rst
conf.py Wconstab/reland pysymint (#79795) 2022-06-20 22:55:06 +00:00
config_mod.rst
cpp_extension.rst
cpp_index.rst
cuda.rst Python Jiterator supports multiple outputs (#78139) 2022-05-24 21:52:56 +00:00
cudnn_persistent_rnn.rst
cudnn_rnn_determinism.rst
data.rst [DataLoader] Minor documentation improvement 2022-05-31 15:59:46 +00:00
ddp_comm_hooks.rst Functionality/pickling for commhooks (#79334) 2022-06-16 23:15:34 +00:00
deploy.rst
distributed.algorithms.join.rst
distributed.elastic.rst
distributed.optim.rst
distributed.rst
distributions.rst
dlpack.rst
docutils.conf
fft.rst
fsdp.rst
futures.rst
fx.rst Fix fx decomposition example 2022-06-20 17:26:17 +00:00
hub.rst
index.rst Add docs for Python Registration 2022-06-13 23:21:23 +00:00
jit.rst adding a quick link to nvfuser README.md in jit doc for 1.12 release (#78160) 2022-06-09 17:28:17 +00:00
jit_builtin_functions.rst
jit_language_reference.rst
jit_language_reference_v2.rst
jit_python_reference.rst
jit_unsupported.rst
jit_utils.rst Create __init__.py (#78629) 2022-06-03 18:14:21 +00:00
library.rst Add docs for Python Registration 2022-06-13 23:21:23 +00:00
linalg.rst Add linalg.lu_solve 2022-06-07 22:28:28 +00:00
math-quantizer-equation.png
mobile_optimizer.rst
model_zoo.rst
monitor.rst
multiprocessing.rst
name_inference.rst
named_tensor.rst
nested.rst to_padded_tensor doc v0 (#78657) 2022-06-03 14:27:31 +00:00
nn.functional.rst Add Dropout1d module 2022-06-15 14:39:07 +00:00
nn.init.rst
nn.rst Add Dropout1d module 2022-06-15 14:39:07 +00:00
onnx.rst [ONNX] Fix case in type annotation in docs (#78388) 2022-05-31 19:27:34 +00:00
onnx_supported_aten_ops.rst
optim.rst
package.rst
pipeline.rst
profiler.rst
quantization-accuracy-debugging.rst
quantization-backend-configuration.rst
quantization-support.rst
quantization.rst [ao][docs] tests for quantization docs (#79923) 2022-06-23 20:50:31 +00:00
random.rst
rpc.rst
sparse.rst
special.rst torch.special.airy_ai (#78902) 2022-06-23 19:33:40 +00:00
storage.rst
tensor_attributes.rst
tensor_view.rst
tensorboard.rst
tensors.rst
testing.rst
torch.ao.ns._numeric_suite.rst
torch.ao.ns._numeric_suite_fx.rst
torch.overrides.rst Revert "Revert "Implement sym_sizes to create proper IR for sym ints representing tensor sizes (#76836)"" 2022-05-18 18:40:57 +00:00
torch.rst Autogen Tags enum, and allow specifying tags while defining an op 2022-06-11 00:29:32 +00:00
type_info.rst ENH: Convert finfo.tiny to finfo.smallest_normal (#76292) 2022-05-20 00:59:48 +00:00