def format_results(names, scalars):
    """Formats the results of training.

    Args:
        names: The names of the metrics.
        scalars: The values of the metrics.

    Returns:
        A string that contains the formatted scalars.
    """
    res = []
    for name, scalar in zip(names, scalars):
        res.append('%s: %2.3f' % (name, scalar))
    return ', '.join(res)