From ff799ee8884533aa4f5a00ac9023fcde8308f4d2 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Tue, 25 Mar 2025 10:26:09 +0800 Subject: [PATCH 1/4] Freeze 2x package versions in requirements.txt to ensure compatibility Signed-off-by: Sun, Xuehao --- .../quantization/ptq_static/requirements.txt | 4 ++-- test/requirements.txt | 21 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/examples/onnxrt/image_recognition/onnx_model_zoo/resnet50/quantization/ptq_static/requirements.txt b/examples/onnxrt/image_recognition/onnx_model_zoo/resnet50/quantization/ptq_static/requirements.txt index 8dd9d0472a9..db6b2a69ece 100644 --- a/examples/onnxrt/image_recognition/onnx_model_zoo/resnet50/quantization/ptq_static/requirements.txt +++ b/examples/onnxrt/image_recognition/onnx_model_zoo/resnet50/quantization/ptq_static/requirements.txt @@ -3,5 +3,5 @@ onnxruntime torch torchvision onnxruntime-extensions>=1.14.0; python_version < '3.11' -pillow>=8.2.0 # not directly required, pinned by Snyk to avoid a vulnerability -transformers; python_version < '3.11' +pillow<=11.1.0 # not directly required, pinned by Snyk to avoid a vulnerability +transformers<=4.50.0; python_version < '3.11' diff --git a/test/requirements.txt b/test/requirements.txt index cddb5c2b390..37574ab04fd 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -1,21 +1,20 @@ --find-links https://download.pytorch.org/whl/torch_stable.html -accelerate -auto-round +accelerate<=0.21.0 +auto-round<=0.4.6 dynast==1.6.0rc1 -horovod +horovod<=0.27.0 intel-extension-for-pytorch intel-tensorflow>=2.12.0 -mxnet-mkl neural-compressor onnx onnxruntime onnxruntime-extensions; python_version < '3.11' -optimum -peft -tensorflow-addons -tf2onnx -tf_slim +optimum<=1.24.0 +peft<=0.14.0 +tensorflow-addons<=0.23.0 +tf2onnx<=1.16.1 +tf_slim<=1.1.0 torch torchvision -transformers>=4.30.2 -xgboost +transformers<=4.50.0 +xgboost<=2.1.4 From 89edd12ecab9f26e72634f76060e0ed78c368f23 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Tue, 25 Mar 2025 10:28:22 +0800 Subject: [PATCH 2/4] fix Signed-off-by: Sun, Xuehao --- test/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test/requirements.txt b/test/requirements.txt index 37574ab04fd..1bd938cb759 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -5,6 +5,7 @@ dynast==1.6.0rc1 horovod<=0.27.0 intel-extension-for-pytorch intel-tensorflow>=2.12.0 +mxnet-mkl neural-compressor onnx onnxruntime From 13a34e49096388900fbdf16b4afdca316d3ffb18 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Tue, 25 Mar 2025 11:28:18 +0800 Subject: [PATCH 3/4] freeze ut packages version Signed-off-by: Sun, Xuehao --- .azure-pipelines/scripts/ut/env_setup.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.azure-pipelines/scripts/ut/env_setup.sh b/.azure-pipelines/scripts/ut/env_setup.sh index ac3df53d0e8..c230fe417e8 100644 --- a/.azure-pipelines/scripts/ut/env_setup.sh +++ b/.azure-pipelines/scripts/ut/env_setup.sh @@ -37,7 +37,7 @@ fi if [[ "${itex_version}" != "" ]]; then pip install --upgrade intel-extension-for-tensorflow[cpu]==${itex_version} - pip install tf2onnx + pip install tf2onnx==1.16.1 fi if [[ "${pytorch_version}" != "" ]]; then @@ -63,7 +63,7 @@ if [[ "${onnxruntime_version}" != "" ]]; then else pip install onnxruntime-extensions fi - pip install optimum + pip install optimum==1.24.0 fi if [ "${mxnet_version}" != '' ]; then @@ -77,22 +77,22 @@ fi # install special test env requirements # common deps pip install cmake -pip install transformers +pip install transformers==4.50.0 if [[ $(echo "${test_case}" | grep -c "others") != 0 ]];then - pip install tf_slim xgboost accelerate==0.21.0 peft + pip install tf_slim==1.1.0 xgboost==2.1.4 accelerate==0.21.0 peft==0.14.0 elif [[ $(echo "${test_case}" | grep -c "nas") != 0 ]]; then pip install dynast==1.6.0rc1 elif [[ $(echo "${test_case}" | grep -c "tf pruning") != 0 ]]; then - pip install tensorflow-addons + pip install tensorflow-addons==0.23.0 # Workaround # horovod can't be install in the env with TF and PT together # so test distribute cases in the env with single fw installed - pip install horovod + pip install horovod==0.27.0 fi if [[ $(echo "${test_case}" | grep -c "api") != 0 ]] || [[ $(echo "${test_case}" | grep -c "adaptor") != 0 ]]; then - pip install auto-round + pip install auto-round==0.4.6 fi # test deps From b1d5a37dbb58449259f5008284f780950260045f Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Tue, 25 Mar 2025 13:08:12 +0800 Subject: [PATCH 4/4] fix Signed-off-by: Sun, Xuehao --- .azure-pipelines/scripts/ut/env_setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/scripts/ut/env_setup.sh b/.azure-pipelines/scripts/ut/env_setup.sh index c230fe417e8..0905d6efbb2 100644 --- a/.azure-pipelines/scripts/ut/env_setup.sh +++ b/.azure-pipelines/scripts/ut/env_setup.sh @@ -88,7 +88,7 @@ elif [[ $(echo "${test_case}" | grep -c "tf pruning") != 0 ]]; then # Workaround # horovod can't be install in the env with TF and PT together # so test distribute cases in the env with single fw installed - pip install horovod==0.27.0 + pip install horovod fi if [[ $(echo "${test_case}" | grep -c "api") != 0 ]] || [[ $(echo "${test_case}" | grep -c "adaptor") != 0 ]]; then