From c1829c45851eb1988684c9a2f4fd054ebd446b95 Mon Sep 17 00:00:00 2001 From: Ammar Ahmad Awan Date: Fri, 24 Sep 2021 15:47:00 -0700 Subject: [PATCH] [CI] Add HF transformers tests (#958) Co-authored-by: Jeff Rasley Co-authored-by: Stas Bekman Co-authored-by: Olatunji Ruwase --- .github/workflows/main.yml | 32 ++++++++++++++++++++++++ .github/workflows/torch16.yml | 46 ----------------------------------- 2 files changed, 32 insertions(+), 46 deletions(-) delete mode 100755 .github/workflows/torch16.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ec6df087..69e3da34 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,6 +53,7 @@ jobs: python --version which nvcc nvcc --version + 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: Install deepspeed @@ -65,3 +66,34 @@ jobs: if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi cd tests TORCH_EXTENSIONS_DIR=./torch-extensions pytest --durations=0 --forked --verbose unit/ + + nv-transformers-v100: + runs-on: [self-hosted, nvidia, torch18, v100] + + steps: + - uses: actions/checkout@v2 + + - name: environment + run: | + nvidia-smi + which python + python --version + which nvcc + nvcc --version + 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: Install deepspeed + run: | + pip install .[dev] + ds_report + - name: HF transformers tests + run: | + if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi + git clone https://github.com/huggingface/transformers + git rev-parse --short HEAD + cd transformers + pip install .[testing] + # find reqs used in ds integration tests + find examples/pytorch -regextype posix-egrep -regex '.*(language-modeling|question-answering|summarization|text-classification|translation).*/requirements.txt' -exec pip install -r {} \; + TORCH_EXTENSIONS_DIR=./torch-extensions RUN_SLOW=1 pytest --durations=0 --verbose tests/deepspeed diff --git a/.github/workflows/torch16.yml b/.github/workflows/torch16.yml deleted file mode 100755 index 0b23144c..00000000 --- a/.github/workflows/torch16.yml +++ /dev/null @@ -1,46 +0,0 @@ -# Unit test config for manual use on torch1.6 runners - -name: Torch16 - -# Controls when the action will run. -on: - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: [self-hosted, torch1.6] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - # Runs a single command using the runners shell - - name: environment - run: | - nvidia-smi - which python - python --version - which nvcc - nvcc --version - python -c "import torch; print('torch:', torch.__version__, torch)" - python -c "import torch; print('CUDA available:', torch.cuda.is_available())" - # Runs a set of commands using the runners shell - - name: Install deepspeed - run: | - pip install .[dev] - ds_report - - - name: Formatting checks - run: | - pre-commit run --all-files - - # Runs a set of commands using the runners shell - - name: Unit tests - run: | - if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi - TORCH_EXTENSIONS_DIR=./torch-extensions pytest --durations=0 --forked --verbose -x tests/unit/ -- GitLab