code: def auc_score(
      cfg: Any,
      results: Dict,
      val_df: pd.DataFrame,
      raw_results: bool = False,
  ) -> Union[NDArray, Tuple[NDArray, List[str]]]:
      logits = np.array(results["logits"])
      target_text = np.array(
          [int(text) for text in results["target_text"]]
      )
      if cfg.dataset.num_classes > 1:
          target_text = np.eye(cfg.dataset.num_classes)[target_text]
      return roc_auc_score(target_text, logits, multi_class="ovr")
  
file_path: h2o-llmstudio/llm_studio/src/metrics/text_causal_classification_modeling_metrics.py
imports: import logging
  from typing import Any, Dict, List, Tuple, Union
  import numpy
  import pandas
  from numpy.typing import NDArray
  from scipy.special import softmax
  from sklearn.metrics import log_loss, roc_auc_score
label_desc: Use image node_id 2 for calling a global function with example usage: auc_score(cfg, results, val_df, raw_results) and returns: roc_auc_score