docstr: This __init__ is there for legacy code. When removing deprecated args completely, the class can simply be
  deleted
docstr_tok: ["This","__init__","is","there","for","legacy","code",".","When","removing","deprecated","args","completely",",","the","class","can","simply","be","deleted"]
code: def __init__(self, **kwargs):
      """
      This __init__ is there for legacy code. When removing deprecated args completely, the class can simply be
      deleted
      """
      for deprecated_arg in self.deprecated_args:
          if deprecated_arg in kwargs:
              positive_arg = deprecated_arg[3:]
              setattr(
                  self, positive_arg, not kwargs.pop(deprecated_arg)
              )
              logger.warning(
                  f"{deprecated_arg} is depreciated. Please use --no_{positive_arg} or"
                  f" {positive_arg}={kwargs[positive_arg]}"
              )
  
      self.torchscript = kwargs.pop("torchscript", self.torchscript)
      self.torch_xla_tpu_print_metrics = kwargs.pop(
          "torch_xla_tpu_print_metrics",
          self.torch_xla_tpu_print_metrics,
      )
      self.fp16_opt_level = kwargs.pop(
          "fp16_opt_level", self.fp16_opt_level
      )
      super().__init__(**kwargs)
  
file_path: transformers/src/transformers/benchmark/benchmark_args.py
imports: from dataclasses import dataclass, field
  from typing import Tuple
  from ..utils import cached_property, is_torch_available, is_torch_tpu_available, logging, requires_backends
  from .benchmark_args_utils import BenchmarkArguments
label_desc: Use image node_id 1 to create a new PyTorchBenchmarkArguments object from inherited base classes: BenchmarkArguments with example: obj = PyTorchBenchmarkArguments()