def on_batch_end(self, runner: "IRunner"):
        """Check if iterated specified number of batches.

        Args:
            runner: current runner
        """
        if runner.loader_batch_step >= self.num_batch_steps:
            runner.need_early_stop = True
Check if iterated specified number of batches.

        Args:
            runner: current runner
        
catalyst/callbacks/misc.py