Skip to content

Commit a603a49

Browse files
authored
[CI] update scripts (#9547)
1 parent dfbd8f9 commit a603a49

File tree

7 files changed

+41
-6
lines changed

7 files changed

+41
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
protobuf==3.20.2
2-
pydantic==1.10.11
2+
pydantic
33
ray[tune]==2.5.1
44
hyperopt>=0.2.5

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ data
2929
wget
3030
huggingface_hub>=0.19.2
3131
tiktoken
32-
tokenizers
32+
tokenizers>=0.21,<0.22

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ jinja2
2727
regex
2828
numpy<=1.26.4
2929
tiktoken
30-
tokenizers<0.21
30+
tokenizers>=0.21,<0.22

scripts/distribute/run_ci.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,33 @@ function execute_func_list(){
205205
echo -e "\033[31m $(printf '\t') exit 250 tests(intermittent issue) : $exit_250_count \033"
206206
}
207207

208+
function clean_file(){
209+
target_path=$1
210+
matching_data_dirs=$(find "$target_path" -maxdepth 1 -type d -name "*data*")
211+
if [ -n "$matching_data_dirs" ]; then
212+
echo "cleaning data dirs:"
213+
echo $matching_data_dirs
214+
for dir in $matching_data_dirs; do
215+
rm -rf "$dir"
216+
echo "deleted $dir"
217+
done
218+
else
219+
echo "$target_path no data dirs found"
220+
fi
221+
222+
matching_output_dirs=$(find "$target_path" -maxdepth 1 -type d -name "*output*")
223+
if [ -n "$matching_output_dirs" ]; then
224+
echo "cleaning output dirs:"
225+
echo $matching_output_dirs
226+
for dir in $matching_output_dirs; do
227+
rm -rf "$dir"
228+
echo "deleted $dir"
229+
done
230+
else
231+
echo "$target_path no output dirs found"
232+
fi
233+
}
234+
208235
####################################
209236
get_diff_TO_case # 获取待执行case列表
210237
case_list=($(awk -v RS=' ' '!a[$1]++' <<< ${case_list[*]})) # 去重并将结果存储回原列表
@@ -231,6 +258,7 @@ if [[ ${#case_list[*]} -ne 0 ]];then
231258
execute_func_list $cmd llama_auto
232259
export FLAGS_download_data="llama ""$FLAGS_download_data"
233260
let case_num++
261+
clean_file $nlp_dir/llm/auto_parallel/llama
234262
fi
235263
if [[ $(contain_case gpt-3_auto ${case_list[@]}; echo $?) -eq 1 ]];then
236264
echo -e "\033[31m ---- running case $case_num/${#case_list[*]}: gpt-3_auto \033"
@@ -240,6 +268,7 @@ if [[ ${#case_list[*]} -ne 0 ]];then
240268
export FLAGS_install_deps=1
241269
export FLAGS_download_data="gpt ""$FLAGS_download_data"
242270
let case_num++
271+
clean_file $nlp_dir/llm/auto_parallel/gpt-3
243272
fi
244273
if [[ $(contain_case gpt-3_dygraph ${case_list[@]}; echo $?) -eq 1 ]];then
245274
echo -e "\033[31m ---- running case $case_num/${#case_list[*]}: gpt-3_dygraph \033"
@@ -249,6 +278,7 @@ if [[ ${#case_list[*]} -ne 0 ]];then
249278
export FLAGS_install_deps=1
250279
export FLAGS_download_data="gpt ""$FLAGS_download_data"
251280
let case_num++
281+
clean_file $nlp_dir/slm/model_zoo/gpt-3
252282
fi
253283
echo -e "\033[31m ---- end run case \033"
254284

scripts/regression/run_ci.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ install_paddle(){
6666
echo -e "\033[35m ---- Install paddlepaddle-gpu \033[0m"
6767
python -m pip install --user -r scripts/regression/requirements_ci.txt
6868
python -m pip uninstall paddlepaddle -y
69-
python -m pip install --user ${paddle};
70-
python -c "import paddle; print('paddle version:',paddle.__version__,'\npaddle commit:',paddle.version.commit)";
69+
python -m pip install pillow -y
70+
python -m pip install --user ${paddle} --no-cache-dir;
71+
python -c "import paddle;print('paddle')print(paddle.__version__);print(paddle.version.show())" >> ${log_path}/commit_info.txt
7172
python -c 'from visualdl import LogWriter'
7273
}
7374
####################################
@@ -237,6 +238,7 @@ if [[ ${#P0case_list[*]} -ne 0 ]] || [[ ${#APIcase_list[*]} -ne 0 ]];then
237238
echo "instal_nlp_pr"
238239
python -m pip install dist/p****.whl
239240
fi
241+
python -c "import paddlenlp; print('paddlenlp commit:',paddlenlp.version.commit)" >> ${log_path}/commit_info.txt
240242
python -m pip list
241243
echo -e "\033[35m =======CI Check P0case========= \033[0m"
242244
echo -e "\033[35m ---- P0case_list length: ${#P0case_list[*]}, cases: ${P0case_list[*]} \033[0m"

scripts/unit_test/ci_unit.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ install_requirements() {
3131
python -m pip install -r tests/requirements.txt
3232
python -m pip install -r paddlenlp/experimental/autonlp/requirements.txt
3333
python -m pip uninstall paddlepaddle paddlepaddle_gpu -y
34+
python -m pip install pillow -y
3435
python -m pip install --no-cache-dir ${paddle}
36+
python -c "import paddle;print('paddle')print(paddle.__version__);print(paddle.version.show())" >> ${log_path}/commit_info.txt
3537

3638
python setup.py bdist_wheel > /dev/null
3739
python -m pip install dist/p****.whl
40+
python -c "import paddlenlp; print('paddlenlp commit:',paddlenlp.version.commit)" >> ${log_path}/commit_info.txt
3841
cd csrc/
3942
python setup_cuda.py install
4043
cd ../

tests/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ torch>=1.5
55
transformers
66
fast_dataindex
77
sacremoses
8-
pydantic==1.10.9
8+
pydantic
99
modelscope
1010
hyperopt
1111
h5py

0 commit comments

Comments
 (0)