Skip to content

Commit 66d45c2

Browse files
committed
Fixed UT error
Signed-off-by: Cheng, Penghui <penghui.cheng@intel.com>
1 parent 9ec53ce commit 66d45c2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/test_inc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Install dependencies
3131
run: |
3232
python -m pip install --upgrade pip
33-
pip install cmake>=3.16
33+
pip install cmake
3434
pip install py-cpuinfo
3535
pip install torch==2.1.0 torchaudio==2.1.0 torchvision==0.16 --extra-index-url https://download.pytorch.org/whl/cpu
3636
pip install .[neural-compressor,diffusers,tests]

optimum/intel/neural_compressor/quantization.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def quantize(
214214

215215
if quantization_config is None:
216216
quantization_config = WeightOnlyQuantConfig()
217-
algo = ["RTN"]
217+
algo = "RTN"
218218
elif isinstance(quantization_config, WeightOnlyQuantConfig):
219219
algo = quantization_config.algorithm
220220
else:
@@ -223,7 +223,7 @@ def quantize(
223223
)
224224

225225
if algo not in ["RTN", "GPTQ"]:
226-
raise ValueError("Weight-only quantization is only support RTN and GPTQ algorithm now!")
226+
raise ValueError(f"Weight-only quantization is only support RTN and GPTQ algorithm now!But got {algo}")
227227

228228
if calibration_dataset is None and quantization_config.tokenizer is None and ("GPTQ" in algo):
229229
raise ValueError(

0 commit comments

Comments
 (0)