mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
Test runner update - split step, change schedule time and disable hf cache (#814)
* Update pr-run-test.yml * Update pr-run-test.yml * Update pr-run-test.yml * split step and change order, change schedule time and disable hf cache
This commit is contained in:
parent
dcc32ed856
commit
8b5c467cc5
26
.github/workflows/pr-run-test.yml
vendored
26
.github/workflows/pr-run-test.yml
vendored
@ -11,32 +11,32 @@ on:
|
|||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '56 0 * * *'
|
- cron: '56 20 * * *'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test_run:
|
pr_run_test:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python-version: ['3.10']
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repository
|
- name: Clone repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Prepare - Clone Conde Env install and copy data
|
- name: Prepare - create conda env and install code
|
||||||
run: |
|
run: |
|
||||||
eval "$(conda shell.bash hook)"
|
eval "$(conda shell.bash hook)"
|
||||||
conda create --name opencompass_regression --clone opencompass_base
|
conda create --name opencompass_regression --clone opencompass_base
|
||||||
conda activate opencompass_regression
|
conda activate opencompass_regression
|
||||||
python3 -m pip install -e .
|
python3 -m pip install -e .
|
||||||
|
conda info --envs
|
||||||
|
- name: Prepare - prepare data and hf model
|
||||||
|
run: |
|
||||||
cp -r /cpfs01/user/qa-llm-cicd/data .
|
cp -r /cpfs01/user/qa-llm-cicd/data .
|
||||||
rm -rf ~/.cache/huggingface/hub -f && mkdir ~/.cache -p && mkdir ~/.cache/huggingface -p
|
rm -rf ~/.cache/huggingface/hub -f && mkdir ~/.cache -p && mkdir ~/.cache/huggingface -p
|
||||||
ln -s /cpfs01/shared/public/public_hdd/llmeval/model_weights/hf_hub ~/.cache/huggingface/hub
|
ln -s /cpfs01/shared/public/public_hdd/llmeval/model_weights/hf_hub ~/.cache/huggingface/hub
|
||||||
conda info --envs
|
export HF_DATASETS_OFFLINE=1; export TRANSFORMERS_OFFLINE=1;
|
||||||
- name: Run test
|
- name: Run test
|
||||||
run: |
|
run: |
|
||||||
eval "$(conda shell.bash hook)"
|
eval "$(conda shell.bash hook)"
|
||||||
@ -44,12 +44,8 @@ jobs:
|
|||||||
conda info --envs
|
conda info --envs
|
||||||
rm -rf regression_result
|
rm -rf regression_result
|
||||||
python3 run.py --models hf_internlm_chat_7b --datasets siqa_gen --work-dir regression_result --debug
|
python3 run.py --models hf_internlm_chat_7b --datasets siqa_gen --work-dir regression_result --debug
|
||||||
- name: Remove Conda Env
|
|
||||||
run: |
|
|
||||||
eval "$(conda shell.bash hook)"
|
|
||||||
conda env remove --name opencompass_regression
|
|
||||||
conda info --envs
|
|
||||||
- name: Get result
|
- name: Get result
|
||||||
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
score=$(sed -n '$p' regression_result/*/summary/*.csv | awk -F ',' '{print $NF}')
|
score=$(sed -n '$p' regression_result/*/summary/*.csv | awk -F ',' '{print $NF}')
|
||||||
if (( ${score%.*} >= 70 && ${score%.*} <= 80 )); then
|
if (( ${score%.*} >= 70 && ${score%.*} <= 80 )); then
|
||||||
@ -59,3 +55,9 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
rm -rf regression_result
|
rm -rf regression_result
|
||||||
|
- name: Remove Conda Env
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
eval "$(conda shell.bash hook)"
|
||||||
|
conda env remove --name opencompass_regression
|
||||||
|
conda info --envs
|
||||||
|
Loading…
Reference in New Issue
Block a user