Update hook lifecycle (#6538)

* Update hook lifecycle

* Update docs/source/common/lightning_module.rst
This commit is contained in:
Carlos Mocholí 2021-03-15 20:16:31 +01:00 committed by GitHub
parent ea36ee30b0
commit 9c5973357e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -1020,12 +1020,14 @@ This is the pseudocode to describe how all the hooks are called during a call to
.. code-block:: python
def fit(...):
on_fit_start()
if global_rank == 0:
# prepare data is called on GLOBAL_ZERO only
prepare_data()
configure_callbacks()
on_fit_start()
for gpu/tpu in gpu/tpus:
train_on_device(model.copy())