code: def _binary_classification_metrics(pred):
      raw_predictions, labels = pred
      predictions = np.argmax(raw_predictions, axis=1)
      result = {
          "f1": metrics.f1_score(labels, predictions),
          "precision": metrics.precision_score(labels, predictions),
          "recall": metrics.recall_score(labels, predictions),
          "auc": metrics.roc_auc_score(labels, raw_predictions[:, 1]),
          "accuracy": metrics.accuracy_score(labels, predictions),
      }
      return result
  
file_path: autotrain-advanced/src/autotrain/trainers/image_classification/utils.py
imports: import albumentations
  import numpy
  from sklearn import metrics
  from autotrain.trainers.image_classification.dataset import ImageClassificationDataset
label_desc: Use image node_id 1 for calling a global function with example usage: _binary_classification_metrics(pred) and returns: result