Is there an official callback feature in PyTorch? If not, I’d like to know the relevant files to modify to make it happen. Basically, I want callbacks for functions like on_batch_end(), on_epoch_end() etc.