def increment_accumulated_grad_global_step(self):
    num_accumulated_batches_reached = self._accumulated_batches_reached()
    num_training_batches_reached = self._num_training_batches_reached()
    if (num_accumulated_batches_reached or num_training_batches_reached):
        self.trainer.global_step = self.trainer.accelerator.update_global_step(self.trainer.total_batch_idx, self.trainer.global_step)
def increment_accumulated_grad_global_step(self):
    num_accumulated_batches_reached = self._accumulated_batches_reached()
    num_training_batches_reached = self._num_training_batches_reached()
    if (num_accumulated_batches_reached or num_training_batches_reached):
        self.trainer.global_step = self.trainer.accelerator.update_global_step(self.trainer.total_batch_idx, self.trainer.global_step)