Update strategy registry docs (#11311)

This commit is contained in:
Kaushik B 2022-01-05 16:07:11 +05:30 committed by GitHub
parent a8bd7ac73f
commit 5a89be6873
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -1,12 +1,12 @@
Training Type Plugins Registry
==============================
Strategy Registry
=================
.. warning:: The Plugins Registry is experimental and subject to change.
.. warning:: The Strategy Registry is experimental and subject to change.
Lightning includes a registry that holds information about Training Type plugins and allows for the registration of new custom plugins.
Lightning includes a registry that holds information about Training strategies and allows for the registration of new custom strategies.
The Plugins are assigned strings that identify them, such as "ddp", "deepspeed_stage_2_offload", and so on.
It also returns the optional description and parameters for initialising the Plugin that were defined during registration.
The Strategies are assigned strings that identify them, such as "ddp", "deepspeed_stage_2_offload", and so on.
It also returns the optional description and parameters for initialising the Strategy that were defined during registration.
.. code-block:: python
@ -21,11 +21,11 @@ It also returns the optional description and parameters for initialising the Plu
trainer = Trainer(strategy="tpu_spawn_debug", accelerator="tpu", devices=8)
Additionally, you can pass your custom registered training type plugins to the ``strategy`` argument.
Additionally, you can pass your custom registered training strategies to the ``strategy`` argument.
.. code-block:: python
from pytorch_lightning.strategies import DDPStrategy, TrainingTypePluginsRegistry, CheckpointIO
from pytorch_lightning.strategies import DDPStrategy, StrategyRegistry, CheckpointIO
class CustomCheckpointIO(CheckpointIO):
@ -39,7 +39,7 @@ Additionally, you can pass your custom registered training type plugins to the `
custom_checkpoint_io = CustomCheckpointIO()
# Register the DDP Strategy with your custom CheckpointIO plugin
TrainingTypePluginsRegistry.register(
StrategyRegistry.register(
"ddp_custom_checkpoint_io",
DDPStrategy,
description="DDP Strategy with custom checkpoint io plugin",

View File

@ -77,7 +77,7 @@ PyTorch Lightning
advanced/fault_tolerant_training
common/optimizers
advanced/profiler
advanced/plugins_registry
advanced/strategy_registry
common/remote_fs
common/single_gpu
advanced/training_tricks