callbacks: some callback hooks can be cleaned up
🚀 Feature
Motivation
There are some duplicate callback hooks which can be removed.
ON TRAIN START
ON EPOCH START          <-- same 1
ON TRAIN EPOCH START    <-- same 1
ON BATCH START          <-- same 2 
ON TRAIN BATCH START    <-- same 2
ON BATCH END
ON TRAIN BATCH END
ON BATCH START
ON TRAIN BATCH START
ON BATCH END
ON TRAIN BATCH END
ON VALIDATION START
ON VALIDATION EPOCH START
ON VALIDATION BATCH START
ON VALIDATION BATCH END
ON VALIDATION EPOCH END
ON VALIDATION END
ON EPOCH END
ON TRAIN EPOCH END
ON TRAIN END
ON FIT END
TEARDOWN
SETUP
ON FIT START
ON PRETRAIN ROUTINE START
ON PRETRAIN ROUTINE END
ON TEST START
ON TEST EPOCH START
ON TEST BATCH START
ON TEST BATCH END
ON TEST EPOCH END
ON TEST END
ON FIT END
TEARDOWN
TEARDOWN
Pitch
ON EPOCH START
ON TRAIN START
ON TRAIN EPOCH START
ON TRAIN BATCH START
ON TRAIN BATCH END
ON TRAIN EPOCH END
ON TRAIN END

ON VALIDATION START
ON VALIDATION EPOCH START
ON VALIDATION BATCH START
ON VALIDATION BATCH END
ON VALIDATION EPOCH END
ON VALIDATION END

ON EPOCH END
ON FIT END
TEARDOWN

SETUP
ON FIT START
ON PRETRAIN ROUTINE START
ON PRETRAIN ROUTINE END
ON TEST START
ON TEST EPOCH START
ON TEST BATCH START
ON TEST BATCH END
ON TEST EPOCH END
ON TEST END
ON FIT END
TEARDOWN
TEARDOWN
Alternatives
Due to various researches, the above hooks calling style can't be fit every needs.
But it would be intuitive to see like
(one thing is the user can think TRAIN / VALIDATION can be in a separate epoch)
ON TRAIN START
ON TRAIN EPOCH START
ON TRAIN BATCH START
ON TRAIN BATCH END
ON TRAIN EPOCH END
ON TRAIN END

ON VALIDATION START
ON VALIDATION EPOCH START
ON VALIDATION BATCH START
ON VALIDATION BATCH END
ON VALIDATION EPOCH END
ON VALIDATION END

ON FIT END
TEARDOWN

SETUP
ON FIT START
ON PRETRAIN ROUTINE START
ON PRETRAIN ROUTINE END
ON TEST START
ON TEST EPOCH START
ON TEST BATCH START
ON TEST BATCH END
ON TEST EPOCH END
ON TEST END
ON FIT END
TEARDOWN
TEARDOWN
Additional context
https://colab.research.google.com/drive/1xVpEVaMKsbnLL4cwLB60lhz8zL3FcWKo?usp=sharing