def get_callbacks(self) -> "OrderedDict[str, Callback]":
        """Returns the callbacks for the experiment."""
        callbacks = sort_callbacks_by_order(super().get_callbacks())
        callback_exists = lambda callback_fn: any(
            callback_isinstance(x, callback_fn) for x in callbacks.values()
        )
        if isinstance(self._criterion, TorchCriterion) and not callback_exists(
            ICriterionCallback
        ):
            callbacks["_criterion"] = CriterionCallback(
                input_key=self._output_key,
                target_key=self._target_key,
                metric_key=self._loss_key,
            )
        if isinstance(self._optimizer, TorchOptimizer) and not callback_exists(
            IBackwardCallback
        ):
            callbacks["_backward"] = BackwardCallback(metric_key=self._loss_key)
        if isinstance(self._optimizer, TorchOptimizer) and not callback_exists(
            IOptimizerCallback
        ):
            callbacks["_optimizer"] = OptimizerCallback(metric_key=self._loss_key)
        if isinstance(self._scheduler, TorchScheduler) and not callback_exists(
            ISchedulerCallback
        ):
            callbacks["_scheduler"] = SchedulerCallback(
                loader_key=self._valid_loader, metric_key=self._valid_metric
            )
        return callbacks
Returns the callbacks for the experiment.
catalyst/runners/supervised.py