fix links to Docs (#744)

* update log

* fix links

* formatting

* fixing docs path

* formatting
This commit is contained in:
Jirka Borovec
2020-01-26 08:38:01 -05:00
committed by William Falcon
parent b35c472bb1
commit cc12ff36a9
9 changed files with 146 additions and 31 deletions
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

+5 -1
View File
@@ -318,7 +318,7 @@ def linkcode_resolve(domain, info):
obj = getattr(obj, part)
fname = inspect.getsourcefile(obj)
# https://github.com/rtfd/readthedocs.org/issues/5735
if any([s in fname for s in ('readthedocs', 'checkouts')]):
if any([s in fname for s in ('readthedocs', 'rtfd', 'checkouts')]):
# /home/docs/checkouts/readthedocs.org/user_builds/pytorch_lightning/checkouts/
# devel/pytorch_lightning/utilities/cls_experiment.py#L26-L176
path_top = os.path.abspath(os.path.join('..', '..', '..'))
@@ -338,6 +338,10 @@ def linkcode_resolve(domain, info):
# import subprocess
# tag = subprocess.Popen(['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE,
# universal_newlines=True).communicate()[0][:-1]
branch = filename.split('/')[0]
# do mapping from latest tags to master
branch = {'latest': 'master', 'stable': 'master'}.get(branch, branch)
filename = '/'.join([branch] + filename.split('/')[1:])
return "https://github.com/%s/%s/blob/%s" \
% (github_user, github_repo, filename)
+5 -5
View File
@@ -1,33 +1,33 @@
GAN
====
===
.. toctree::
:maxdepth: 3
pl_examples.domain_templates.gan
MNIST
====
=====
.. toctree::
:maxdepth: 3
pl_examples.basic_examples.lightning_module_template
Multi-node (ddp) MNIST
====
======================
.. toctree::
:maxdepth: 3
pl_examples.multi_node_examples.multi_node_ddp_demo
Multi-node (ddp2) MNIST
====
=======================
.. toctree::
:maxdepth: 3
pl_examples.multi_node_examples.multi_node_ddp2_demo
Imagenet
====
========
.. toctree::
:maxdepth: 3