examples/research_projects/codeparrot/examples/train_complexity_predictor.py/CustomCallback/on_epoch_end
class CustomCallback:    def on_epoch_end(self, args, state, control, **kwargs):
        if control.should_evaluate:
            control_copy = deepcopy(control)
            self._trainer.evaluate(eval_dataset=self._trainer.train_dataset, metric_key_prefix="train")
            return control_copy