Skip to content

Commit

Permalink
Fixed UT error
Browse files Browse the repository at this point in the history
Signed-off-by: Cheng, Penghui <[email protected]>
  • Loading branch information
PenghuiCheng committed Mar 18, 2024
1 parent 9ec53ce commit 66d45c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_inc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cmake>=3.16
pip install cmake
pip install py-cpuinfo
pip install torch==2.1.0 torchaudio==2.1.0 torchvision==0.16 --extra-index-url https://download.pytorch.org/whl/cpu
pip install .[neural-compressor,diffusers,tests]
Expand Down
4 changes: 2 additions & 2 deletions optimum/intel/neural_compressor/quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def quantize(

if quantization_config is None:
quantization_config = WeightOnlyQuantConfig()
algo = ["RTN"]
algo = "RTN"
elif isinstance(quantization_config, WeightOnlyQuantConfig):
algo = quantization_config.algorithm
else:
Expand All @@ -223,7 +223,7 @@ def quantize(
)

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

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

0 comments on commit 66d45c2

Please sign in to comment.