diff --git a/pytorch_lightning/trainer/trainer.py b/pytorch_lightning/trainer/trainer.py index cc1964f07039b..07e422d777ab2 100644 --- a/pytorch_lightning/trainer/trainer.py +++ b/pytorch_lightning/trainer/trainer.py @@ -449,25 +449,28 @@ def fit( # ---------------------------- # INSPECT THE CORE LOOPS # ---------------------------- - # Lightning internal flow looks like this. - # - # trainer.fit(...) or trainer.test(...) or trainer.predict(...) || - # | || - # create accelerator || - # | || - # trainer.dispatch || LIGHTNING - # | || - # start_training or start_evaluating or start_predicting call || FLOW - # from `accelerator` || - # | || DIRECTION - # run_train or run_evaluate or run_predict call || - # from `trainer` || - # | || - # results \/ - # This is used to guide readers to the core loops: train, test, predict. - # `run_predict` is the simplest to understand, use `Go to Definition` to read it :) - # Search for `start_training` or `start_evaluating` or `start_predicting` in - # `pytorch_lightning/plugins/training_type` folder to find accelerator dispatch functions. + f""" + Lightning internal flow looks like this: + {Trainer.fit} or {Trainer.test} or {Trainer.predict} || + | || + create accelerator || + | || + {self.dispatch} || + | || LIGHTNING + {self.accelerator.start_training} or || + {self.accelerator.start_evaluating} or || FLOW + {self.accelerator.start_predicting} || + | || DIRECTION + {self.run_train} or || + {self.run_evaluation} or || + {self.run_predict} || + | || + results \/ + This is used to guide readers to the core loops: train, test, predict. + {self.run_predict} is the simplest to understand, use `Go to Definition` to read it :) + Search for `start_training` or `start_evaluating` or `start_predicting` in + `pytorch_lightning/plugins/training_type_plugin` to find accelerator dispatch functions. + """ # noqa: W605 # ---------------------------- # TRAIN