CalibrationMethod.Entropy failing
Describe the issue
While I try to use any Histogram-based calibrator, such as CalibrationMethod.Entropy, I get the following error:
ValueError: Histogram has not been collected. Please run collect() first
There is no documentation or whatsoever on how to call collect(), and this function has a required parameter, that I don't know what it is or how to generate
To reproduce
I face the issue while following this official tutorial: https://github.com/microsoft/onnxruntime-inference-examples/tree/main/quantization/nlp/bert/trt
Urgency
Blocked without quantization
Platform
Linux
OS Version
Ubuntu 18.04.6
ONNX Runtime Installation
Built from Source
ONNX Runtime Version or Commit ID
1.12.1
ONNX Runtime API
Python
Architecture
X86
Execution Provider
CUDA, TensorRT
Execution Provider Library Version
No response
Did you call collection_data as the example shows here: https://github.com/microsoft/onnxruntime-inference-examples/blob/743a310db7a90db1e8ffddc2768cb48258e2674b/quantization/nlp/bert/trt/e2e_tensorrt_bert_example.py#L251
Yes, I did. The issue actually was a syntax error from my side nested deep in the code, where the op_types_to_quantize had a comma at the end, making it a tuple, the exception catch was generic and showing this although it had nothing to do with it. Thanks for the fast reply nonetheless.