(config, y_preds, y_ground_truth, mode)
Run metrics for one output
Run metrics for one output
Run metrics for one output
def run_metrics(config, y_preds, y_ground_truth, mode):
  """Run metrics for one output"""
  metcs = metrics.get_metrics(
      config=config, y_pred=y_preds, y_true=y_ground_truth)
  logging.info("Evaluation on %s:" % mode)
  if isinstance(metcs, list):
    for one_metcs in metcs:
      for key in sorted(one_metcs.keys()):
        logging.info(key + ":" + str(one_metcs[key]))
  else:
    for key in sorted(metcs.keys()):
      logging.info(key + ":" + str(metcs[key]))
def run_metrics ( config , y_preds , y_ground_truth , mode ) : metcs = metrics . get_metrics ( config = config , y_pred = y_preds , y_true = y_ground_truth ) logging . info ( "Evaluation on %s:" % mode ) if isinstance ( metcs , list ) : for one_metcs in metcs : for key in sorted ( one_metcs . keys ( ) ) : logging . info ( key + ":" + str ( one_metcs [ key ] ) ) else : for key in sorted ( metcs . keys ( ) ) : logging . info ( key + ":" + str ( metcs [ key ] ) )