in optimum/furiosa/quantization.py [0:0]
def compute_ranges(self) -> Dict[str, Tuple[float, float]]:
"""
Computes the quantization ranges.
Returns:
The dictionary mapping the nodes name to their quantization ranges.
"""
if self._calibrator is None:
raise ValueError(
"Calibrator is None, please call `partial_fit` or `fit` method at least ones to compute ranges."
)
LOGGER.info("Computing calibration ranges")
return self._calibrator.compute_range()