The correct action would be to delete "confusion_matrix_with_labels" from `CLASSIFICATION_METRICS`.

By adding this line `if isinstance(metric, partial) and 'labels' in metric.keywords: `, you skip any metric define
in `CLASSIFICATION_METRICS` with a partial and  a `label` keyword. It means that you also skip test for macro/micro/weighted precision/recall/f-score.