From 949aad4312d7a9f6016b8f2b8cfb885c89b7d3ce Mon Sep 17 00:00:00 2001 From: ShawnXuan Date: Thu, 9 Nov 2023 08:30:26 +0800 Subject: [PATCH 01/12] first try --- .github/workflows/.test.yml.swp | Bin 0 -> 12288 bytes .github/workflows/test.yml | 53 ++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/.test.yml.swp create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/.test.yml.swp b/.github/workflows/.test.yml.swp new file mode 100644 index 0000000000000000000000000000000000000000..f0939f1cccf3131b40b9048b58be5da44fea9da4 GIT binary patch literal 12288 zcmeI2&x<2P6vt}?!F6|4^dyKpGsEsG)1BFM7uJ?hG45ey#vNx=ghfK7yOOl&RQ1%4 z%)~Kx^5!3)Uc7qnrU&&8@GK}IdJ;W|XD{CTR(CR!2~4~RyHvqCSQkf`BGe%$Eb(;H14}3(^w8GeUJS>(64%R>*5LiyY*=}^>0({CcXd(dmpi_kjs>p8}Lfxd)3gYH1jL1&={pudpMPtaG;Cy>uiLZJl$ zfj}S-2m}IwKp+qZ{I3M)sIB-<9d7!hos3PN9a+em7G9T(q%`r7Dc<{w!eG|qTv7&Q&b*%EJmC~+Gtp= zd&0K;N>>jL5m}TbE_JM&EuA%SM{}9>X)vS`b2t)GD0|GoO)2`-&P# zVuX$ANh$yvLtl2AB&(OJ0jq~~`E4vlLfW`=MbXw`&-oHuo7+N6o<3gC!dmhyp;Awm zJHxvxEV+`lcc_}Ensa_xo@+uLfsmuPb-TTF`<0uUyY1bb)?_l5x)$Af*y-!*3!dQ+ zaX>rai1OkbJjRv(f4KW%B_WnWb?3x-0J)wp7wzlE}T`Fs)p7Vqos-h2Z?goRT|@wD)Elb1)GVh zMn*ZE3V8TA+V84P!tlo=etS=BWOAH6Ho3B=INhR%av7Cc^|Ua+X|?mwdRn;>ZwMOs zrB3PiWU(KqlBv^L$aGu;_7K)Lf0A)Ka84_p%=gt7 zZMLPK{>MkD;x!tMGh?(6bk-Y=g zp}==QyUrJ{06873N+CtIhV_nev48C3dw4c(V?)sCZEIx4_@2;8=I@C$amA^-pY literal 0 HcmV?d00001 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..5164e981 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,53 @@ +name: Build and Test CI +on: + pull_request: + types: [opened, review_requested, ready_for_review, synchronize, unlocked] + merge_group: + types: [checks_requested] + workflow_call: + inputs: + is_priv: + required: true + type: boolean + branch: + required: false + type: string + default: "main" + +concurrency: + group: test-${{ github.ref }} + cancel-in-progress: true + +env: + CO_MODELS_SRC: CoModels + +jobs: + test_job: + name: Collect information about PR and source + #runs-on: ${{ matrix.runs-on }} # todo + runs-on: ubuntu-latest + if: github.event.pull_request.draft == false && github.base_ref == 'main' + steps: + - name: Check out CoModels + uses: actions/checkout@v4 + with: + repository: ${{github.event.pull_request.head.repo.full_name}} + ref: ${{ github.event.pull_request.head.sha }} + path: ${{ env.CO_MODELS_SRC}} + + - name: Set up PR model name + id: pr + run: | + echo "::set-output name=model::$(echo ${github.event.pull_request.title})" + + #- name: Prepare directories + # run: | + # rel_path="target_dir/${{ steps.pr.outputs.branch }}" + # mkdir -p $rel_path + # cp -rL $rel_path standalone-dir/ + + #- name: Run script + # run: | + # cd standalone-dir/ + # bash run.sh + From 0798121f8d91d95a3f83cafa0fefb3e7e9252c25 Mon Sep 17 00:00:00 2001 From: ShawnXuan Date: Sun, 11 Aug 2024 20:49:36 +0800 Subject: [PATCH 02/12] support 3rd party test --- test/Dockerfile | 12 +++++++++ test/README.md | 14 ++++++++++ test/build.sh | 5 ++++ test/cv_cls_test.sh | 58 +++++++++++++++++++++++++++++++++++++++++ test/cv_det_test.sh | 60 +++++++++++++++++++++++++++++++++++++++++++ test/launch.sh | 21 +++++++++++++++ test/requirements.txt | 11 ++++++++ 7 files changed, 181 insertions(+) create mode 100644 test/Dockerfile create mode 100644 test/README.md create mode 100755 test/build.sh create mode 100755 test/cv_cls_test.sh create mode 100755 test/cv_det_test.sh create mode 100755 test/launch.sh create mode 100644 test/requirements.txt diff --git a/test/Dockerfile b/test/Dockerfile new file mode 100644 index 00000000..227933d0 --- /dev/null +++ b/test/Dockerfile @@ -0,0 +1,12 @@ +FROM oneflowinc/oneflow:0.9.1.dev20240203-cuda11.8 + +RUN python3 -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple + +COPY requirements.txt /tmp/requirements.txt +RUN python3 -m pip install --no-cache-dir -r /tmp/requirements.txt + +RUN python3 -m pip install --pre oneflow -f https://oneflow-staging.oss-cn-beijing.aliyuncs.com/branch/master/cu118 + +WORKDIR /workspace + +RUN rm /tmp/requirements.txt diff --git a/test/README.md b/test/README.md new file mode 100644 index 00000000..9412e5a3 --- /dev/null +++ b/test/README.md @@ -0,0 +1,14 @@ +## cv_cls_test.sh + +### 介绍 +`cv_cls_test.sh` 是一个用于处理 `cv/classification` 目录下子目录的 Bash 脚本。根据用户提供的参数,该脚本可以对所有子目录、随机选取的子目录或前 n 个子目录进行操作。 + +### 脚本功能 +1. **复制子目录**:将指定的子目录内容复制到 `/workspace/temp_model` 目录下。 +2. **进入工作目录**:进入 `/workspace/temp_model` 目录。 +3. **运行脚本**:执行该目录下的脚本(`infer.sh`缺省脚本)。 + +### 使用方法 + +```bash +./cv_cls_test.sh {all|random|n} {infer.sh|train.sh} diff --git a/test/build.sh b/test/build.sh new file mode 100755 index 00000000..53571340 --- /dev/null +++ b/test/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash +IMAGE_NAME="oneflow_comodels_test:0.1" + +docker build -t $IMAGE_NAME . + diff --git a/test/cv_cls_test.sh b/test/cv_cls_test.sh new file mode 100755 index 00000000..0ef17612 --- /dev/null +++ b/test/cv_cls_test.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +EXEC=${2:-infer.sh} +SUB_DIR_PATH="/workspace/CoModels/cv/classification" +WORKSPACE="/workspace/temp_model" + +if [ $# -ne 1 ]; then + echo "Usage: $0 {all|random|n}" + exit 1 +fi + +option="$1" + +subdirs=($(find "$SUB_DIR_PATH" -mindepth 1 -maxdepth 1 -type d)) + +process_subdir() { + local dir="$1" + + rm -rf "$WORKSPACE" + mkdir -p "$WORKSPACE" + + cp -rL "$dir"/* "$WORKSPACE" + + cd "$WORKSPACE" + + if [ -f "./$EXEC" ]; then + bash ./$EXEC + else + echo "$EXEC not found in $WORKSPACE" + fi + + cd - > /dev/null +} + +case "$option" in + "all") + for dir in "${subdirs[@]}"; do + process_subdir "$dir" + done + ;; + "random") + random_index=$((RANDOM % ${#subdirs[@]})) + process_subdir "${subdirs[$random_index]}" + ;; + [0-9]*) + n="$option" + for ((i=0; i /dev/null +} + +case "$option" in + "all") + for dir in "${subdirs[@]}"; do + process_subdir "$dir" + done + ;; + "random") + random_index=$((RANDOM % ${#subdirs[@]})) + process_subdir "${subdirs[$random_index]}" + ;; + [0-9]*) + n="$option" + for ((i=0; i Date: Sun, 11 Aug 2024 21:02:56 +0800 Subject: [PATCH 03/12] rm workflow --- .github/workflows/.test.yml.swp | Bin 12288 -> 0 bytes .github/workflows/test.yml | 53 -------------------------------- 2 files changed, 53 deletions(-) delete mode 100644 .github/workflows/.test.yml.swp delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/.test.yml.swp b/.github/workflows/.test.yml.swp deleted file mode 100644 index f0939f1cccf3131b40b9048b58be5da44fea9da4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2&x<2P6vt}?!F6|4^dyKpGsEsG)1BFM7uJ?hG45ey#vNx=ghfK7yOOl&RQ1%4 z%)~Kx^5!3)Uc7qnrU&&8@GK}IdJ;W|XD{CTR(CR!2~4~RyHvqCSQkf`BGe%$Eb(;H14}3(^w8GeUJS>(64%R>*5LiyY*=}^>0({CcXd(dmpi_kjs>p8}Lfxd)3gYH1jL1&={pudpMPtaG;Cy>uiLZJl$ zfj}S-2m}IwKp+qZ{I3M)sIB-<9d7!hos3PN9a+em7G9T(q%`r7Dc<{w!eG|qTv7&Q&b*%EJmC~+Gtp= zd&0K;N>>jL5m}TbE_JM&EuA%SM{}9>X)vS`b2t)GD0|GoO)2`-&P# zVuX$ANh$yvLtl2AB&(OJ0jq~~`E4vlLfW`=MbXw`&-oHuo7+N6o<3gC!dmhyp;Awm zJHxvxEV+`lcc_}Ensa_xo@+uLfsmuPb-TTF`<0uUyY1bb)?_l5x)$Af*y-!*3!dQ+ zaX>rai1OkbJjRv(f4KW%B_WnWb?3x-0J)wp7wzlE}T`Fs)p7Vqos-h2Z?goRT|@wD)Elb1)GVh zMn*ZE3V8TA+V84P!tlo=etS=BWOAH6Ho3B=INhR%av7Cc^|Ua+X|?mwdRn;>ZwMOs zrB3PiWU(KqlBv^L$aGu;_7K)Lf0A)Ka84_p%=gt7 zZMLPK{>MkD;x!tMGh?(6bk-Y=g zp}==QyUrJ{06873N+CtIhV_nev48C3dw4c(V?)sCZEIx4_@2;8=I@C$amA^-pY diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 5164e981..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Build and Test CI -on: - pull_request: - types: [opened, review_requested, ready_for_review, synchronize, unlocked] - merge_group: - types: [checks_requested] - workflow_call: - inputs: - is_priv: - required: true - type: boolean - branch: - required: false - type: string - default: "main" - -concurrency: - group: test-${{ github.ref }} - cancel-in-progress: true - -env: - CO_MODELS_SRC: CoModels - -jobs: - test_job: - name: Collect information about PR and source - #runs-on: ${{ matrix.runs-on }} # todo - runs-on: ubuntu-latest - if: github.event.pull_request.draft == false && github.base_ref == 'main' - steps: - - name: Check out CoModels - uses: actions/checkout@v4 - with: - repository: ${{github.event.pull_request.head.repo.full_name}} - ref: ${{ github.event.pull_request.head.sha }} - path: ${{ env.CO_MODELS_SRC}} - - - name: Set up PR model name - id: pr - run: | - echo "::set-output name=model::$(echo ${github.event.pull_request.title})" - - #- name: Prepare directories - # run: | - # rel_path="target_dir/${{ steps.pr.outputs.branch }}" - # mkdir -p $rel_path - # cp -rL $rel_path standalone-dir/ - - #- name: Run script - # run: | - # cd standalone-dir/ - # bash run.sh - From 624ab2b6416cf5169eb090f6170f0c6aa0314ef4 Mon Sep 17 00:00:00 2001 From: ShawnXuan Date: Mon, 12 Aug 2024 09:39:46 +0800 Subject: [PATCH 04/12] add test face recgization --- test/cv_face_test.sh | 58 +++++++++++++++++++++++++++++++++++++++++++ test/launch.sh | 1 + test/requirements.txt | 1 + 3 files changed, 60 insertions(+) create mode 100755 test/cv_face_test.sh diff --git a/test/cv_face_test.sh b/test/cv_face_test.sh new file mode 100755 index 00000000..529c5b9e --- /dev/null +++ b/test/cv_face_test.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +EXEC=${2:-val.sh} +SUB_DIR_PATH="/workspace/CoModels/cv/Face_Recognition" +WORKSPACE="/workspace/temp_model" + +if [ $# -ne 1 ]; then + echo "Usage: $0 {all|random|n}" + exit 1 +fi + +option="$1" + +subdirs=("iresnet50" "iresnet101") + +process_subdir() { + local dir="$1" + + rm -rf "$WORKSPACE" + mkdir -p "$WORKSPACE" + + cp -rL "$dir"/* "$WORKSPACE" + + cd "$WORKSPACE" + + if [ -f "./$EXEC" ]; then + bash ./$EXEC + else + echo "$EXEC not found in $WORKSPACE" + fi + + cd - > /dev/null +} + +case "$option" in + "all") + for dir in "${subdirs[@]}"; do + process_subdir "$dir" + done + ;; + "random") + random_index=$((RANDOM % ${#subdirs[@]})) + process_subdir "${subdirs[$random_index]}" + ;; + [0-9]*) + n="$option" + for ((i=0; i Date: Mon, 12 Aug 2024 11:29:37 +0800 Subject: [PATCH 05/12] neural style transfer --- test/cv_neu_test.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 test/cv_neu_test.sh diff --git a/test/cv_neu_test.sh b/test/cv_neu_test.sh new file mode 100644 index 00000000..8e1efdcc --- /dev/null +++ b/test/cv_neu_test.sh @@ -0,0 +1,2 @@ +cd /workspace/CoModels/cv/Neural_Style_Transfer +bash neural_style.sh From 0a8181568d2e47b68271c001aef974ddcdc32544 Mon Sep 17 00:00:00 2001 From: ShawnXuan Date: Mon, 12 Aug 2024 12:00:27 +0800 Subject: [PATCH 06/12] cv detection --- test/cv_det_test.sh | 4 +--- test/launch.sh | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/cv_det_test.sh b/test/cv_det_test.sh index 7de06bd9..bb3357d6 100755 --- a/test/cv_det_test.sh +++ b/test/cv_det_test.sh @@ -1,7 +1,7 @@ #!/bin/bash EXEC=${2:-infer.sh} -SUB_DIR_PATH="/workspace/CoModels/cv/detection" +SUB_DIR_PATH="/data/xiexuan/git-repos/CoModels/cv/segment" WORKSPACE="/workspace/temp_model" if [ $# -ne 1 ]; then @@ -20,8 +20,6 @@ process_subdir() { mkdir -p "$WORKSPACE" cp -rL "$dir"/* "$WORKSPACE" - cp -rL "$SUB_DIR_PATH/retinanet_resnet50_fpn" "$WORKSPACE" - cp -rL "$SUB_DIR_PATH/fcos_resnet50_fpn" "$WORKSPACE" cd "$WORKSPACE" diff --git a/test/launch.sh b/test/launch.sh index 044560d2..b5532cc4 100755 --- a/test/launch.sh +++ b/test/launch.sh @@ -8,6 +8,7 @@ docker run -it --rm --runtime=nvidia --privileged \ --ipc=host \ -v /data:/data \ -v /data/dataset/coco:/dataset/mscoco_2017 \ + -v /data/dataset/coco:/dataset/coco \ -v /data/dataset/ms1m-retinaface-t1:/train_tmp/ms1m-retinaface-t1 \ -v $parent_dir:/workspace/CoModels \ -v $parent_dir/cached_models:/root/.oneflow \ From 0fb7f74f8ea5481399f81cdd8b3a343bacb92086 Mon Sep 17 00:00:00 2001 From: ShawnXuan Date: Mon, 12 Aug 2024 15:52:32 +0800 Subject: [PATCH 07/12] libai test --- test/Dockerfile | 8 ++++++ test/nlp_libai_test.sh | 58 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100755 test/nlp_libai_test.sh diff --git a/test/Dockerfile b/test/Dockerfile index 227933d0..557567d1 100644 --- a/test/Dockerfile +++ b/test/Dockerfile @@ -10,3 +10,11 @@ RUN python3 -m pip install --pre oneflow -f https://oneflow-staging.oss-cn-beiji WORKDIR /workspace RUN rm /tmp/requirements.txt + +RUN apt-get update && apt-get install -y git \ + && rm -rf /var/lib/apt/lists/* + +RUN git clone https://github.com/Oneflow-Inc/libai.git /opt/libai \ + && cd /opt/libai \ + && pip3 install -r requirements.txt \ + && pip3 install -e /opt/libai diff --git a/test/nlp_libai_test.sh b/test/nlp_libai_test.sh new file mode 100755 index 00000000..2a89f33d --- /dev/null +++ b/test/nlp_libai_test.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +EXEC=${2:-train.sh} +SUB_DIR_PATH="/workspace/CoModels/nlp/libai" +WORKSPACE="/workspace/temp_model" + +if [ $# -ne 1 ]; then + echo "Usage: $0 {all|random|n}" + exit 1 +fi + +option="$1" + +subdirs=($(find "$SUB_DIR_PATH" -mindepth 1 -maxdepth 1 -type d)) + +process_subdir() { + local dir="$1" + + rm -rf "$WORKSPACE" + mkdir -p "$WORKSPACE" + + cp -rL "$dir"/* "$WORKSPACE" + + cd "$WORKSPACE" + + if [ -f "./$EXEC" ]; then + bash ./$EXEC + else + echo "$EXEC not found in $WORKSPACE" + fi + + cd - > /dev/null +} + +case "$option" in + "all") + for dir in "${subdirs[@]}"; do + process_subdir "$dir" + done + ;; + "random") + random_index=$((RANDOM % ${#subdirs[@]})) + process_subdir "${subdirs[$random_index]}" + ;; + [0-9]*) + n="$option" + for ((i=0; i Date: Mon, 12 Aug 2024 16:00:35 +0800 Subject: [PATCH 08/12] update --- test/nlp_libai_test.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/nlp_libai_test.sh b/test/nlp_libai_test.sh index 2a89f33d..28bfb46f 100755 --- a/test/nlp_libai_test.sh +++ b/test/nlp_libai_test.sh @@ -1,6 +1,5 @@ #!/bin/bash -EXEC=${2:-train.sh} SUB_DIR_PATH="/workspace/CoModels/nlp/libai" WORKSPACE="/workspace/temp_model" @@ -23,10 +22,15 @@ process_subdir() { cd "$WORKSPACE" - if [ -f "./$EXEC" ]; then - bash ./$EXEC + if [ -f "./train.sh" ]; then + bash ./train.sh else - echo "$EXEC not found in $WORKSPACE" + echo "train.sh not found in $WORKSPACE" + fi + if [ -f "./infer.sh" ]; then + bash ./infer.sh + else + echo "infer.sh not found in $WORKSPACE" fi cd - > /dev/null From 458bb86a9676b70bbba8fa6f9df9c26b15066042 Mon Sep 17 00:00:00 2001 From: ShawnXuan Date: Mon, 12 Aug 2024 16:37:14 +0800 Subject: [PATCH 09/12] nlp test --- test/cv_face_test.sh | 2 +- test/nlp_test.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100755 test/nlp_test.sh diff --git a/test/cv_face_test.sh b/test/cv_face_test.sh index 529c5b9e..7e0f0907 100755 --- a/test/cv_face_test.sh +++ b/test/cv_face_test.sh @@ -14,7 +14,7 @@ option="$1" subdirs=("iresnet50" "iresnet101") process_subdir() { - local dir="$1" + local dir="$SUB_DIR_PATH/$1" rm -rf "$WORKSPACE" mkdir -p "$WORKSPACE" diff --git a/test/nlp_test.sh b/test/nlp_test.sh new file mode 100755 index 00000000..8960375c --- /dev/null +++ b/test/nlp_test.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +EXEC=${2:-train.sh} +SUB_DIR_PATH="/workspace/CoModels/nlp" +WORKSPACE="/workspace/temp_model" + +if [ $# -ne 1 ]; then + echo "Usage: $0 {all|random|n}" + exit 1 +fi + +option="$1" + +subdirs=("odd_numbers") + +process_subdir() { + local dir="$SUB_DIR_PATH/$1" + + rm -rf "$WORKSPACE" + mkdir -p "$WORKSPACE" + + cp -rL "$dir"/* "$WORKSPACE" + + cd "$WORKSPACE" + + if [ -f "./$EXEC" ]; then + bash ./$EXEC + else + echo "$EXEC not found in $WORKSPACE" + fi + + cd - > /dev/null +} + +case "$option" in + "all") + for dir in "${subdirs[@]}"; do + process_subdir "$dir" + done + ;; + "random") + random_index=$((RANDOM % ${#subdirs[@]})) + process_subdir "${subdirs[$random_index]}" + ;; + [0-9]*) + n="$option" + for ((i=0; i Date: Mon, 12 Aug 2024 17:53:28 +0800 Subject: [PATCH 10/12] science test --- test/requirements.txt | 3 +++ test/science_test.sh | 58 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100755 test/science_test.sh diff --git a/test/requirements.txt b/test/requirements.txt index e0546d41..c67a9c1e 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -10,3 +10,6 @@ flowvision termcolor pycocotools easydict +pyevtk==1.6.0 +vtk==9.2.6 +wget==3.2 diff --git a/test/science_test.sh b/test/science_test.sh new file mode 100755 index 00000000..70e0567f --- /dev/null +++ b/test/science_test.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +EXEC=${2:-train.sh} +SUB_DIR_PATH="/workspace/CoModels/science" +WORKSPACE="/workspace/temp_model" + +if [ $# -ne 1 ]; then + echo "Usage: $0 {all|random|n}" + exit 1 +fi + +option="$1" + +subdirs=("ldc" "lorenz_system") + +process_subdir() { + local dir="$SUB_DIR_PATH/$1" + + rm -rf "$WORKSPACE" + mkdir -p "$WORKSPACE" + + cp -rL "$dir"/* "$WORKSPACE" + + cd "$WORKSPACE" + + if [ -f "./$EXEC" ]; then + bash ./$EXEC + else + echo "$EXEC not found in $WORKSPACE" + fi + + cd - > /dev/null +} + +case "$option" in + "all") + for dir in "${subdirs[@]}"; do + process_subdir "$dir" + done + ;; + "random") + random_index=$((RANDOM % ${#subdirs[@]})) + process_subdir "${subdirs[$random_index]}" + ;; + [0-9]*) + n="$option" + for ((i=0; i Date: Mon, 12 Aug 2024 18:56:05 +0800 Subject: [PATCH 11/12] update README --- test/README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/README.md b/test/README.md index 9412e5a3..fdf1b3e0 100644 --- a/test/README.md +++ b/test/README.md @@ -1,3 +1,21 @@ +## 文件说明 +``` +. +├── README.md +├── requirements.txt # 构建镜像所需的依赖 +├── Dockerfile # 定义Docker镜像内容的文本文件 +├── build.sh # 构建镜像命令 +├── launch.sh # 启动容器命令 +├── cv_cls_test.sh # 测试计算机视觉相关的分类模型 +├── cv_det_test.sh # 测试计算机视觉相关的检测模型 +├── cv_face_test.sh # 测试计算机视觉相关的人脸识别模型 +├── cv_neu_test.sh # 测试计算机视觉相关的风格转换模型 +├── nlp_libai_test.sh # 测试自然语言相关OneFlow Libai中的模型 +├── nlp_test.sh # 测试自然语言相关的模型 +└── science_test.sh # 测试科学计算相关的模型 + +``` +下面只解释其中一个测试脚本,其它脚本,参数和使用方法相同。 ## cv_cls_test.sh ### 介绍 @@ -12,3 +30,7 @@ ```bash ./cv_cls_test.sh {all|random|n} {infer.sh|train.sh} + +build.sh cv_face_test.sh launch.sh README.md +cv_cls_test.sh cv_neu_test.sh nlp_libai_test.sh requirements.txt +cv_det_test.sh Dockerfile nlp_test.sh science_test.sh From 78fabdb1844403f6cb4ff1f6910cd09458956ae0 Mon Sep 17 00:00:00 2001 From: ShawnXuan Date: Wed, 11 Dec 2024 10:08:49 +0800 Subject: [PATCH 12/12] generate model tests list --- gen_names.sh | 66 ++++++++++++++ model_test_list.txt | 211 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 277 insertions(+) create mode 100755 gen_names.sh create mode 100644 model_test_list.txt diff --git a/gen_names.sh b/gen_names.sh new file mode 100755 index 00000000..e9f35d8b --- /dev/null +++ b/gen_names.sh @@ -0,0 +1,66 @@ +#!/bin/bash +for subdir in "cv/classification"/*/; do + if [ -d "$subdir" ]; then + dirname=$(basename "$subdir") + if [[ "$dirname" == "data" || "$dirname" == "configs" ]]; then + continue + fi + echo "基于$dirname的图像分类模型测试" + fi +done + +for subdir in "cv/detection"/*/; do + if [ -d "$subdir" ]; then + dirname=$(basename "$subdir") + echo "基于$dirname的目标检测模型测试" + fi +done + +for subdir in "cv/segment"/*/; do + if [ -d "$subdir" ]; then + dirname=$(basename "$subdir") + echo "基于$dirname的实体分割模型测试" + fi +done + +for subdir in "cv/Face_Recognition"/*/; do + if [ -d "$subdir" ]; then + dirname=$(basename "$subdir") + if [[ "$dirname" == "backbones" || "$dirname" == "configs" ]]; then + continue + fi + if [[ "$dirname" == "eval" || "$dirname" == "tools" ]]; then + continue + fi + if [[ "$dirname" == "utils" ]]; then + continue + fi + echo "基于$dirname的人脸识别模型测试" + fi +done + +# cv/Neural_Style_Transfer +echo "基于神经网络风格迁移模型测试" + +for subdir in "nlp/libai"/*/; do + if [ -d "$subdir" ]; then + dirname=$(basename "$subdir") + echo "基于$dirname的自然语言模型测试" + fi +done + +# nlp/text_classfication +echo "基于transformer的文本分类模型测试" + + +for subdir in "science"/*/; do + if [ -d "$subdir" ]; then + dirname=$(basename "$subdir") + echo "基于$dirname的科学计算模型测试" + fi +done + + + + + diff --git a/model_test_list.txt b/model_test_list.txt new file mode 100644 index 00000000..397a8862 --- /dev/null +++ b/model_test_list.txt @@ -0,0 +1,211 @@ +基于alexnet的图像分类模型测试 +基于cait_M36_384的图像分类模型测试 +基于cait_M48_448的图像分类模型测试 +基于cait_S24_224的图像分类模型测试 +基于cait_S24_384的图像分类模型测试 +基于cait_S36_384的图像分类模型测试 +基于cait_XS24_384的图像分类模型测试 +基于convmixer_1024_20的图像分类模型测试 +基于convmixer_1536_20的图像分类模型测试 +基于convmixer_768_32_relu的图像分类模型测试 +基于convnext_tiny_224的图像分类模型测试 +基于crossformer_b的图像分类模型测试 +基于crossformer_l的图像分类模型测试 +基于crossformer_s的图像分类模型测试 +基于crossformer_t的图像分类模型测试 +基于deit_3_base_384_1k的图像分类模型测试 +基于deit_base_distilled_patch16_224的图像分类模型测试 +基于deit_base_distilled_patch16_384的图像分类模型测试 +基于deit_base_patch16_224的图像分类模型测试 +基于deit_base_patch16_384的图像分类模型测试 +基于deit_base_patch16_LS_224的图像分类模型测试 +基于deit_base_patch16_LS_224_in21k的图像分类模型测试 +基于deit_base_patch16_LS_384_in21k的图像分类模型测试 +基于deit_huge_patch14_LS_224的图像分类模型测试 +基于deit_huge_patch14_LS_224_in21k的图像分类模型测试 +基于deit_large_patch16_LS_224的图像分类模型测试 +基于deit_large_patch16_LS_384的图像分类模型测试 +基于deit_large_patch16_LS_384_in21k的图像分类模型测试 +基于deit_small_distilled_patch16_224的图像分类模型测试 +基于deit_small_patch16_224的图像分类模型测试 +基于deit_small_patch16_LS_224的图像分类模型测试 +基于deit_small_patch16_LS_224_in21k的图像分类模型测试 +基于deit_small_patch16_LS_384的图像分类模型测试 +基于deit_small_patch16_LS_384_in21k的图像分类模型测试 +基于deit_tiny_distilled_patch16_224的图像分类模型测试 +基于deit_tiny_patch16_224的图像分类模型测试 +基于densenet121的图像分类模型测试 +基于densenet161的图像分类模型测试 +基于densenet169的图像分类模型测试 +基于densenet201的图像分类模型测试 +基于dla102的图像分类模型测试 +基于dla102x的图像分类模型测试 +基于dla102x2的图像分类模型测试 +基于dla169的图像分类模型测试 +基于dla34的图像分类模型测试 +基于dla46_c的图像分类模型测试 +基于dla46x_c的图像分类模型测试 +基于dla60的图像分类模型测试 +基于dla60x的图像分类模型测试 +基于dla60x_c的图像分类模型测试 +基于efficientnet_b0的图像分类模型测试 +基于efficientnet_b1的图像分类模型测试 +基于efficientnet_b2的图像分类模型测试 +基于efficientnet_b3的图像分类模型测试 +基于efficientnet_b4的图像分类模型测试 +基于efficientnet_b5的图像分类模型测试 +基于efficientnet_b6的图像分类模型测试 +基于efficientnet_b7的图像分类模型测试 +基于fan_base_16_p4_hybrid_in22k_1k_384的图像分类模型测试 +基于fan_base_18_p16_224的图像分类模型测试 +基于fan_hybrid_base的图像分类模型测试 +基于fan_hybrid_base_in22k_1k的图像分类模型测试 +基于fan_hybrid_small的图像分类模型测试 +基于fan_hybrid_tiny的图像分类模型测试 +基于fan_large_16_p4_hybrid_in22k_1k的图像分类模型测试 +基于fan_large_16_p4_hybrid_in22k_1k_384的图像分类模型测试 +基于fan_vit_small的图像分类模型测试 +基于fan_vit_tiny的图像分类模型测试 +基于genet_large的图像分类模型测试 +基于genet_normal的图像分类模型测试 +基于genet_small的图像分类模型测试 +基于ghostnet的图像分类模型测试 +基于gmlp_s16_224的图像分类模型测试 +基于googlenet的图像分类模型测试 +基于hrnet_w18的图像分类模型测试 +基于hrnet_w18_small的图像分类模型测试 +基于hrnet_w18_small_v2的图像分类模型测试 +基于hrnet_w30的图像分类模型测试 +基于hrnet_w32的图像分类模型测试 +基于hrnet_w40的图像分类模型测试 +基于hrnet_w44的图像分类模型测试 +基于hrnet_w48的图像分类模型测试 +基于hrnet_w64的图像分类模型测试 +基于inception_v3的图像分类模型测试 +基于levit_128的图像分类模型测试 +基于mlp_mixer_b16_224的图像分类模型测试 +基于mlp_mixer_l16_224的图像分类模型测试 +基于mnasnetx0_5的图像分类模型测试 +基于mnasnetx0_75的图像分类模型测试 +基于mnasnetx1_0的图像分类模型测试 +基于mnasnetx1_3的图像分类模型测试 +基于mobilenet_v2的图像分类模型测试 +基于mobilenet_v3_large的图像分类模型测试 +基于mobilenet_v3_small的图像分类模型测试 +基于poolformer_m36的图像分类模型测试 +基于poolformer_m48的图像分类模型测试 +基于poolformer_s12的图像分类模型测试 +基于poolformer_s24的图像分类模型测试 +基于poolformer_s36的图像分类模型测试 +基于pvt_large的图像分类模型测试 +基于pvt_medium的图像分类模型测试 +基于pvt_small的图像分类模型测试 +基于pvt_tiny的图像分类模型测试 +基于__pycache__的图像分类模型测试 +基于regionvit_base_224的图像分类模型测试 +基于regnet_x_16gf的图像分类模型测试 +基于regnet_x_1_6gf的图像分类模型测试 +基于regnet_x_32gf的图像分类模型测试 +基于regnet_x_3_2gf的图像分类模型测试 +基于regnet_x_400mf的图像分类模型测试 +基于regnet_x_800mf的图像分类模型测试 +基于regnet_x_8gf的图像分类模型测试 +基于regnet_y_16gf的图像分类模型测试 +基于regnet_y_1_6gf的图像分类模型测试 +基于regnet_y_32gf的图像分类模型测试 +基于regnet_y_3_2gf的图像分类模型测试 +基于regnet_y_400mf的图像分类模型测试 +基于regnet_y_800mf的图像分类模型测试 +基于regnet_y_8gf的图像分类模型测试 +基于res2net101_26w_4s的图像分类模型测试 +基于res2net50_14w_8s的图像分类模型测试 +基于res2net50_26w_4s的图像分类模型测试 +基于res2net50_26w_6s的图像分类模型测试 +基于res2net50_26w_8s的图像分类模型测试 +基于res2net50_48w_2s的图像分类模型测试 +基于resnest101的图像分类模型测试 +基于resnest200的图像分类模型测试 +基于resnest269的图像分类模型测试 +基于resnest50的图像分类模型测试 +基于resnet101的图像分类模型测试 +基于resnet152的图像分类模型测试 +基于resnet18的图像分类模型测试 +基于resnet34的图像分类模型测试 +基于resnet50的图像分类模型测试 +基于resnext101_32x8d的图像分类模型测试 +基于resnext50_32x4d的图像分类模型测试 +基于rexnet_lite_1_0的图像分类模型测试 +基于rexnet_lite_1_3的图像分类模型测试 +基于rexnet_lite_1_5的图像分类模型测试 +基于rexnet_lite_2_0的图像分类模型测试 +基于rexnetv1_1_0的图像分类模型测试 +基于rexnetv1_1_3的图像分类模型测试 +基于rexnetv1_1_5的图像分类模型测试 +基于rexnetv1_2_0的图像分类模型测试 +基于rexnetv1_3_0的图像分类模型测试 +基于senet154的图像分类模型测试 +基于se_resnet101的图像分类模型测试 +基于se_resnet152的图像分类模型测试 +基于se_resnet50的图像分类模型测试 +基于se_resnext101_32x4d的图像分类模型测试 +基于se_resnext50_32x4d的图像分类模型测试 +基于shufflenet_v2x0_5的图像分类模型测试 +基于shufflenet_v2x1_0的图像分类模型测试 +基于shufflenet_v2x1_5的图像分类模型测试 +基于shufflenet_v2x2_0的图像分类模型测试 +基于squeezenet1_0的图像分类模型测试 +基于squeezenet1_1的图像分类模型测试 +基于van_base的图像分类模型测试 +基于vgg11的图像分类模型测试 +基于vgg11_bn的图像分类模型测试 +基于vgg13的图像分类模型测试 +基于vgg13_bn的图像分类模型测试 +基于vgg16的图像分类模型测试 +基于vgg16_bn的图像分类模型测试 +基于vgg19的图像分类模型测试 +基于vgg19_bn的图像分类模型测试 +基于vit_base_patch16_224的图像分类模型测试 +基于vit_base_patch16_224_miil的图像分类模型测试 +基于vit_base_patch16_224_sam的图像分类模型测试 +基于vit_base_patch16_384的图像分类模型测试 +基于vit_base_patch32_224的图像分类模型测试 +基于vit_base_patch32_224_sam的图像分类模型测试 +基于vit_base_patch32_384的图像分类模型测试 +基于vit_base_patch8_224的图像分类模型测试 +基于vit_large_patch16_224的图像分类模型测试 +基于vit_large_patch16_384的图像分类模型测试 +基于vit_large_patch32_384的图像分类模型测试 +基于vit_small_patch16_224的图像分类模型测试 +基于vit_small_patch16_384的图像分类模型测试 +基于vit_small_patch32_224的图像分类模型测试 +基于vit_small_patch32_384的图像分类模型测试 +基于vit_tiny_patch16_224的图像分类模型测试 +基于vit_tiny_patch16_384的图像分类模型测试 +基于fasterrcnn_mobilenet_v3_large_320_fpn的目标检测模型测试 +基于fasterrcnn_mobilenet_v3_large_fpn的目标检测模型测试 +基于fasterrcnn_resnet50_fpn的目标检测模型测试 +基于fcos_resnet50_fpn的目标检测模型测试 +基于maskrcnn_resnet50_fpn的目标检测模型测试 +基于retinanet_resnet50_fpn的目标检测模型测试 +基于ssd300_vgg16的目标检测模型测试 +基于ssdlite320_mobilenet_v3_large的目标检测模型测试 +基于deeplabv3_mobilenet_v3_large_coco的实体分割模型测试 +基于deeplabv3_resnet101_coco的实体分割模型测试 +基于deeplabv3_resnet50_coco的实体分割模型测试 +基于fcn_resnet101_coco的实体分割模型测试 +基于fcn_resnet50_coco的实体分割模型测试 +基于lraspp_mobilenet_v3_large_coco的实体分割模型测试 +基于iresnet101的人脸识别模型测试 +基于iresnet50的人脸识别模型测试 +基于神经网络风格迁移模型测试 +基于Bert的自然语言模型测试 +基于gpt2的自然语言模型测试 +基于ResMLP的自然语言模型测试 +基于RoBERTa的自然语言模型测试 +基于SwinTransformer的自然语言模型测试 +基于SwinTransformerV2的自然语言模型测试 +基于T5的自然语言模型测试 +基于VisionTransformer的自然语言模型测试 +基于transformer的文本分类模型测试 +基于ldc的科学计算模型测试 +基于lorenz_system的科学计算模型测试