src/transformers/integrations.py/TensorBoardCallback/on_train_end
class TensorBoardCallback:    def on_train_end(self, args, state, control, **kwargs):
        if self.tb_writer:
            self.tb_writer.close()
            self.tb_writer = None