From 6950874ae001083ea6f572df347de1563a1c2720 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Mon, 12 Oct 2020 11:13:26 -0400 Subject: [PATCH] docs (#4093) * enabled manual returns * style * docs --- docs/source/index.rst | 11 +++-------- docs/source/new-project.rst | 4 ++++ docs/source/performance.rst | 9 ++++++--- docs/source/style_guide.rst | 6 +++++- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index e1b77d7c78..9f74884d4d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -21,8 +21,10 @@ PyTorch Lightning Documentation :name: guides :caption: Best practices - performance style_guide + performance + Lightning project template + .. toctree:: :maxdepth: 2 @@ -75,13 +77,6 @@ PyTorch Lightning Documentation SimCLR VAE -.. toctree:: - :maxdepth: 1 - :name: project structure - :caption: Recommended Lightning Project Layout - - Lightning project seed - .. toctree:: :maxdepth: 1 :name: Common Use Cases diff --git a/docs/source/new-project.rst b/docs/source/new-project.rst index 1b667d9dc9..544d7a5c29 100644 --- a/docs/source/new-project.rst +++ b/docs/source/new-project.rst @@ -119,6 +119,10 @@ Step 1: Define LightningModule optimizer = torch.optim.Adam(self.parameters(), lr=1e-3) return optimizer +.. figure:: https://pl-bolts-doc-images.s3.us-east-2.amazonaws.com/pl_docs/model_system.png + :width: 800 + + A :class:`~pytorch_lightning.core.LightningModule` defines a *system* such as: - `Autoencoder `_ diff --git a/docs/source/performance.rst b/docs/source/performance.rst index 2edcfea80f..7ee9fe78e6 100644 --- a/docs/source/performance.rst +++ b/docs/source/performance.rst @@ -1,8 +1,11 @@ .. _performance: -Fast Performance -================ -Here are some best practices to increase your performance. +Fast performance tips +===================== +Lightning builds in all the micro-optimizations we can find to increase your performance. +But we can only automate so much. + +Here are some additional things you can do to increase your performance. ---------- diff --git a/docs/source/style_guide.rst b/docs/source/style_guide.rst index b05f1fd16d..287b1ad05f 100644 --- a/docs/source/style_guide.rst +++ b/docs/source/style_guide.rst @@ -1,5 +1,5 @@ ########### -Style Guide +Style guide ########### A main goal of Lightning is to improve readability and reproducibility. Imagine looking into any GitHub repo, finding a lightning module and knowing exactly where to look to find the things you care about. @@ -15,6 +15,10 @@ These are best practices about structuring your LightningModule Systems vs models ================= + +.. figure:: https://pl-bolts-doc-images.s3.us-east-2.amazonaws.com/pl_docs/model_system.png + :width: 800 + The main principle behind a LightningModule is that a full system should be self-contained. In Lightning we differentiate between a system and a model.