@@ -30,30 +30,44 @@ elif [[ $# -gt 1 ]]; then
30
30
exit 1
31
31
fi
32
32
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
+
33
44
verify_release_bundle () {
34
45
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."
47
48
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
54
70
fi
55
- # verify bundle
56
- python $( pwd) /ci/verify_bundle.py -b " $bundle " -p " $download_path " -m " regular" # regular tests on cpu
57
71
}
58
72
59
73
0 commit comments