From 3df2a21c046ddf9834e94dd286668fa57e273dcf Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 4 Dec 2024 10:31:16 +0800 Subject: [PATCH] add import check (#2076) Signed-off-by: Sun, Xuehao --- .azure-pipelines/scripts/ut/3x/run_3x_pt.sh | 6 ++++++ .azure-pipelines/scripts/ut/3x/run_3x_pt_fp8.sh | 6 ++++++ .azure-pipelines/scripts/ut/3x/run_3x_tf.sh | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/.azure-pipelines/scripts/ut/3x/run_3x_pt.sh b/.azure-pipelines/scripts/ut/3x/run_3x_pt.sh index 820fadcb24c..49bafea8bd0 100644 --- a/.azure-pipelines/scripts/ut/3x/run_3x_pt.sh +++ b/.azure-pipelines/scripts/ut/3x/run_3x_pt.sh @@ -3,6 +3,12 @@ python -c "import neural_compressor as nc" test_case="run 3x Torch" echo "${test_case}" +echo "##[section]Run import check" +set -e +python -c "import neural_compressor.torch" +python -c "import neural_compressor.common" +echo "##[section]import check pass" + # install requirements echo "##[group]set up UT env..." export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH diff --git a/.azure-pipelines/scripts/ut/3x/run_3x_pt_fp8.sh b/.azure-pipelines/scripts/ut/3x/run_3x_pt_fp8.sh index f5a24ca8e96..1fb322ae098 100644 --- a/.azure-pipelines/scripts/ut/3x/run_3x_pt_fp8.sh +++ b/.azure-pipelines/scripts/ut/3x/run_3x_pt_fp8.sh @@ -3,6 +3,12 @@ python -c "import neural_compressor as nc" test_case="run 3x Torch Habana FP8" echo "${test_case}" +echo "##[section]Run import check" +set -e +python -c "import neural_compressor.torch" +python -c "import neural_compressor.common" +echo "##[section]import check pass" + # install requirements echo "##[group]set up UT env..." export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH diff --git a/.azure-pipelines/scripts/ut/3x/run_3x_tf.sh b/.azure-pipelines/scripts/ut/3x/run_3x_tf.sh index eeed334c793..82976e6fa1d 100644 --- a/.azure-pipelines/scripts/ut/3x/run_3x_tf.sh +++ b/.azure-pipelines/scripts/ut/3x/run_3x_tf.sh @@ -3,6 +3,12 @@ python -c "import neural_compressor as nc" test_case="run 3x TensorFlow" echo "${test_case}" +echo "##[section]Run import check" +set -e +python -c "import neural_compressor.tensorflow" +python -c "import neural_compressor.common" +echo "##[section]import check pass" + # install requirements echo "##[group]set up UT env..." pip install -r /neural-compressor/test/3x/tensorflow/requirements.txt