Update notebooks submodule and add tutorial view to docs (#9420)

Co-authored-by: Ethan Harris <ethanwharris@gmail.com>
This commit is contained in:
Jirka Borovec 2021-09-16 16:14:37 +02:00 committed by GitHub
parent d2ca81b900
commit 982a9560a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 14 deletions

2
.gitignore vendored
View File

@ -16,6 +16,8 @@ docs/source/*.md
docs/source/generated docs/source/generated
docs/source/*/generated docs/source/*/generated
docs/source/notebooks docs/source/notebooks
docs/source/_static/images/course_UvA-DL
docs/source/_static/images/lightning_examples
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files
__pycache__/ __pycache__/

@ -1 +1 @@
Subproject commit 4fe3370eac9c448eceb36b835ff49ca30de7d404 Subproject commit a2fb6468112b7e1dad501c3b6a17533a4adfeabc

View File

@ -23,7 +23,6 @@ import pt_lightning_sphinx_theme
PATH_HERE = os.path.abspath(os.path.dirname(__file__)) PATH_HERE = os.path.abspath(os.path.dirname(__file__))
PATH_ROOT = os.path.join(PATH_HERE, "..", "..") PATH_ROOT = os.path.join(PATH_HERE, "..", "..")
PATH_RAW_NB = os.path.join(PATH_ROOT, "_notebooks") PATH_RAW_NB = os.path.join(PATH_ROOT, "_notebooks")
PATH_IPYNB = os.path.join(PATH_HERE, "notebooks")
sys.path.insert(0, os.path.abspath(PATH_ROOT)) sys.path.insert(0, os.path.abspath(PATH_ROOT))
sys.path.append(os.path.join(PATH_RAW_NB, ".actions")) sys.path.append(os.path.join(PATH_RAW_NB, ".actions"))
@ -43,7 +42,7 @@ spec.loader.exec_module(about)
# -- Project documents ------------------------------------------------------- # -- Project documents -------------------------------------------------------
HelperCLI.copy_notebooks(PATH_RAW_NB, PATH_IPYNB) HelperCLI.copy_notebooks(PATH_RAW_NB, PATH_HERE, "notebooks")
def _transform_changelog(path_in: str, path_out: str) -> None: def _transform_changelog(path_in: str, path_out: str) -> None:
@ -110,6 +109,11 @@ extensions = [
"pt_lightning_sphinx_theme.extensions.lightning_tutorials", "pt_lightning_sphinx_theme.extensions.lightning_tutorials",
] ]
# Suppress warnings about duplicate labels (needed for PL tutorials)
suppress_warnings = [
"autosectionlabel.*",
]
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"] templates_path = ["_templates"]
@ -145,7 +149,6 @@ language = None
# This pattern also affects html_static_path and html_extra_path. # This pattern also affects html_static_path and html_extra_path.
exclude_patterns = [ exclude_patterns = [
f"{FOLDER_GENERATED}/PULL_REQUEST_TEMPLATE.md", f"{FOLDER_GENERATED}/PULL_REQUEST_TEMPLATE.md",
"notebooks/course_UvA-DL/*",
"notebooks/sample-template*", "notebooks/sample-template*",
] ]

View File

@ -3,10 +3,16 @@
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
PyTorch Lightning Documentation PyTorch Lightning
=============================== =================
.. tutoriallist::
.. raw:: html
<div style="display:none">
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
:name: start :name: start
@ -85,19 +91,13 @@ PyTorch Lightning Documentation
:maxdepth: 1 :maxdepth: 1
:name: Tutorials :name: Tutorials
:caption: Tutorials :caption: Tutorials
:glob:
starter/introduction_guide starter/introduction_guide
PyTorch Lightning 101 class <https://www.youtube.com/playlist?list=PLaMu-SDt_RB5NUm67hU2pdE75j6KaIOv2> PyTorch Lightning 101 class <https://www.youtube.com/playlist?list=PLaMu-SDt_RB5NUm67hU2pdE75j6KaIOv2>
From PyTorch to PyTorch Lightning [Blog] <https://towardsdatascience.com/from-pytorch-to-pytorch-lightning-a-gentle-introduction-b371b7caaf09> From PyTorch to PyTorch Lightning [Blog] <https://towardsdatascience.com/from-pytorch-to-pytorch-lightning-a-gentle-introduction-b371b7caaf09>
From PyTorch to PyTorch Lightning [Video] <https://www.youtube.com/watch?v=QHww1JH7IDU> From PyTorch to PyTorch Lightning [Video] <https://www.youtube.com/watch?v=QHww1JH7IDU>
notebooks/lightning_examples/mnist-hello-world.ipynb notebooks/**/*
notebooks/lightning_examples/datamodules.ipynb
notebooks/lightning_examples/cifar10-baseline.ipynb
notebooks/lightning_examples/basic-gan.ipynb
notebooks/lightning_examples/mnist-tpu-training.ipynb
notebooks/lightning_examples/text-transformers.ipynb
notebooks/lightning_examples/reinforce-learning-DQN.ipynb
notebooks/lightning_examples/augmentation_kornia.ipynb
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
@ -147,6 +147,10 @@ PyTorch Lightning Documentation
governance governance
generated/CHANGELOG.md generated/CHANGELOG.md
.. raw:: html
</div>
Indices and tables Indices and tables
------------------ ------------------