code: def test_onnx_export_hf_text(checkpoint_name):
      # IMPORTANT: lazy import onnxruntime, otherwise onnxruntime won't be able to compile to tensorrt EP.
      import onnxruntime as ort
      import pandas as pd
  
      # https://huggingface.co/datasets/stsb_multi_mt/viewer/en/test
      data_dict = {
          "sentence1": [
              "A girl is styling her hair.",
              "A group of men play soccer on the beach.",
              "One woman is measuring another woman's ankle.",
              "A man is cutting up a cucumber.",
              "A man is playing a harp.",
          ],
          "sentence2": [
              "A girl is brushing her hair.",
              "A group of boys are playing soccer on the beach.",
              "A woman measures another woman's ankle.",
              "A man is slicing a cucumber.",
              "A man is playing a keyboard.",
          ],
          "score": [2.5, 3.6, 5, 4.2, 1.5],
      }
      test_df = pd.DataFrame.from_dict(data_dict)
  
      predictor = MultiModalPredictor(
          problem_type="feature_extraction",
          hyperparameters={
              "optimization.max_epochs": 1,
              "model.hf_text.checkpoint_name": checkpoint_name,
          },
      )
      ag_pearson, ag_spearman = evaluate(predictor, test_df)
  
      model_path = checkpoint_name.replace("/", "_")
      onnx_path = predictor.export_onnx(path=model_path, data=test_df)
  
      # TODO: Test with CUDA EP when we upgrade CUDA version to 11.7 (along with pytorch v1.13.1).
      # onnxruntime-gpu v1.13.1 require CUDA version >=11.6
      ort_sess = ort.InferenceSession(
          onnx_path, providers=["CPUExecutionProvider"]
      )
      onnx_pearson, onnx_spearman = evaluate(
          predictor, test_df, ort_sess
      )
      assert pytest.approx(onnx_pearson, 1e-2) == ag_pearson
      assert pytest.approx(onnx_spearman, 1e-2) == ag_spearman
  
file_path: autogluon/multimodal/tests/unittests/others/test_deployment_onnx.py
imports: import os
  import shutil
  import numpy
  import numpy.testing
  import pytest
  from packaging import version
  from scipy.stats import pearsonr, spearmanr
  from sklearn.metrics.pairwise import paired_cosine_distances
  from autogluon.multimodal import MultiModalPredictor
  from autogluon.multimodal.constants import REGRESSION
  from autogluon.multimodal.utils.misc import shopee_dataset
  from autogluon.multimodal.utils.onnx import OnnxModule
  from ..utils.unittest_datasets import AEDataset, PetFinderDataset
label_desc: Use image node_id 2 for calling a global function with example usage: test_onnx_export_hf_text(checkpoint_name) without return types