code: def test_image_classification_parity(self):
      # dummy test until this question is solved
      # https://discuss.huggingface.co/t/why-use-val-transforms-function-in-image-classification-example-instead-of-feature-extractor/19976
      model_name = "fxmarty/resnet-tiny-beans"
      n_samples = 120
  
      run_config = {
          "task": "image-classification",
          "model_name_or_path": model_name,
          "dataset": {
              "path": "beans",
              "eval_split": "validation",
              "data_keys": {"primary": "image"},
              "ref_keys": ["labels"],
          },
          "metrics": ["accuracy"],
          "quantization_approach": "dynamic",
          "operators_to_quantize": ["Add", "MatMul"],
          "node_exclusion": [],
          "per_channel": False,
          "framework": "onnxruntime",
          "framework_args": {"optimization_level": 1, "opset": 15},
          "batch_sizes": [8],
          "input_lengths": [128],
          "max_eval_samples": n_samples,
          "time_benchmark_args": {"warmup_runs": 0, "duration": 0},
      }
      run_config = RunConfig(**run_config)
      run_config = dataclasses.asdict(run_config)
  
      run_instance = OnnxRuntimeRun(run_config)
      benchmark_results = run_instance.launch()
  
      print(benchmark_results)
      self.assertEqual(
          benchmark_results["evaluation"]["others"]["baseline"][
              "accuracy"
          ],
          84 / 120,
      )
  
file_path: optimum/tests/benchmark/test_transformers_optimum_examples_parity.py
imports: import dataclasses
  import json
  import os
  import shutil
  import subprocess
  import tempfile
  import unittest
  import transformers
  from optimum.onnxruntime.runs import OnnxRuntimeRun
  from optimum.utils.runs import RunConfig
label_desc: Use image node_id 6 for calling the TestParity obj's underlying member method code with example usage: obj.test_image_classification_parity() without return types