-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PR test workflow and check-in more testcases (#1208)
* refactor test case * refactor test case * refactor testcase * fix cuda allocate * fix cuda-prefix in pr run * Update daily_ete_test.yml * chage internlm2 model coverage to 20b in testcase * chage internlm2 model coverage to 20b in testcase * chage internlm2 model coverage to 20b in testcase * fix mp blocked by allocate cuda * add kvint8 and w4a16 chat cover * modify timeout for each step * fix lint * update prompt and pr trigger * update runner config * Update daily_ete_test.yml * change job name
- Loading branch information
1 parent
cc06bba
commit 0430349
Showing
40 changed files
with
1,846 additions
and
1,480 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: pr_ete_test | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- ".github/workflows/pr_ete_test.yml" | ||
- "cmake/**" | ||
- "src/**" | ||
- "autotest/**" | ||
- "3rdparty/**" | ||
- "lmdeploy/**" | ||
- "requirements/**" | ||
- "requirements.txt" | ||
- "CMakeLists.txt" | ||
- "setup.py" | ||
workflow_dispatch: | ||
|
||
|
||
env: | ||
HOST_PIP_CACHE_DIR: /nvme/github-actions/pip-cache | ||
HOST_LOCALTIME: /usr/share/zoneinfo/Asia/Shanghai | ||
|
||
|
||
jobs: | ||
pr_functions_test: | ||
runs-on: [self-hosted, linux-a100-pr] | ||
timeout-minutes: 120 | ||
env: | ||
REPORT_DIR: /nvme/qa_test_models/test-reports | ||
container: | ||
image: nvcr.io/nvidia/tritonserver:22.12-py3 | ||
options: "--gpus=all --ipc=host --user root -e PIP_CACHE_DIR=/root/.cache/pip" | ||
volumes: | ||
- /nvme/share_data/github-actions/pip-cache:/root/.cache/pip | ||
- /nvme/share_data/github-actions/packages:/root/packages | ||
- /nvme/qa_test_models:/nvme/qa_test_models | ||
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro | ||
steps: | ||
- name: Setup systems | ||
run: | | ||
rm /etc/apt/sources.list.d/cuda*.list | ||
apt-get update && apt-get install -y --no-install-recommends rapidjson-dev \ | ||
libgoogle-glog-dev libgl1 openjdk-8-jre-headless | ||
dpkg -i /root/packages/allure_2.24.1-1_all.deb | ||
rm -rf /var/lib/apt/lists/* | ||
- name: Clone repository | ||
uses: actions/checkout@v2 | ||
- name: Install pytorch | ||
run: | | ||
python3 -m pip cache dir | ||
python3 -m pip install torch==2.1.0 torchvision==0.16.0 --index-url https://download.pytorch.org/whl/cu118 | ||
- name: Build lmdeploy | ||
run: | | ||
python3 -m pip install cmake | ||
python3 -m pip install -r requirements/build.txt | ||
mkdir build | ||
cd build | ||
cmake .. \ | ||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ | ||
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ | ||
-DCMAKE_INSTALL_PREFIX=/opt/tritonserver \ | ||
-DBUILD_PY_FFI=ON \ | ||
-DBUILD_MULTI_GPU=ON \ | ||
-DCMAKE_CUDA_FLAGS="-lineinfo" \ | ||
-DUSE_NVTX=ON \ | ||
-DSM=80 \ | ||
-DCMAKE_CUDA_ARCHITECTURES=80 \ | ||
-DBUILD_TEST=OFF | ||
make -j$(nproc) && make install | ||
- name: Install lmdeploy | ||
run: | | ||
python3 -m pip install packaging protobuf transformers_stream_generator transformers datasets | ||
# manually install flash attn | ||
# the install packeage from. https://github.com/Dao-AILab/flash-attention/releases/download/v2.3.6/flash_attn-2.3.6+cu118torch2.0cxx11abiFALSE-cp38-cp38-linux_x86_64.whl | ||
python3 -m pip install /root/packages/flash_attn-2.3.6+cu118torch2.1cxx11abiFALSE-cp38-cp38-linux_x86_64.whl | ||
python3 -m pip install -r requirements.txt -r requirements/test.txt | ||
python3 -m pip install . | ||
- name: Check env | ||
run: | | ||
python3 -m pip list | ||
lmdeploy check_env | ||
- name: Test lmdeploy | ||
timeout-minutes: 120 | ||
run: CUDA_VISIBLE_DEVICES=5,6 pytest autotest -m pr_test --alluredir=allure-results --clean-alluredir | ||
- name: Generate reports | ||
if: always() | ||
run: | | ||
export date_today="$(date +'%Y%m%d-%H%M%S')" | ||
export report_dir="$REPORT_DIR/$date_today" | ||
echo "Save report to $ALLURE_DIR" | ||
allure generate -c -o $report_dir | ||
- name: Clear workfile | ||
if: always() | ||
run: | | ||
export workdir=$(pwd) | ||
cd .. | ||
rm -rf $workdir | ||
mkdir $workdir | ||
chmod -R 777 $workdir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.