def log_metrics(
        self,
        metrics: Dict[str, float],
        scope: str,
        runner: "IRunner",
    ) -> None:
        """Logs batch and epoch metrics to wandb."""
        step = runner.sample_step if self.log_batch_metrics else runner.epoch_step
        if scope == "batch" and self.log_batch_metrics:
            metrics = {k: float(v) for k, v in metrics.items()}
            self._log_metrics(
                metrics=metrics,
                step=step,
                loader_key=runner.loader_key,
                prefix="batch",
            )
        elif scope == "loader" and self.log_epoch_metrics:
            self._log_metrics(
                metrics=metrics,
                step=step,
                loader_key=runner.loader_key,
                prefix="epoch",
            )
        elif scope == "epoch" and self.log_epoch_metrics:
            loader_key = "_epoch_"
            per_loader_metrics = metrics[loader_key]
            self._log_metrics(
                metrics=per_loader_metrics,
                step=step,
                loader_key=loader_key,
                prefix="epoch",
            )
Logs batch and epoch metrics to wandb.
catalyst/loggers/wandb.py