def get_metrics_for_cv(r):
    """
    Metrics used for cross-validation
    """
    median_rank = r['image_annotation']['median_rank'] + r['image_search']['median_rank']
    recall_at_1 = r['image_annotation']['recall@1'] + r['image_search']['recall@1']
    return median_rank, recall_at_1