def _write_metrics(metrics_mngr, tb_mngr, metrics, round_num):
    'Atomic metrics writer which inlines logic from MetricsHook class.'
    if (not isinstance(metrics, dict)):
        raise TypeError('metrics should be type `dict`.')
    if (not isinstance(round_num, int)):
        raise TypeError('round_num should be type `int`.')
    logging.info('Metrics at round {:d}:\n{!s}'.format(round_num, pprint.pformat(metrics)))
    metrics_mngr.save_metrics(metrics, round_num)
    tb_mngr.save_metrics(metrics, round_num)
Atomic metrics writer which inlines logic from MetricsHook class.
def _write_metrics(metrics_mngr, tb_mngr, metrics, round_num):
    
    if (not isinstance(metrics, dict)):
        raise TypeError('metrics should be type `dict`.')
    if (not isinstance(round_num, int)):
        raise TypeError('round_num should be type `int`.')
    logging.info('Metrics at round {:d}:\n{!s}'.format(round_num, pprint.pformat(metrics)))
    metrics_mngr.save_metrics(metrics, round_num)
    tb_mngr.save_metrics(metrics, round_num)