From 9ffb3d887581c1d833254b0792b48343c2207567 Mon Sep 17 00:00:00 2001 From: Danielle Pintz Date: Tue, 7 Sep 2021 22:47:43 +0000 Subject: [PATCH 1/4] Small doc fixes --- docs/source/common/lightning_module.rst | 2 +- docs/source/extensions/callbacks.rst | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/source/common/lightning_module.rst b/docs/source/common/lightning_module.rst index 5158fc8dde788..088845c253257 100644 --- a/docs/source/common/lightning_module.rst +++ b/docs/source/common/lightning_module.rst @@ -80,7 +80,7 @@ Notice a few things. out = net(x) Thus, to use Lightning, you just need to organize your code which takes about 30 minutes, -(and let's be real, you probably should do anyhow). +(and let's be real, you probably should do anyway). ------------ diff --git a/docs/source/extensions/callbacks.rst b/docs/source/extensions/callbacks.rst index e30b3a0a94078..5f293bb60ff4b 100644 --- a/docs/source/extensions/callbacks.rst +++ b/docs/source/extensions/callbacks.rst @@ -395,6 +395,13 @@ on_keyboard_interrupt .. automethod:: pytorch_lightning.callbacks.Callback.on_keyboard_interrupt :noindex: +on_exception +^^^^^^^^^^^^^^^^^^^^^ + +.. automethod:: pytorch_lightning.callbacks.Callback.on_exception + :noindex: + + on_save_checkpoint ^^^^^^^^^^^^^^^^^^ From 0719d307fdbcc043e6670d43b4efe279bf029939 Mon Sep 17 00:00:00 2001 From: Danielle Pintz Date: Tue, 7 Sep 2021 22:54:48 +0000 Subject: [PATCH 2/4] remove space --- docs/source/extensions/callbacks.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/extensions/callbacks.rst b/docs/source/extensions/callbacks.rst index 5f293bb60ff4b..7437f77b14e28 100644 --- a/docs/source/extensions/callbacks.rst +++ b/docs/source/extensions/callbacks.rst @@ -401,7 +401,6 @@ on_exception .. automethod:: pytorch_lightning.callbacks.Callback.on_exception :noindex: - on_save_checkpoint ^^^^^^^^^^^^^^^^^^ From 5fcce8ca00daa9b2fbbf6fb1784dd0be4654a222 Mon Sep 17 00:00:00 2001 From: Danielle Pintz Date: Tue, 7 Sep 2021 23:57:47 +0000 Subject: [PATCH 3/4] small fix --- docs/source/common/lightning_module.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/common/lightning_module.rst b/docs/source/common/lightning_module.rst index 088845c253257..3764e66093686 100644 --- a/docs/source/common/lightning_module.rst +++ b/docs/source/common/lightning_module.rst @@ -267,7 +267,7 @@ The matching pseudocode is: Training with DataParallel ~~~~~~~~~~~~~~~~~~~~~~~~~~ -When training using a `accelerator` that splits data from each batch across GPUs, sometimes you might +When training using an `accelerator` that splits data from each batch across GPUs, sometimes you might need to aggregate them on the master GPU for processing (dp, or ddp2). In this case, implement the `training_step_end` method @@ -379,7 +379,7 @@ If you need to do something with all the outputs of each `validation_step`, over Validating with DataParallel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When training using a `accelerator` that splits data from each batch across GPUs, sometimes you might +When training using an `accelerator` that splits data from each batch across GPUs, sometimes you might need to aggregate them on the master GPU for processing (dp, or ddp2). In this case, implement the `validation_step_end` method From 45ffb268bd8368c5e8aa7873883337fd9355fa05 Mon Sep 17 00:00:00 2001 From: Danielle Pintz <38207072+daniellepintz@users.noreply.github.com> Date: Wed, 8 Sep 2021 15:29:05 -0700 Subject: [PATCH 4/4] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Adrian Wälchli --- docs/source/common/lightning_module.rst | 4 ++-- docs/source/extensions/callbacks.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/common/lightning_module.rst b/docs/source/common/lightning_module.rst index 3764e66093686..249baaa20321d 100644 --- a/docs/source/common/lightning_module.rst +++ b/docs/source/common/lightning_module.rst @@ -268,7 +268,7 @@ The matching pseudocode is: Training with DataParallel ~~~~~~~~~~~~~~~~~~~~~~~~~~ When training using an `accelerator` that splits data from each batch across GPUs, sometimes you might -need to aggregate them on the master GPU for processing (dp, or ddp2). +need to aggregate them on the main GPU for processing (dp, or ddp2). In this case, implement the `training_step_end` method @@ -380,7 +380,7 @@ If you need to do something with all the outputs of each `validation_step`, over Validating with DataParallel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When training using an `accelerator` that splits data from each batch across GPUs, sometimes you might -need to aggregate them on the master GPU for processing (dp, or ddp2). +need to aggregate them on the main GPU for processing (dp, or ddp2). In this case, implement the `validation_step_end` method diff --git a/docs/source/extensions/callbacks.rst b/docs/source/extensions/callbacks.rst index 7437f77b14e28..d5cfdfc8111c0 100644 --- a/docs/source/extensions/callbacks.rst +++ b/docs/source/extensions/callbacks.rst @@ -396,7 +396,7 @@ on_keyboard_interrupt :noindex: on_exception -^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^ .. automethod:: pytorch_lightning.callbacks.Callback.on_exception :noindex: