From 5e7ae348b4afcda16b4a043bcd646c1dcb1d1c3c Mon Sep 17 00:00:00 2001 From: edenlightning <66261195+edenlightning@users.noreply.github.com> Date: Thu, 13 Aug 2020 18:56:51 -0400 Subject: [PATCH] Add labels to sphinx docs (#2964) * Add label * add ref * add ref * add ref * add label * add label * add label * add label * Update fast_training.rst * label * label * label * label * label * label * label * label * label * label * label * Update performance.rst * Update production_inference.rst * Update profiler.rst * Update results.rst * Update sequences.rst * Update single_gpu.rst * Update slurm.rst * Update test_set.rst * Update tpu.rst * Update trainer.rst * Update training_tricks.rst * Update transfer_learning.rst * Update weights_loading.rst * Update governance.rst * Update hooks.rst * Update bolts.rst * Update child_modules.rst * Update hyperparameters.rst * Update transfer_learning.rst --- docs/source/apex.rst | 1 + docs/source/child_modules.rst | 1 - docs/source/datamodules.rst | 2 ++ docs/source/debugging.rst | 4 +++- docs/source/early_stopping.rst | 1 + docs/source/experiment_logging.rst | 1 + docs/source/experiment_reporting.rst | 1 + docs/source/fast_training.rst | 1 + docs/source/governance.rst | 2 ++ docs/source/hooks.rst | 4 +++- docs/source/hyperparameters.rst | 1 - docs/source/introduction_guide.rst | 1 + docs/source/lightning-module.rst | 1 + docs/source/loggers.rst | 2 ++ docs/source/lr_finder.rst | 2 ++ docs/source/metrics.rst | 2 ++ docs/source/multiple_loaders.rst | 2 ++ docs/source/new-project.rst | 1 + docs/source/optimizers.rst | 2 ++ docs/source/performance.rst | 2 ++ docs/source/production_inference.rst | 2 ++ docs/source/profiler.rst | 1 + docs/source/results.rst | 2 ++ docs/source/sequences.rst | 2 ++ docs/source/single_gpu.rst | 4 +++- docs/source/slurm.rst | 2 ++ docs/source/test_set.rst | 2 ++ docs/source/tpu.rst | 2 ++ docs/source/trainer.rst | 2 ++ docs/source/training_tricks.rst | 1 + docs/source/transfer_learning.rst | 4 ++-- docs/source/weights_loading.rst | 1 + 32 files changed, 52 insertions(+), 7 deletions(-) diff --git a/docs/source/apex.rst b/docs/source/apex.rst index d3d4ee6e94..2867cdfa98 100644 --- a/docs/source/apex.rst +++ b/docs/source/apex.rst @@ -2,6 +2,7 @@ from pytorch_lightning.trainer.trainer import Trainer +.. _16-bit: 16-bit training ================= diff --git a/docs/source/child_modules.rst b/docs/source/child_modules.rst index c50075e9d4..18957b05e2 100644 --- a/docs/source/child_modules.rst +++ b/docs/source/child_modules.rst @@ -16,7 +16,6 @@ def val_dataloader(): pass - Child Modules ------------- Research projects tend to test different approaches to the same dataset. diff --git a/docs/source/datamodules.rst b/docs/source/datamodules.rst index ad70540ca0..a6a947bec3 100644 --- a/docs/source/datamodules.rst +++ b/docs/source/datamodules.rst @@ -1,3 +1,5 @@ +.. _data-modules: + LightningDataModule =================== A datamodule is a shareable, reusable class that encapsulates all the steps needed to process data: diff --git a/docs/source/debugging.rst b/docs/source/debugging.rst index 3384d3c9f2..56c96607bc 100644 --- a/docs/source/debugging.rst +++ b/docs/source/debugging.rst @@ -1,6 +1,8 @@ .. testsetup:: * from pytorch_lightning.trainer.trainer import Trainer + + .. _debugging: Debugging ========= @@ -129,4 +131,4 @@ argument of :class:`~pytorch_lightning.trainer.trainer.Trainer`) .. testcode:: # DEFAULT - trainer = Trainer(num_sanity_val_steps=2) \ No newline at end of file + trainer = Trainer(num_sanity_val_steps=2) diff --git a/docs/source/early_stopping.rst b/docs/source/early_stopping.rst index 603044f30b..66b5a9d131 100644 --- a/docs/source/early_stopping.rst +++ b/docs/source/early_stopping.rst @@ -3,6 +3,7 @@ from pytorch_lightning.trainer.trainer import Trainer from pytorch_lightning.callbacks.early_stopping import EarlyStopping +.. _early-stopping: Early stopping ============== diff --git a/docs/source/experiment_logging.rst b/docs/source/experiment_logging.rst index 6dab549521..bf90382298 100644 --- a/docs/source/experiment_logging.rst +++ b/docs/source/experiment_logging.rst @@ -3,6 +3,7 @@ from pytorch_lightning.trainer.trainer import Trainer from pytorch_lightning.core.lightning import LightningModule +.. _experiment-logging: Experiment Logging ================== diff --git a/docs/source/experiment_reporting.rst b/docs/source/experiment_reporting.rst index 46ecf67747..f19e6fd8e4 100644 --- a/docs/source/experiment_reporting.rst +++ b/docs/source/experiment_reporting.rst @@ -2,6 +2,7 @@ from pytorch_lightning.trainer.trainer import Trainer +.. _experiment-reporting: Experiment Reporting ===================== diff --git a/docs/source/fast_training.rst b/docs/source/fast_training.rst index cbbed17a6e..29f671c8ea 100644 --- a/docs/source/fast_training.rst +++ b/docs/source/fast_training.rst @@ -2,6 +2,7 @@ from pytorch_lightning.trainer.trainer import Trainer +.. _fast-training: Fast Training ============= diff --git a/docs/source/governance.rst b/docs/source/governance.rst index d26df7aa92..b232bd7b31 100644 --- a/docs/source/governance.rst +++ b/docs/source/governance.rst @@ -1,3 +1,5 @@ +.. _governance: + Pytorch Lightning Governance | Persons of interest ================================================== diff --git a/docs/source/hooks.rst b/docs/source/hooks.rst index 91dc275229..857aa2daa7 100644 --- a/docs/source/hooks.rst +++ b/docs/source/hooks.rst @@ -1,3 +1,5 @@ +.. _hooks: + Model Hooks =========== @@ -88,4 +90,4 @@ General hooks ------------- .. automodule:: pytorch_lightning.core.hooks - :noindex: \ No newline at end of file + :noindex: diff --git a/docs/source/hyperparameters.rst b/docs/source/hyperparameters.rst index 4af29f3585..fb98bcb1ca 100644 --- a/docs/source/hyperparameters.rst +++ b/docs/source/hyperparameters.rst @@ -7,7 +7,6 @@ import sys sys.argv = ['foo'] - Hyperparameters --------------- Lightning has utilities to interact seamlessly with the command line ArgumentParser diff --git a/docs/source/introduction_guide.rst b/docs/source/introduction_guide.rst index af178d7ae0..18ef72b711 100644 --- a/docs/source/introduction_guide.rst +++ b/docs/source/introduction_guide.rst @@ -3,6 +3,7 @@ from pytorch_lightning.core.lightning import LightningModule from pytorch_lightning.trainer.trainer import Trainer +.. _introduction-guide: Step-by-step walk-through ========================= diff --git a/docs/source/lightning-module.rst b/docs/source/lightning-module.rst index 755edfeb53..4987ae9970 100644 --- a/docs/source/lightning-module.rst +++ b/docs/source/lightning-module.rst @@ -1,5 +1,6 @@ .. role:: hidden :class: hidden-section +.. _lightning-module: LightningModule =============== diff --git a/docs/source/loggers.rst b/docs/source/loggers.rst index 6d91f0dfdf..44d358347f 100644 --- a/docs/source/loggers.rst +++ b/docs/source/loggers.rst @@ -6,6 +6,8 @@ .. role:: hidden :class: hidden-section + +.. _loggers: Loggers =========== diff --git a/docs/source/lr_finder.rst b/docs/source/lr_finder.rst index 4f21e0db7e..a90bb615e5 100755 --- a/docs/source/lr_finder.rst +++ b/docs/source/lr_finder.rst @@ -2,6 +2,8 @@ from pytorch_lightning.trainer.trainer import Trainer from pytorch_lightning.core.lightning import LightningModule + +.. _lr_finder: Learning Rate Finder -------------------- diff --git a/docs/source/metrics.rst b/docs/source/metrics.rst index 7102ac059e..e8735927d3 100644 --- a/docs/source/metrics.rst +++ b/docs/source/metrics.rst @@ -5,6 +5,8 @@ from pytorch_lightning.core.lightning import LightningModule from pytorch_lightning.metrics import TensorMetric, NumpyMetric +.. _metrics: + Metrics ======= This is a general package for PyTorch Metrics. These can also be used with regular non-lightning PyTorch code. diff --git a/docs/source/multiple_loaders.rst b/docs/source/multiple_loaders.rst index 05d7ca763e..b4c43d73d7 100644 --- a/docs/source/multiple_loaders.rst +++ b/docs/source/multiple_loaders.rst @@ -2,6 +2,8 @@ from pytorch_lightning.core.lightning import LightningModule +.. _multiple_loaders: + Multiple Datasets ================= Lightning supports multiple dataloaders in a few ways. diff --git a/docs/source/new-project.rst b/docs/source/new-project.rst index c83f271645..a81d05f7d0 100644 --- a/docs/source/new-project.rst +++ b/docs/source/new-project.rst @@ -7,6 +7,7 @@ from torch.nn import functional as F from torch.utils.data import DataLoader +.. _quick-start: Quick Start =========== diff --git a/docs/source/optimizers.rst b/docs/source/optimizers.rst index fda78f985f..6f09fd4087 100644 --- a/docs/source/optimizers.rst +++ b/docs/source/optimizers.rst @@ -1,3 +1,5 @@ +.. _optimizers: + Optimization =============== diff --git a/docs/source/performance.rst b/docs/source/performance.rst index bbce2b9486..277414aebd 100644 --- a/docs/source/performance.rst +++ b/docs/source/performance.rst @@ -1,3 +1,5 @@ +.. _performance: + Fast Performance ================ Here are some best practices to increase your performance. diff --git a/docs/source/production_inference.rst b/docs/source/production_inference.rst index 3159abe630..d3ab26b93e 100644 --- a/docs/source/production_inference.rst +++ b/docs/source/production_inference.rst @@ -1,3 +1,5 @@ +.. _production-inference: + Inference in Production ======================= PyTorch Lightning eases the process of deploying models into production. diff --git a/docs/source/profiler.rst b/docs/source/profiler.rst index 115aaf2759..26ad415655 100644 --- a/docs/source/profiler.rst +++ b/docs/source/profiler.rst @@ -1,6 +1,7 @@ .. role:: hidden :class: hidden-section +.. _profiler: Performance and Bottleneck Profiler =================================== diff --git a/docs/source/results.rst b/docs/source/results.rst index ed583ded86..a09c3ad544 100644 --- a/docs/source/results.rst +++ b/docs/source/results.rst @@ -1,3 +1,5 @@ +.. _result: + Result ====== Lightning has two results objects `TrainResult` and `EvalResult`. diff --git a/docs/source/sequences.rst b/docs/source/sequences.rst index b9a8f2ee64..b00e3c896a 100644 --- a/docs/source/sequences.rst +++ b/docs/source/sequences.rst @@ -2,6 +2,8 @@ from torch.utils.data import IterableDataset from pytorch_lightning.trainer.trainer import Trainer + +.. _sequences: Sequential Data ================ diff --git a/docs/source/single_gpu.rst b/docs/source/single_gpu.rst index 4348197fba..3bee7a847b 100644 --- a/docs/source/single_gpu.rst +++ b/docs/source/single_gpu.rst @@ -2,6 +2,8 @@ from pytorch_lightning.trainer.trainer import Trainer +.. _single-gpu: + Single GPU Training =================== Make sure you are running on a machine that has at least one GPU. Lightning handles all the NVIDIA flags for you, @@ -11,4 +13,4 @@ there's no need to set them yourself. :skipif: torch.cuda.device_count() < 1 # train on 1 GPU (using dp mode) - trainer = Trainer(gpus=1) \ No newline at end of file + trainer = Trainer(gpus=1) diff --git a/docs/source/slurm.rst b/docs/source/slurm.rst index 0297c0dcab..9d3a4ab3c9 100644 --- a/docs/source/slurm.rst +++ b/docs/source/slurm.rst @@ -1,6 +1,8 @@ .. testsetup:: * from pytorch_lightning.trainer.trainer import Trainer + +.. _slurm: Computing cluster (SLURM) ========================= diff --git a/docs/source/test_set.rst b/docs/source/test_set.rst index 57e2ebef54..0c93b1444d 100644 --- a/docs/source/test_set.rst +++ b/docs/source/test_set.rst @@ -1,3 +1,5 @@ +.. _test-set: + Test set ======== Lightning forces the user to run the test set separately to make sure it isn't evaluated by mistake. diff --git a/docs/source/tpu.rst b/docs/source/tpu.rst index 2066ea007f..0a05c1be12 100644 --- a/docs/source/tpu.rst +++ b/docs/source/tpu.rst @@ -1,3 +1,5 @@ +.. _tpu: + TPU support =========== diff --git a/docs/source/trainer.rst b/docs/source/trainer.rst index 978eaec554..b611a62619 100644 --- a/docs/source/trainer.rst +++ b/docs/source/trainer.rst @@ -1,6 +1,8 @@ .. role:: hidden :class: hidden-section +.. _trainer: + Trainer ======= .. automodule:: pytorch_lightning.trainer diff --git a/docs/source/training_tricks.rst b/docs/source/training_tricks.rst index 257419a97e..3d55f8325b 100644 --- a/docs/source/training_tricks.rst +++ b/docs/source/training_tricks.rst @@ -2,6 +2,7 @@ from pytorch_lightning.trainer.trainer import Trainer +.. _training-tricks: Training Tricks ================ diff --git a/docs/source/transfer_learning.rst b/docs/source/transfer_learning.rst index 35b7d661f0..4cc1c82335 100644 --- a/docs/source/transfer_learning.rst +++ b/docs/source/transfer_learning.rst @@ -1,7 +1,7 @@ .. testsetup:: * from pytorch_lightning.core.lightning import LightningModule - + Transfer Learning ----------------- @@ -115,4 +115,4 @@ Here's a model that uses `Huggingface transformers