Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions docs/source-pytorch/extensions/loops.rst
Original file line number Diff line number Diff line change
Expand Up @@ -262,16 +262,7 @@ run (optional)
Subloops
--------

When you want to customize nested loops within loops, use the :meth:`~pytorch_lightning.loops.loop.Loop.replace` method:

.. code-block:: python

# This takes care of properly instantiating the new Loop and setting all references
trainer.fit_loop.replace(epoch_loop=MyEpochLoop)
# Trainer runs the fit loop with your new epoch loop!
trainer.fit(model)

Alternatively, for more fine-grained control, use the :meth:`~pytorch_lightning.loops.loop.Loop.connect` method:
When you want to customize nested loops within loops use the :meth:`~pytorch_lightning.loops.loop.Loop.connect` method:

.. code-block:: python

Expand Down
9 changes: 0 additions & 9 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,3 @@ ______________________________________________________________________
This folder contains older examples. You should instead use the examples
in [Lightning Bolts](https://pytorch-lightning.readthedocs.io/en/latest/ecosystem/bolts.html)
for advanced use cases.

______________________________________________________________________

## Loop examples

Contains implementations leveraging [loop customization](https://pytorch-lightning.readthedocs.io/en/latest/extensions/loops.html) to enhance the Trainer with new optimization routines.

- [K-fold Cross Validation Loop](pl_loops/kfold.py): Implementation of cross validation in a loop and special datamodule.
- [Yield Loop](pl_loops/yielding_training_step.py): Enables yielding from the training_step like in a Python generator. Useful for automatic optimization with multiple optimizers.
315 changes: 0 additions & 315 deletions examples/pl_loops/kfold.py

This file was deleted.

Loading