mirror of https://github.com/InternLM/InternLM
add ci workflow for acc test
parent
bd7e501b69
commit
40b65d0553
|
@ -0,0 +1,52 @@
|
||||||
|
name: pr-merged
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "develop"
|
||||||
|
- "main"
|
||||||
|
paths-ignore:
|
||||||
|
- "cmds/**"
|
||||||
|
- "**.md"
|
||||||
|
env:
|
||||||
|
WORKSPACE_PREFIX: $(echo $GITHUB_WORKSPACE |cut -d '/' -f 1-4)
|
||||||
|
SLURM_PARTITION: llm_s
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-requirements:
|
||||||
|
runs-on: [t_cluster]
|
||||||
|
steps:
|
||||||
|
- name: mask env
|
||||||
|
run: |
|
||||||
|
echo "::add-mask::${{env.WORKSPACE_PREFIX}}"
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
- name: check-requirements
|
||||||
|
run: |
|
||||||
|
changed_files=$(git diff --name-only -r HEAD^1 HEAD)
|
||||||
|
echo $changed_files
|
||||||
|
if [[ $changed_files =~ "runtime.txt" ]]; then
|
||||||
|
pip install -r requirements/runtime.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $changed_files =~ "torch.txt" ]]; then
|
||||||
|
pip install -r requirements/torch.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
acc_tests:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: check-requirements
|
||||||
|
runs-on: [t_cluster]
|
||||||
|
timeout-minutes: 30
|
||||||
|
steps:
|
||||||
|
- name: mask env
|
||||||
|
run: |
|
||||||
|
echo "::add-mask::${{env.WORKSPACE_PREFIX}}"
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: acc_tests
|
||||||
|
run: |
|
||||||
|
source /mnt/petrelfs/share_data/llm_env/env/llm-flash2.0
|
||||||
|
export PYTHONPATH=$PWD:$PYTHONPATH
|
||||||
|
srun -p ${SLURM_PARTITION} --job-name=internlm-acc-test-${GITHUB_RUN_ID}-${GITHUB_JOB} --quotatype=spot -N 1 -n 8 --ntasks-per-node=8 --gpus-per-task=1 python ./train.py --config ./tests/test_training/7B_check_acc.py
|
Loading…
Reference in New Issue