nv-transformers-v100.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. name: nv-transformers-v100
  2. on:
  3. push:
  4. branches:
  5. - 'master'
  6. - 'staging**'
  7. paths-ignore:
  8. - 'docs/**'
  9. pull_request:
  10. paths-ignore:
  11. - 'docs/**'
  12. concurrency:
  13. group: ${{ github.workflow }}-${{ github.ref }}
  14. cancel-in-progress: true
  15. jobs:
  16. unit-tests:
  17. runs-on: [self-hosted, nvidia, cu111, v100]
  18. steps:
  19. - uses: actions/checkout@v2
  20. - name: environment
  21. run: |
  22. nvidia-smi
  23. which python
  24. python --version
  25. which nvcc
  26. nvcc --version
  27. pip install --upgrade pip
  28. pip uninstall --yes torch torchvision
  29. pip install torch==1.8.2+cu111 torchvision==0.9.2+cu111 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
  30. python -c "import torch; print('torch:', torch.__version__, torch)"
  31. python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
  32. sudo apt-get update
  33. sudo apt-get install -y libaio-dev
  34. - name: Python environment
  35. run: |
  36. pip list
  37. - name: Install deepspeed
  38. run: |
  39. pip uninstall --yes deepspeed
  40. pip install .[dev,autotuning]
  41. ds_report
  42. - name: HF transformers tests
  43. run: |
  44. if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi
  45. git clone https://github.com/huggingface/transformers
  46. cd transformers
  47. # if needed switch to the last known good SHA until transformers@master is fixed
  48. # git checkout 1cc453d33
  49. git rev-parse --short HEAD
  50. # scipy/sklearn required for tests, using the 'dev' extra forces torch re-install
  51. pip install .[testing]
  52. # find reqs used in ds integration tests
  53. 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 {}
  54. # force datasets version due to issues
  55. pip install datasets==2.2.2
  56. # force protobuf version due to issues
  57. pip install "protobuf<4.21.0"
  58. pip list
  59. WANDB_DISABLED=true TORCH_EXTENSIONS_DIR=./torch-extensions RUN_SLOW=1 pytest --color=yes --durations=0 --verbose tests/deepspeed