mirror of
https://github.com/deepspeedai/DeepSpeed.git
synced 2025-10-20 15:33:51 +08:00
Co-authored-by: Reza Yazdani <reyazda@microsoft.com> Co-authored-by: Michael Wyatt <michaelwyatt@microsoft.com> Co-authored-by: Reza Yazdani <44502768+RezaYazdaniAminabadi@users.noreply.github.com>
66 lines
2.2 KiB
YAML
66 lines
2.2 KiB
YAML
name: nv-transformers-v100
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'staging**'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
unit-tests:
|
|
runs-on: [self-hosted, nvidia, cu111, v100]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: environment
|
|
run: |
|
|
nvidia-smi
|
|
which python
|
|
python --version
|
|
which nvcc
|
|
nvcc --version
|
|
pip install --upgrade pip
|
|
pip uninstall --yes torch torchvision
|
|
pip install torch==1.8.2+cu111 torchvision==0.9.2+cu111 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
|
|
python -c "import torch; print('torch:', torch.__version__, torch)"
|
|
python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
|
|
|
|
- name: Python environment
|
|
run: |
|
|
pip list
|
|
|
|
- name: Install deepspeed
|
|
run: |
|
|
pip uninstall --yes deepspeed
|
|
pip install .[dev,autotuning]
|
|
ds_report
|
|
|
|
- name: HF transformers tests
|
|
run: |
|
|
if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi
|
|
git clone https://github.com/huggingface/transformers
|
|
cd transformers
|
|
# if needed switch to the last known good SHA until transformers@master is fixed
|
|
# git checkout 1cc453d33
|
|
git rev-parse --short HEAD
|
|
# scipy/sklearn required for tests, using the 'dev' extra forces torch re-install
|
|
pip install .[testing]
|
|
# find reqs used in ds integration tests
|
|
find examples/pytorch -regextype posix-egrep -regex '.*(language-modeling|question-answering|summarization|image-classification|text-classification|translation).*/requirements.txt' -exec grep -v 'torch' {} \; | xargs -I {} pip install --upgrade {}
|
|
# force datasets version due to issues
|
|
pip install datasets==2.2.2
|
|
# force protobuf version due to issues
|
|
pip install "protobuf<4.21.0"
|
|
pip list
|
|
TORCH_EXTENSIONS_DIR=./torch-extensions RUN_SLOW=1 pytest --color=yes --durations=0 --verbose tests/deepspeed
|