From e2f3512036ece6f7d07107b2ce592b2a479fd7e7 Mon Sep 17 00:00:00 2001 From: Nikita Savelyev Date: Fri, 17 Jan 2025 16:19:50 +0100 Subject: [PATCH] Raise error if dataset is not provided for full quantization via optimum-cli --- optimum/commands/export/openvino.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/optimum/commands/export/openvino.py b/optimum/commands/export/openvino.py index 20e2d7ca3..8d272a693 100644 --- a/optimum/commands/export/openvino.py +++ b/optimum/commands/export/openvino.py @@ -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,