Skip to content

Commit df36a67

Browse files
nikita-savelyevvmvafin
authored andcommitted
Do not allow to provide --quant-mode and --weight-format arguments at the same time (#1407)
1 parent af9e1d1 commit df36a67

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

optimum/commands/export/openvino.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,10 @@ def run(self):
381381
else:
382382
if not is_nncf_available():
383383
raise ImportError("Applying quantization requires nncf, please install it with `pip install nncf`")
384+
if self.args.weight_format is not None and self.args.quant_mode is not None:
385+
raise ValueError(
386+
"Both --weight-format and --quant-mode arguments are provided. Please provide only one of them."
387+
)
384388

385389
default_quantization_config = get_default_quantization_config(
386390
self.args.model, self.args.weight_format, self.args.quant_mode

0 commit comments

Comments
 (0)