pytorch/docs
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
..
caffe2
cpp Package config/template files with torchgen (#78942) 2022-06-07 13:33:55 +00:00
source [ao][docs] tests for quantization docs (#79923) 2022-06-23 20:50:31 +00:00
.gitignore
libtorch.rst
make.bat
Makefile [ONNX] Clean up onnx_supported_ops (#79424) 2022-06-23 20:44:51 +00:00
README.md
requirements.txt Docs: build with Sphinx 5 (#70309) 2022-06-01 22:28:29 +00:00

Please see the Writing documentation section of CONTRIBUTING.md for details on both writing and building the docs.