Skip to content

Commit e760f22

Browse files
docs: Make documentation building fail on warning (#348)
* Make building the docs fail in case of warning * Fix lightning broken links in the doc --------- Co-authored-by: Valérian Rey <valerian.rey@gmail.com>
1 parent 4fd394d commit e760f22

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# You can set these variables from the command line, and also
55
# from the environment for the first two.
6-
SPHINXOPTS ?=
6+
SPHINXOPTS ?= -W --keep-going -n
77
SPHINXBUILD ?= sphinx-build
88
SOURCEDIR = source
99
BUILDDIR = build

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
intersphinx_mapping = {
5454
"python": ("https://docs.python.org/3", None),
5555
"torch": ("https://pytorch.org/docs/stable/", None),
56+
"lightning": ("https://lightning.ai/docs/pytorch/stable/", None),
5657
}
5758

5859
html_favicon = "icons/favicon.ico"

docs/source/examples/lightning_integration.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
PyTorch Lightning Integration
22
=============================
33

4-
To use Jacobian descent with TorchJD in a :class:`~lightning.LightningModule`, you need to turn off
5-
automatic optimization by setting ``automatic_optimization`` to ``False`` and to customize the
6-
``training_step`` method to make it call the appropriate TorchJD method (:doc:`backward
7-
<../docs/autojac/backward>` or :doc:`mtl_backward <../docs/autojac/mtl_backward>`).
4+
To use Jacobian descent with TorchJD in a :class:`~lightning.pytorch.core.LightningModule`, you need
5+
to turn off automatic optimization by setting ``automatic_optimization`` to ``False`` and to
6+
customize the ``training_step`` method to make it call the appropriate TorchJD method
7+
(:doc:`backward <../docs/autojac/backward>` or :doc:`mtl_backward <../docs/autojac/mtl_backward>`).
88

99
The following code example demonstrates a basic multi-task learning setup using a
10-
:class:`~lightning.LightningModule` that will call :doc:`mtl_backward
10+
:class:`~lightning.pytorch.core.LightningModule` that will call :doc:`mtl_backward
1111
<../docs/autojac/mtl_backward>` at each training iteration.
1212

1313
.. code-block:: python

0 commit comments

Comments
 (0)