You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/opt/homebrew/Caskroom/miniconda/base/envs/rag/bin/optimum-cli", line 8, in <module>
sys.exit(main())
^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/envs/rag/lib/python3.12/site-packages/optimum/commands/optimum_cli.py", line 163, in main
service.run()
File "/opt/homebrew/Caskroom/miniconda/base/envs/rag/lib/python3.12/site-packages/optimum/commands/onnxruntime/quantize.py", line 99, in run
qconfig = ORTConfig.from_pretained(self.args.config).quantization
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'ORTConfig' has no attribute 'from_pretained'. Did you mean: 'from_pretrained'?
It looks like there's a typo in quantize.py. But unfortunately, even when fixing the misspelled function name, the command fails:
File "/opt/homebrew/Caskroom/miniconda/base/envs/rag/lib/python3.12/site-packages/optimum/commands/optimum_cli.py", line 163, in main
service.run()
File "/opt/homebrew/Caskroom/miniconda/base/envs/rag/lib/python3.12/site-packages/optimum/commands/onnxruntime/quantize.py", line 102, in run
q.quantize(save_dir=save_dir, quantization_config=qconfig)
File "/opt/homebrew/Caskroom/miniconda/base/envs/rag/lib/python3.12/site-packages/optimum/onnxruntime/quantization.py", line 310, in quantize
use_qdq = quantization_config.is_static and quantization_config.format == QuantFormat.QDQ
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'is_static'
After investigating this further, the problem seems to be that the quantize( function is expecting a QuantizationConfig but instead a dict object is supplied. I didn't see a straight forward way how to convert the loaded dict into the required QuantizationConfig
The text was updated successfully, but these errors were encountered:
I'm running
and this fails with
It looks like there's a typo in quantize.py. But unfortunately, even when fixing the misspelled function name, the command fails:
After investigating this further, the problem seems to be that the
quantize(
function is expecting aQuantizationConfig
but instead adict
object is supplied. I didn't see a straight forward way how to convert the loadeddict
into the requiredQuantizationConfig
The text was updated successfully, but these errors were encountered: