class_docstr: Benchmarks is a simple but feature-complete benchmarking script to compare memory and time performance of models in
  Transformers.
code: def __init__(
      self,
      args: BenchmarkArguments = None,
      configs: PretrainedConfig = None,
  ):
      self.args = args
      if configs is None:
          self.config_dict = {
              model_name: AutoConfig.from_pretrained(model_name)
              for model_name in self.args.model_names
          }
      else:
          self.config_dict = dict(zip(self.args.model_names, configs))
  
      warnings.warn(
          f"The class {self.__class__} is deprecated. Hugging Face Benchmarking utils"
          " are deprecated in general and it is advised to use external Benchmarking libraries "
          " to benchmark Transformer models.",
          FutureWarning,
      )
  
      if (
          self.args.memory
          and os.getenv("TRANSFORMERS_USE_MULTIPROCESSING") == 0
      ):
          logger.warning(
              "Memory consumption will not be measured accurately if `args.multi_process` is set to `False.` The"
              " flag 'TRANSFORMERS_USE_MULTIPROCESSING' should only be disabled for debugging / testing."
          )
  
      self._print_fn = None
      self._framework_version = None
      self._environment_info = None
  
imports: import copy
  import csv
  import linecache
  import os
  import platform
  import sys
  import warnings
  from abc import ABC, abstractmethod
  from collections import defaultdict, namedtuple
  from datetime import datetime
  from multiprocessing import Pipe, Process, Queue
  from multiprocessing.connection import Connection
  from typing import Callable, Iterable, List, NamedTuple, Optional, Union
  from ..None import AutoConfig, PretrainedConfig
  from ..None import __version__
  from ..utils import is_psutil_available, is_py3nvml_available, is_tf_available, is_torch_available, logging
  from .benchmark_args_utils import BenchmarkArguments
label_desc: Use image node_id 1 to create a new Benchmark object from inherited base classes: ABC with example: obj = Benchmark(args, configs)