Are on_fit_end and on_train_end the same?

From the names, they should mean the same thing. I also did a test for printing a metric after going through all epochs, both methods printed the same results.

If they are the same, why redundant? If not, what is the difference?

Thanks!

few differences.

  1. Teardown happens between on_train_end and on_fit_end. It just checks that all processes are finished and synchronized in case of distributed training.
  2. on_fit_end will be called in case of trainer.test(...) too.
1 Like

ah, I see, thanks a lot for pointing that out, didn’t know test is regarded as part of fit.

Could you also guide me to the source code where defines the difference?

you can check the fit and test function in the same file for the workflow.

1 Like

What about on_fit_start vs on_train_start ?
Thank you