Skip to content

Commit 20f63b2

Browse files
Test PaddleX (PaddlePaddle#1376)
1 parent 2f4a262 commit 20f63b2

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

backends/mlu/tools/pr_ci_mlu.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,49 @@ function main() {
259259
if [[ "$EXIT_CODE" != "0" ]];then
260260
show_ut_retry_result
261261
fi
262+
263+
# PaddleX test
264+
unset MLU_VISIBLE_DEVICES
265+
echo "Start Download"
266+
git clone --depth 1000 https://gitee.com/PaddlePaddle/PaddleX.git
267+
cd PaddleX
268+
pip install -e .
269+
paddlex --install PaddleClas
270+
paddlex --install PaddleSeg
271+
272+
wget -q https://paddle-model-ecology.bj.bcebos.com/paddlex/data/cls_flowers_examples.tar -P ./dataset
273+
tar -xf ./dataset/cls_flowers_examples.tar -C ./dataset/
274+
wget -q https://paddle-model-ecology.bj.bcebos.com/paddlex/data/seg_optic_examples.tar -P ./dataset
275+
tar -xf ./dataset/seg_optic_examples.tar -C ./dataset/
276+
echo "End Download"
277+
278+
echo "Start PaddleX ResNet50"
279+
python main.py -c paddlex/configs/image_classification/ResNet50.yaml \
280+
-o Global.mode=train \
281+
-o Global.dataset_dir=./dataset/cls_flowers_examples \
282+
-o Global.output=resnet50_output \
283+
-o Global.device="mlu:0,1,2,3"
284+
285+
python main.py -c paddlex/configs/image_classification/ResNet50.yaml \
286+
-o Global.mode=predict \
287+
-o Predict.model_dir="./resnet50_output/best_model" \
288+
-o Predict.input_path="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg" \
289+
-o Global.device="mlu:0"
290+
echo "End PaddleX ResNet50"
291+
292+
echo "Start DeepLabv3"
293+
python main.py -c paddlex/configs/semantic_segmentation/Deeplabv3_Plus-R50.yaml \
294+
-o Global.mode=train \
295+
-o Global.dataset_dir=./dataset/seg_optic_examples \
296+
-o Global.output=deeplabv3p_output \
297+
-o Global.device="mlu:0,1,2,3"
298+
299+
python main.py -c paddlex/configs/semantic_segmentation/Deeplabv3_Plus-R50.yaml \
300+
-o Global.mode=predict \
301+
-o Predict.model_dir="./deeplabv3p_output/best_model/model/" \
302+
-o Predict.input_path="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_semantic_segmentation_001.jpg" \
303+
-o Global.device="mlu:0"
304+
echo "End DeepLabv3"
262305
}
263306

264307
main $@

backends/npu/tools/pr_ci_npu.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ function main() {
361361
if [[ "${WITH_COVERAGE:-OFF}" == "ON" ]];then
362362
bash ${CODE_ROOT}/tools/coverage/coverage_process.sh
363363
fi
364-
365364
}
366365

367366
main $@

0 commit comments

Comments
 (0)