'Callback to log training speed and metrics in TensorBoard.'

def __call__(self, param):

    if (param.eval_metric is None):
        return
    name_value = param.eval_metric.get_name_value()
    for (name, value) in name_value:
        if (self.prefix is not None):
            name = ('%s-%s' % (self.prefix, name))
        self.summary_writer.add_scalar(name, value)
