def get_history_metrics(history):
    """
    Get metrics from History.history dict as returned by Keras model
    fit/fit_generator functions.
    """
    
    metrics = list(history.keys())
    v_met = [x for x in metrics if 'val' in x]
    n = len(v_met)
    metrics = metrics[n:]
    return metrics, v_met, n