Docs: build with Sphinx 5 (#70309)

Fixes #60979. Also see #61045 and https://github.com/sphinx-doc/sphinx/issues/9395 for discussion.

I _believe_ the reason that we were previously pinning to Sphinx 3 was because of issues with pytorch_sphinx_theme and Sphinx 4 support, but these seem to have been resolved now. See https://torchgeo.readthedocs.io/ for an example of docs built with pytorch_sphinx_theme and Sphinx 4.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70309
Approved by: https://github.com/albanD
This commit is contained in:
Adam J. Stewart
2022-06-01 22:28:29 +00:00
committed by PyTorch MergeBot
parent 22fd2f2e05
commit d90652db65
4 changed files with 6 additions and 14 deletions

View File

@ -1,6 +1,4 @@
sphinx==3.5.4
Jinja2==3.0.*
docutils==0.16
sphinx==5.0.0
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
sphinxcontrib.katex
matplotlib

View File

@ -72,16 +72,8 @@ Locally disabling gradient computation
See :ref:`locally-disable-grad-doc` for more information on the differences
between no-grad and inference mode as well as other related mechanisms that
may be confused with the two.
.. autosummary::
:toctree: generated
:nosignatures:
no_grad
enable_grad
set_grad_enabled
inference_mode
may be confused with the two. Also see :ref:`torch-rst-local-disable-grad`
for a list of functions that can be used to locally disable gradients.
.. _default-grad-layouts:

View File

@ -363,7 +363,7 @@ if RELEASE:
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.

View File

@ -224,6 +224,8 @@ Parallelism
get_num_interop_threads
set_num_interop_threads
.. _torch-rst-local-disable-grad:
Locally disabling gradient computation
--------------------------------------
The context managers :func:`torch.no_grad`, :func:`torch.enable_grad`, and