Skip to content

Commit e87a735

Browse files
mthrokSvetlana Karslioglu
and
Svetlana Karslioglu
authored
Enable intersphinx_mapping to PyTorch and domain libraries (#2038)
This will turn `:py:func:` directives to links to the corresponding API reference. Co-authored-by: Svetlana Karslioglu <svekars@fb.com>
1 parent 339a687 commit e87a735

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,17 @@
6666
# ones.
6767
extensions = [
6868
'sphinxcontrib.katex',
69+
'sphinx.ext.intersphinx',
6970
'sphinx_copybutton',
7071
'sphinx_gallery.gen_gallery',
7172
]
7273

74+
intersphinx_mapping = {
75+
"torch": ("https://pytorch.org/docs/stable/", None),
76+
"torchaudio": ("https://pytorch.org/audio/stable/", None),
77+
"torchtext": ("https://pytorch.org/text/stable/", None),
78+
"torchvision": ("https://pytorch.org/vision/stable/", None),
79+
}
7380

7481
# -- Sphinx-gallery configuration --------------------------------------------
7582

0 commit comments

Comments
 (0)