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} diff --git a/neural_compressor/adaptor/pytorch.py b/neural_compressor/adaptor/pytorch.py index 314cd800043..3892a659b33 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,