nv-transformers-v100.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. echo "JobID: $AISC_NODE_INSTANCE_ID"
  23. nvidia-smi
  24. which python
  25. python --version
  26. which nvcc
  27. nvcc --version
  28. pip install --upgrade pip
  29. pip uninstall --yes torch torchvision triton
  30. pip install torch==1.8.2+cu111 torchvision==0.9.2+cu111 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
  31. python -c "import torch; print('torch:', torch.__version__, torch)"
  32. python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
  33. sudo apt-get update
  34. sudo apt-get install -y libaio-dev
  35. - name: Python environment
  36. run: |
  37. pip list
  38. - name: Install deepspeed
  39. run: |
  40. pip uninstall --yes deepspeed
  41. pip install .[dev,autotuning]
  42. ds_report
  43. - name: HF transformers tests
  44. run: |
  45. if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi
  46. git clone https://github.com/huggingface/transformers
  47. cd transformers
  48. # if needed switch to the last known good SHA until transformers@master is fixed
  49. git checkout 6268694e2
  50. git rev-parse --short HEAD
  51. # scipy/sklearn required for tests, using the 'dev' extra forces torch re-install
  52. pip install .[testing]
  53. # find reqs used in ds integration tests
  54. 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 {}
  55. # force datasets version due to issues
  56. pip install datasets==2.2.2
  57. # force protobuf version due to issues
  58. pip install "protobuf<4.21.0"
  59. pip list
  60. HF_DATASETS_CACHE=/blob/datasets_cache/ TRANSFORMERS_CACHE=/blob/transformers_cache/ WANDB_DISABLED=true TORCH_EXTENSIONS_DIR=./torch-extensions RUN_SLOW=1 pytest --color=yes --durations=0 --verbose tests/deepspeed