def check_checkpoint_callback(self, should_update, is_last=False):
    if (should_update and self.trainer.checkpoint_connector.has_trained):
        callbacks = self.trainer.checkpoint_callbacks
        if (is_last and any(((cb.save_last and cb.verbose) for cb in callbacks))):
            rank_zero_info('Saving latest checkpoint...')
        model = self.trainer.lightning_module
        for cb in callbacks:
            cb.on_validation_end(self.trainer, model)
def check_checkpoint_callback(self, should_update, is_last=False):
    if (should_update and self.trainer.checkpoint_connector.has_trained):
        callbacks = self.trainer.checkpoint_callbacks
        if (is_last and any(((cb.save_last and cb.verbose) for cb in callbacks))):
            rank_zero_info('Saving latest checkpoint...')
        model = self.trainer.lightning_module
        for cb in callbacks:
            cb.on_validation_end(self.trainer, model)