def reduce_metrics(logging_outputs) -> None:
        """Aggregate logging outputs from data parallel training."""
        loss = sum(log.get("loss", 0) for log in logging_outputs)
        nsentences = sum(log.get("nsentences", 0) for log in logging_outputs)
        ncorrect = sum(log.get("ncorrect", 0) for log in logging_outputs)
        ncorrect_norm = sum(log.get("ncorrect_norm", 0) for log in logging_outputs)
        metrics.log_scalar(
            "loss", loss / nsentences, nsentences, round=3
        )
        metrics.log_scalar(
            "accuracy", 100.0 * ncorrect / nsentences, nsentences, round=2
        )
        metrics.log_scalar(
            "accuracy_norm", 100.0 * ncorrect_norm / nsentences, nsentences, round=2
        )
Aggregate logging outputs from data parallel training.
YOCO/yoco/criterions/harness_eval.py