Update hook lifecycle (#6538)
* Update hook lifecycle * Update docs/source/common/lightning_module.rst
This commit is contained in:
parent
ea36ee30b0
commit
9c5973357e
|
@ -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())
|
||||
|
||||
|
|
Loading…
Reference in New Issue