From f8e6c66047964408f65c8a37fc4253c132018411 Mon Sep 17 00:00:00 2001 From: "Lu, Yintong" Date: Thu, 29 Feb 2024 21:54:11 -0800 Subject: [PATCH 1/3] fix little issue for itrex-ut Signed-off-by: Lu, Yintong --- neural_compressor/adaptor/pytorch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neural_compressor/adaptor/pytorch.py b/neural_compressor/adaptor/pytorch.py index 314cd800043..f09cdb8a34b 100644 --- a/neural_compressor/adaptor/pytorch.py +++ b/neural_compressor/adaptor/pytorch.py @@ -1813,7 +1813,8 @@ def smooth_quant( kwargs["percentile"] = percentile if scales_per_op is not None: kwargs["scales_per_op"] = scales_per_op - auto_alpha_args["init_alpha"] = default_alpha + if alpha == 'auto': + auto_alpha_args["init_alpha"] = default_alpha model._model = self.sq.transform( alpha=alpha, folding=folding, From bdff23eda30551fb2526ff4c87fea50999cef563 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 05:57:35 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- neural_compressor/adaptor/pytorch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neural_compressor/adaptor/pytorch.py b/neural_compressor/adaptor/pytorch.py index f09cdb8a34b..3892a659b33 100644 --- a/neural_compressor/adaptor/pytorch.py +++ b/neural_compressor/adaptor/pytorch.py @@ -1813,7 +1813,7 @@ def smooth_quant( kwargs["percentile"] = percentile if scales_per_op is not None: kwargs["scales_per_op"] = scales_per_op - if alpha == 'auto': + if alpha == "auto": auto_alpha_args["init_alpha"] = default_alpha model._model = self.sq.transform( alpha=alpha, From 5084ad61eef3140f2f242c2da7741cd9d586f844 Mon Sep 17 00:00:00 2001 From: chensuyue Date: Fri, 1 Mar 2024 17:46:26 +0800 Subject: [PATCH 3/3] fix corner issue in CI ITREX test Signed-off-by: chensuyue --- .azure-pipelines/scripts/ut/run_itrex.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.azure-pipelines/scripts/ut/run_itrex.sh b/.azure-pipelines/scripts/ut/run_itrex.sh index 111d7175f76..2f9f4ed79c0 100644 --- a/.azure-pipelines/scripts/ut/run_itrex.sh +++ b/.azure-pipelines/scripts/ut/run_itrex.sh @@ -11,8 +11,7 @@ bash /intel-extension-for-transformers/.github/workflows/script/prepare_env.sh bash /intel-extension-for-transformers/.github/workflows/script/install_binary.sh # prepare test env -# tmp install transformers for incompatible issue -pip install transformers +sed -i '/neural-compressor.git/d' /intel-extension-for-transformers/tests/requirements.txt pip install -r /intel-extension-for-transformers/tests/requirements.txt LOG_DIR=/neural-compressor/log_dir mkdir -p ${LOG_DIR}