class_docstr: Integration tests ensuring supported models are correctly exported.
code: def test_external_data(self, use_cache: bool):
      os.environ[
          "FORCE_ONNX_EXTERNAL_DATA"
      ] = "1"  # force exporting small model with external data
  
      with TemporaryDirectory() as tmpdirname:
          task = "text2text-generation"
          if use_cache:
              task += "-with-past"
  
          subprocess.run(
              f"python3 -m optimum.exporters.onnx --model hf-internal-testing/tiny-random-t5 --task {task} {tmpdirname} --no-post-process",
              shell=True,
              check=True,
          )
  
          # verify external data is exported
          folder_contents = os.listdir(tmpdirname)
          self.assertTrue(ONNX_ENCODER_NAME in folder_contents)
          self.assertTrue(
              ONNX_ENCODER_NAME + "_data" in folder_contents
          )
          self.assertTrue(ONNX_DECODER_NAME in folder_contents)
          self.assertTrue(
              ONNX_DECODER_NAME + "_data" in folder_contents
          )
  
          if use_cache:
              self.assertTrue(
                  ONNX_DECODER_WITH_PAST_NAME in folder_contents
              )
              self.assertTrue(
                  ONNX_DECODER_WITH_PAST_NAME + "_data"
                  in folder_contents
              )
  
      os.environ.pop("FORCE_ONNX_EXTERNAL_DATA")
  
imports: import os
  import subprocess
  import unittest
  from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import Dict, Optional
  import onnx
  import pytest
  from parameterized import parameterized
  from transformers import AutoModelForSequenceClassification, AutoTokenizer, is_torch_available
  from transformers.testing_utils import require_torch, require_torch_gpu, require_vision, slow
  from optimum.exporters.error_utils import MinimumVersionError
  from optimum.exporters.onnx.__main__ import main_export
  from optimum.onnxruntime import ONNX_DECODER_MERGED_NAME, ONNX_DECODER_NAME, ONNX_DECODER_WITH_PAST_NAME, ONNX_ENCODER_NAME
  from optimum.utils.testing_utils import require_diffusers, require_sentence_transformers, require_timm
  from ..exporters_utils import PYTORCH_EXPORT_MODELS_TINY, PYTORCH_SENTENCE_TRANSFORMERS_MODEL, PYTORCH_STABLE_DIFFUSION_MODEL, PYTORCH_TIMM_MODEL
label_desc: Use image node_id 13 for calling the OnnxCLIExportTestCase obj's underlying member method code with example usage: obj.test_external_data(use_cache) without return types