add transformers lowest and latest version coverage

pull/674/head
zhulinJulia24 2024-01-29 17:52:02 +08:00 committed by GitHub
parent fbfef68ab6
commit c7a93bf162
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 3 deletions

View File

@ -11,10 +11,9 @@ env:
jobs:
HF_model:
runs-on: [t_cluster]
continue-on-error: true
strategy:
matrix:
transformers-version: [4.34.0, 4.35.2, 4.36.2, 4.37.1]
transformers-version: [4.34.0, latest]
steps:
- name: mask env
run: |
@ -23,14 +22,23 @@ jobs:
- uses: actions/checkout@v3
- name: load_hf_model
if: matrix.transformers-version != 'latest'
run: |
conda create -n internlm-model-latest --clone ${CONDA_BASE_ENV}
source activate internlm-model-latest
# TODO:test other version of transformers
pip install transformers==${{ matrix.transformers-version }}
pip install sentencepiece
srun -p ${SLURM_PARTITION} --kill-on-bad-exit=1 --job-name=${GITHUB_RUN_ID}-${GITHUB_JOB} --gpus-per-task=2 pytest -s -v --color=yes ./tests/test_hf_model.py
conda deactivate
- name: load_latest_hf_model
if: matrix.transformers-version == 'latest'
run: |
conda create -n internlm-model-latest --clone ${CONDA_BASE_ENV}
source activate internlm-model-latest
pip install transformers
pip install sentencepiece
srun -p ${SLURM_PARTITION} --kill-on-bad-exit=1 --job-name=${GITHUB_RUN_ID}-${GITHUB_JOB} --gpus-per-task=2 pytest -s -v --color=yes ./tests/test_hf_model.py
conda deactivate
- name: remove_env
if: always()
run: |