class_docstr: Base class for ONNX exportable model describing metadata on how to export the model through the ONNX format.
code: def __init__(
      self,
      config: "PretrainedConfig",
      task: str = "default",
      patching_specs: List[PatchingSpec] = None,
  ):
      self._config = config
  
      if task not in self._tasks_to_common_outputs:
          raise ValueError(
              f"{task} is not a supported task, supported tasks: {self._tasks_to_common_outputs.keys()}"
          )
      self.task = task
  
      self._patching_specs = []
      for spec in patching_specs if patching_specs is not None else []:
          final_spec = spec
          if spec.orig_op is None:
              final_spec = dataclasses.replace(
                  spec, orig_op=getattr(spec.o, spec.name)
              )
          self._patching_specs.append(final_spec)
  
imports: import copy
  import dataclasses
  import warnings
  from abc import ABC, abstractmethod
  from collections import OrderedDict
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Union
  import numpy
  from packaging import version
  from ..utils import TensorType, is_torch_available, is_vision_available, logging
  from .utils import ParameterFormat, compute_effective_axis_dimension, compute_serialized_parameters_size
label_desc: Use image node_id 1 to create a new OnnxConfig object from inherited base classes: ABC with example: obj = OnnxConfig(config, task, patching_specs)