fix(hybrid optim): fp32_grad not scaled when use offload_cpu (#399) #218
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
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: | |
acc_tests: | |
runs-on: [t_cluster] | |
timeout-minutes: 30 | |
steps: | |
- name: mask env | |
run: | | |
echo "::add-mask::${{env.WORKSPACE_PREFIX}}" | |
echo "::add-mask::$path_prefix" | |
- uses: actions/checkout@v3 | |
- name: acc_tests | |
run: | | |
source activate ${evo_env_torch21_flash2} | |
export PYTHONPATH=$PWD:$PYTHONPATH | |
jobname=${GITHUB_RUN_ID}-${GITHUB_JOB}-${GITHUB_RUN_ATTEMPT} | |
srun -p ${SLURM_PARTITION} --kill-on-bad-exit=1 --job-name=$jobname -N 1 -n 8 --ntasks-per-node=8 --gpus-per-task=1 --exclusive python ./tests/test_training/train_CI.py --config ./tests/test_training/7B_check_acc.py | |
exit_code=$? | |
sh ./ci_scripts/common/check_slurm_cancled.sh $exit_code $jobname | |
check_loss_when_swapping_micro_num_and_micro_bsz: | |
runs-on: [t_cluster] | |
timeout-minutes: 40 | |
steps: | |
- name: mask env | |
run: | | |
echo "::add-mask::${{env.WORKSPACE_PREFIX}}" | |
echo "::add-mask::$path_prefix" | |
- uses: actions/checkout@v3 | |
- name: loss_tests | |
run: | | |
source activate ${evo_env_torch21_flash2} | |
export PYTHONPATH=$PWD:$PYTHONPATH | |
jobname=${GITHUB_RUN_ID}-${GITHUB_JOB}-${GITHUB_RUN_ATTEMPT} | |
srun -p ${SLURM_PARTITION} --kill-on-bad-exit=1 --job-name=$jobname -N 1 -n 1 --gres=gpu:8 python -m pytest -s ./tests/test_training/test_swap_nb_loss_and_gradnorm.py | |
exit_code=$? | |
sh ./ci_scripts/common/check_slurm_cancled.sh $exit_code $jobname | |
notify_to_feishu: | |
if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure') && (github.ref_name == 'develop' || github.ref_name == 'main') }} | |
needs: [ | |
acc_tests, | |
check_loss_when_swapping_micro_num_and_micro_bsz | |
] | |
runs-on: [t_cluster] | |
steps: | |
- name: mask env | |
run: | | |
echo "::add-mask::${{env.WORKSPACE_PREFIX}}" | |
echo "::add-mask::$path_prefix" | |
- name: notify | |
run: | | |
curl -X POST -H "Content-Type: application/json" -d '{"msg_type":"post","content":{"post":{"zh_cn":{"title":"'${{ github.repository }}' GitHubAction Failed","content":[[{"tag":"text","text":""},{"tag":"a","text":"Please click here for details ","href":"https://github.com/'${{ github.repository }}'/actions/runs/'${GITHUB_RUN_ID}'"},{"tag":"at","user_id":"'${{ secrets.USER_ID }}'"}]]}}}}' ${{ secrets.WEBHOOK_URL }} |