Skip to content

Commit

Permalink
Raise error if dataset is not provided for full quantization via opti…
Browse files Browse the repository at this point in the history
…mum-cli
  • Loading branch information
nikita-savelyevv committed Jan 17, 2025
1 parent 2590794 commit e2f3512
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions optimum/commands/export/openvino.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,11 @@ def run(self):
quantization_config["trust_remote_code"] = self.args.trust_remote_code
ov_config = OVConfig(quantization_config=quantization_config)
else:
if self.args.dataset is None:
raise ValueError(
"Dataset is required for full quantization. Please provide it with --dataset argument."
)

quantization_config = {
"weight_format": self.args.quant_mode,
"activation_format": self.args.quant_mode,
Expand Down

0 comments on commit e2f3512

Please sign in to comment.