class_docstr: CalibrationConfig is the configuration class handling all the ONNX Runtime parameters related to the calibration
  step of static quantization.
  
  Args:
      dataset_name (`str`):
          The name of the calibration dataset.
      dataset_config_name (`str`):
          The name of the calibration dataset configuration.
      dataset_split (`str`):
          Which split of the dataset is used to perform the calibration step.
      dataset_num_samples (`int`):
          The number of samples composing the calibration dataset.
      method (`CalibrationMethod`):
          The method chosen to calculate the activations quantization parameters using the calibration dataset.
      num_bins (`Optional[int]`, defaults to `None`):
          The number of bins to use when creating the histogram when performing the calibration step using the
          Percentile or Entropy method.
      num_quantized_bins (`Optional[int]`, defaults to `None`):
          The number of quantized bins to use when performing the calibration step using the Entropy method.
      percentile (`Optional[float]`, defaults to `None`):
          The percentile to use when computing the activations quantization ranges when performing the calibration
          step using the Percentile method.
      moving_average (`Optional[bool]`, defaults to `None`):
          Whether to compute the moving average of the minimum and maximum values when performing the calibration step
          using the MinMax method.
      averaging_constant (`Optional[float]`, defaults to `None`):
          The constant smoothing factor to use when computing the moving average of the minimum and maximum values.
          Effective only when the MinMax calibration method is selected and `moving_average` is set to True.
class_docstr_tok: ["CalibrationConfig","is","the","configuration","class","handling","all","the","ONNX","Runtime","parameters","related","to","the","calibration","step","of","static","quantization",".","Args",":","dataset_name","(","`","str","`",")",":","The","name","of","the","calibration","dataset",".","dataset_config_name","(","`","str","`",")",":","The","name","of","the","calibration","dataset","configuration",".","dataset_split","(","`","str","`",")",":","Which","split","of","the","dataset","is","used","to","perform","the","calibration","step",".","dataset_num_samples","(","`","int","`",")",":","The","number","of","samples","composing","the","calibration","dataset",".","method","(","`","CalibrationMethod","`",")",":","The","method","chosen","to","calculate","the","activations","quantization","parameters","using","the","calibration","dataset",".","num_bins","(","`","Optional","[","int","]","`",",","defaults","to","`","None","`",")",":","The","number","of","bins","to","use","when","creating","the","histogram","when","performing","the","calibration","step","using","the","Percentile","or","Entropy","method",".","num_quantized_bins","(","`","Optional","[","int","]","`",",","defaults","to","`","None","`",")",":","The","number","of","quantized","bins","to","use","when","performing","the","calibration","step","using","the","Entropy","method",".","percentile","(","`","Optional","[","float","]","`",",","defaults","to","`","None","`",")",":","The","percentile","to","use","when","computing","the","activations","quantization","ranges","when","performing","the","calibration","step","using","the","Percentile","method",".","moving_average","(","`","Optional","[","bool","]","`",",","defaults","to","`","None","`",")",":","Whether","to","compute","the","moving","average","of","the","minimum","and","maximum","values","when","performing","the","calibration","step","using","the","MinMax","method",".","averaging_constant","(","`","Optional","[","float","]","`",",","defaults","to","`","None","`",")",":","The","constant","smoothing","factor","to","use","when","computing","the","moving","average","of","the","minimum","and","maximum","values",".","Effective","only","when","the","MinMax","calibration","method","is","selected","and","`","moving_average","`","is","set","to","True","."]
code: def create_calibrator(
      self,
      onnx_model_path: Union[str, os.PathLike, Path],
      operators_to_quantize: Optional[List[str]],
      use_external_data_format: bool = False,
      force_symmetric_range: bool = False,
      augmented_model_name: str = "augmented_model.onnx",
  ) -> CalibraterBase:
      kwargs = {
          "model": onnx_model_path,
          "op_types_to_calibrate": operators_to_quantize or [],
          "calibrate_method": self.method,
          "augmented_model_path": augmented_model_name,
      }
      if parse(ort_version) > Version("1.10.0"):
          kwargs["use_external_data_format"] = use_external_data_format
          kwargs["extra_options"] = {
              "symmetric": force_symmetric_range,
              "num_bins": self.num_bins,
              "num_quantized_bins": self.num_quantized_bins,
              "percentile": self.percentile,
              "moving_average": self.moving_average,
              "averaging_constant": self.averaging_constant,
          }
      return create_calibrator(**kwargs)
  
imports: import os
  import warnings
  from dataclasses import asdict, dataclass, field
  from enum import Enum
  from pathlib import Path
  from typing import Dict, List, Optional, Tuple, Union
  from datasets import Dataset
  from packaging.version import Version, parse
  from onnxruntime import __version__
  from onnxruntime.quantization import CalibraterBase, CalibrationMethod, QuantFormat, QuantizationMode, QuantType
  from onnxruntime.quantization.calibrate import create_calibrator
  from onnxruntime.quantization.registry import IntegerOpsRegistry, QDQRegistry, QLinearOpsRegistry
  from onnxruntime.transformers.fusion_options import FusionOptions
  from ..configuration_utils import BaseConfig
  from ..utils import logging
label_desc: Use image node_id 1 for calling the CalibrationConfig obj's underlying member method code with example usage: obj.create_calibrator(onnx_model_path, operators_to_quantize, use_external_data_format, force_symmetric_range, augmented_model_name) and returns: create_calibrator