Skip to content

Commit c101f91

Browse files
skip maici in weekly cpu test
Signed-off-by: Yiheng Wang <[email protected]>
1 parent 05e1239 commit c101f91

File tree

1 file changed

+34
-20
lines changed

1 file changed

+34
-20
lines changed

ci/run_regular_tests_cpu.sh

+34-20
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,44 @@ elif [[ $# -gt 1 ]]; then
3030
exit 1
3131
fi
3232

33+
# Usually, CPU test is required, but for some bundles that are too large to run in Github Actions, we can exclude them.
34+
exclude_test_list=("maisi_ct_generative")
35+
is_excluded() {
36+
for item in "${exclude_list[@]}"; do
37+
if [ "$1" == "$item" ]; then
38+
return 0 # Return true (0) if excluded
39+
fi
40+
done
41+
return 1 # Return false (1) if not excluded
42+
}
43+
3344
verify_release_bundle() {
3445
echo 'Run verify bundle...'
35-
# get all bundles
36-
download_path="download"
37-
pip install git+https://github.com/Project-MONAI/MONAI.git@dev # project-monai/model-zoo issue #505
38-
pip install jsonschema gdown huggingface_hub==0.29.3
39-
# download bundle from releases
40-
python $(pwd)/ci/download_latest_bundle.py --b "$bundle" --models_path $(pwd)/models --p "$download_path"
41-
# get required libraries according to the bundle's metadata file
42-
requirements_file="requirements_$bundle.txt"
43-
python $(pwd)/ci/get_bundle_requirements.py --b "$bundle" --requirements_file "$requirements_file"
44-
# check if ALLOW_MONAI_RC is set to 1, if so, append --pre to the pip install command
45-
if [ $ALLOW_MONAI_RC = true ]; then
46-
include_pre_release="--pre"
46+
if is_excluded "$bundle"; then
47+
echo "skip '$bundle' weekly cpu tests."
4748
else
48-
include_pre_release=""
49-
fi
50-
# Check if the requirements file exists and is not empty
51-
if [ -s "$requirements_file" ]; then
52-
echo "install required libraries for bundle: $bundle"
53-
pip install $include_pre_release -r "$requirements_file"
49+
download_path="download"
50+
pip install git+https://github.com/Project-MONAI/MONAI.git@dev # project-monai/model-zoo issue #505
51+
pip install jsonschema gdown huggingface_hub==0.29.3
52+
# download bundle from releases
53+
python $(pwd)/ci/download_latest_bundle.py --b "$bundle" --models_path $(pwd)/models --p "$download_path"
54+
# get required libraries according to the bundle's metadata file
55+
requirements_file="requirements_$bundle.txt"
56+
python $(pwd)/ci/get_bundle_requirements.py --b "$bundle" --requirements_file "$requirements_file"
57+
# check if ALLOW_MONAI_RC is set to 1, if so, append --pre to the pip install command
58+
if [ $ALLOW_MONAI_RC = true ]; then
59+
include_pre_release="--pre"
60+
else
61+
include_pre_release=""
62+
fi
63+
# Check if the requirements file exists and is not empty
64+
if [ -s "$requirements_file" ]; then
65+
echo "install required libraries for bundle: $bundle"
66+
pip install $include_pre_release -r "$requirements_file"
67+
fi
68+
# verify bundle
69+
python $(pwd)/ci/verify_bundle.py -b "$bundle" -p "$download_path" -m "regular" # regular tests on cpu
5470
fi
55-
# verify bundle
56-
python $(pwd)/ci/verify_bundle.py -b "$bundle" -p "$download_path" -m "regular" # regular tests on cpu
5771
}
5872

5973

0 commit comments

Comments
 (0)