The easiest way might be to make the trainers extend [Ignite](https://github.com/pytorch/ignite), [Catalyst](https://github.com/catalyst-team/catalyst), [Lightning](https://github.com/PyTorchLightning/pytorch-lightning) etc.