code: def eval_cosine(predictor, df, onnx_session):
      labels = df["score"].to_numpy()
      valid_input = [
          "hf_text_text_token_ids",
          "hf_text_text_valid_length",
          "hf_text_text_segment_ids",  # Remove for mpnet
      ]
  
      QEmb = onnx_session.run(
          None,
          predictor._learner.get_processed_batch_for_deployment(
              data=df[["sentence1"]]
          ),
      )[0]
      AEmb = onnx_session.run(
          None,
          predictor._learner.get_processed_batch_for_deployment(
              data=df[["sentence2"]]
          ),
      )[0]
  
      cosine_scores = 1 - (paired_cosine_distances(QEmb, AEmb))
      eval_pearson_cosine, _ = pearsonr(labels, cosine_scores)
      eval_spearman_cosine, _ = spearmanr(labels, cosine_scores)
  
      print(eval_pearson_cosine)
      print(eval_spearman_cosine)
  
imports: import argparse
  from autogluon.multimodal import MultiModalPredictor
  from datasets import load_dataset
  from sklearn.metrics.pairwise import paired_cosine_distances
  from scipy.stats import pearsonr, spearmanr
  import onnxruntime
label_desc: Use image node_id 1 for calling a global function with example usage: eval_cosine(predictor, df, onnx_session) without return types