Reactive test fecthers on scheduled test with proper git install (#13097)
* Reactive test fecthers on scheduled test with proper git install * Proper fetch-depth
This commit is contained in:
156
.github/workflows/self-push.yml
vendored
156
.github/workflows/self-push.yml
vendored
@@ -28,6 +28,13 @@ jobs:
|
|||||||
image: pytorch/pytorch:1.9.0-cuda11.1-cudnn8-runtime
|
image: pytorch/pytorch:1.9.0-cuda11.1-cudnn8-runtime
|
||||||
options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
|
options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
apt -y update && apt install -y software-properties-common && apt -y update && add-apt-repository -y ppa:git-core/ppa && apt -y update && apt install -y git
|
||||||
|
apt install -y libsndfile1-dev
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install .[sklearn,testing,onnxruntime,sentencepiece,speech,vision,timm]
|
||||||
|
|
||||||
- name: Launcher docker
|
- name: Launcher docker
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@@ -37,12 +44,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
nvidia-smi
|
nvidia-smi
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
apt -y update && apt install -y libsndfile1-dev git
|
|
||||||
pip install --upgrade pip
|
|
||||||
pip install .[sklearn,testing,onnxruntime,sentencepiece,speech,vision,timm]
|
|
||||||
|
|
||||||
- name: Are GPUs recognized by our DL frameworks
|
- name: Are GPUs recognized by our DL frameworks
|
||||||
run: |
|
run: |
|
||||||
python -c "import torch; print('Cuda available:', torch.cuda.is_available())"
|
python -c "import torch; print('Cuda available:', torch.cuda.is_available())"
|
||||||
@@ -50,22 +51,21 @@ jobs:
|
|||||||
python -c "import torch; print('CuDNN version:', torch.backends.cudnn.version())"
|
python -c "import torch; print('CuDNN version:', torch.backends.cudnn.version())"
|
||||||
python -c "import torch; print('Number of GPUs available:', torch.cuda.device_count())"
|
python -c "import torch; print('Number of GPUs available:', torch.cuda.device_count())"
|
||||||
|
|
||||||
# - name: Fetch the tests to run
|
- name: Fetch the tests to run
|
||||||
# run: |
|
run: |
|
||||||
# python utils/tests_fetcher.py | tee test_preparation.txt
|
python utils/tests_fetcher.py --diff_with_last_commit | tee test_preparation.txt
|
||||||
#
|
|
||||||
# - name: Report fetched tests
|
- name: Report fetched tests
|
||||||
# uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
# with:
|
with:
|
||||||
# name: test_fetched
|
name: test_fetched
|
||||||
# path: test_preparation.txt
|
path: test_preparation.txt
|
||||||
#
|
|
||||||
- name: Run all non-slow tests on GPU
|
- name: Run all non-slow tests on GPU
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 2 --dist=loadfile -v --make-reports=tests_torch_gpu tests
|
if [ -f test_list.txt ]; then
|
||||||
# if [ -f test_list.txt ]; then
|
python -m pytest -n 2 --dist=loadfile -v --make-reports=tests_torch_gpu $(cat test_list.txt)
|
||||||
# python -m pytest -n 2 --dist=loadfile -v --make-reports=tests_torch_gpu $(cat test_list.txt)
|
fi
|
||||||
# fi
|
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -85,6 +85,12 @@ jobs:
|
|||||||
# image: tensorflow/tensorflow:2.4.1-gpu
|
# image: tensorflow/tensorflow:2.4.1-gpu
|
||||||
# options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
|
# options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
|
||||||
# steps:
|
# steps:
|
||||||
|
# - name: Install dependencies
|
||||||
|
# run: |
|
||||||
|
# apt -y update && apt install -y software-properties-common && apt -y update && add-apt-repository -y ppa:git-core/ppa && apt -y update && apt install -y git
|
||||||
|
# pip install --upgrade pip
|
||||||
|
# pip install .[sklearn,testing,onnxruntime,sentencepiece]
|
||||||
|
#
|
||||||
# - name: Launcher docker
|
# - name: Launcher docker
|
||||||
# uses: actions/checkout@v2
|
# uses: actions/checkout@v2
|
||||||
# with:
|
# with:
|
||||||
@@ -94,12 +100,6 @@ jobs:
|
|||||||
# run: |
|
# run: |
|
||||||
# nvidia-smi
|
# nvidia-smi
|
||||||
#
|
#
|
||||||
# - name: Install dependencies
|
|
||||||
# run: |
|
|
||||||
# apt -y update && apt install -y git
|
|
||||||
# pip install --upgrade pip
|
|
||||||
# pip install .[sklearn,testing,onnxruntime,sentencepiece]
|
|
||||||
#
|
|
||||||
# - name: Are GPUs recognized by our DL frameworks
|
# - name: Are GPUs recognized by our DL frameworks
|
||||||
# run: |
|
# run: |
|
||||||
# TF_CPP_MIN_LOG_LEVEL=3 python -c "import tensorflow as tf; print('TF GPUs available:', bool(tf.config.list_physical_devices('GPU')))"
|
# TF_CPP_MIN_LOG_LEVEL=3 python -c "import tensorflow as tf; print('TF GPUs available:', bool(tf.config.list_physical_devices('GPU')))"
|
||||||
@@ -107,7 +107,7 @@ jobs:
|
|||||||
#
|
#
|
||||||
# - name: Fetch the tests to run
|
# - name: Fetch the tests to run
|
||||||
# run: |
|
# run: |
|
||||||
# python utils/tests_fetcher.py | tee test_preparation.txt
|
# python utils/tests_fetcher.py --diff_with_last_commit | tee test_preparation.txt
|
||||||
#
|
#
|
||||||
# - name: Report fetched tests
|
# - name: Report fetched tests
|
||||||
# uses: actions/upload-artifact@v2
|
# uses: actions/upload-artifact@v2
|
||||||
@@ -142,6 +142,13 @@ jobs:
|
|||||||
image: pytorch/pytorch:1.9.0-cuda11.1-cudnn8-runtime
|
image: pytorch/pytorch:1.9.0-cuda11.1-cudnn8-runtime
|
||||||
options: --gpus all --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
|
options: --gpus all --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
apt -y update && apt install -y software-properties-common && apt -y update && add-apt-repository -y ppa:git-core/ppa && apt -y update && apt install -y git
|
||||||
|
apt install -y libsndfile1-dev
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install .[sklearn,testing,onnxruntime,sentencepiece,speech,vision,timm]
|
||||||
|
|
||||||
- name: Launcher docker
|
- name: Launcher docker
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@@ -151,12 +158,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
nvidia-smi
|
nvidia-smi
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
apt -y update && apt install -y libsndfile1-dev git
|
|
||||||
pip install --upgrade pip
|
|
||||||
pip install .[sklearn,testing,onnxruntime,sentencepiece,speech,vision,timm]
|
|
||||||
|
|
||||||
- name: Are GPUs recognized by our DL frameworks
|
- name: Are GPUs recognized by our DL frameworks
|
||||||
run: |
|
run: |
|
||||||
python -c "import torch; print('Cuda available:', torch.cuda.is_available())"
|
python -c "import torch; print('Cuda available:', torch.cuda.is_available())"
|
||||||
@@ -164,24 +165,23 @@ jobs:
|
|||||||
python -c "import torch; print('CuDNN version:', torch.backends.cudnn.version())"
|
python -c "import torch; print('CuDNN version:', torch.backends.cudnn.version())"
|
||||||
python -c "import torch; print('Number of GPUs available:', torch.cuda.device_count())"
|
python -c "import torch; print('Number of GPUs available:', torch.cuda.device_count())"
|
||||||
|
|
||||||
# - name: Fetch the tests to run
|
- name: Fetch the tests to run
|
||||||
# run: |
|
run: |
|
||||||
# python utils/tests_fetcher.py | tee test_preparation.txt
|
python utils/tests_fetcher.py --diff_with_last_commit | tee test_preparation.txt
|
||||||
#
|
|
||||||
# - name: Report fetched tests
|
- name: Report fetched tests
|
||||||
# uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
# with:
|
with:
|
||||||
# name: test_fetched
|
name: test_fetched
|
||||||
# path: test_preparation.txt
|
path: test_preparation.txt
|
||||||
|
|
||||||
- name: Run all non-slow tests on GPU
|
- name: Run all non-slow tests on GPU
|
||||||
env:
|
env:
|
||||||
MKL_SERVICE_FORCE_INTEL: 1
|
MKL_SERVICE_FORCE_INTEL: 1
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 2 --dist=loadfile -v --make-reports=tests_torch_multi_gpu tests
|
if [ -f test_list.txt ]; then
|
||||||
# if [ -f test_list.txt ]; then
|
python -m pytest -n 2 --dist=loadfile -v --make-reports=tests_torch_multi_gpu $(cat test_list.txt)
|
||||||
# python -m pytest -n 2 --dist=loadfile -v --make-reports=tests_torch_multi_gpu $(cat test_list.txt)
|
fi
|
||||||
# fi
|
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -201,6 +201,12 @@ jobs:
|
|||||||
# image: tensorflow/tensorflow:2.4.1-gpu
|
# image: tensorflow/tensorflow:2.4.1-gpu
|
||||||
# options: --gpus all --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
|
# options: --gpus all --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
|
||||||
# steps:
|
# steps:
|
||||||
|
# - name: Install dependencies
|
||||||
|
# run: |
|
||||||
|
# apt -y update && apt install -y software-properties-common && apt -y update && add-apt-repository -y ppa:git-core/ppa && apt -y update && apt install -y git
|
||||||
|
# pip install --upgrade pip
|
||||||
|
# pip install .[sklearn,testing,onnxruntime,sentencepiece]
|
||||||
|
#
|
||||||
# - name: Launcher docker
|
# - name: Launcher docker
|
||||||
# uses: actions/checkout@v2
|
# uses: actions/checkout@v2
|
||||||
# with:
|
# with:
|
||||||
@@ -210,12 +216,6 @@ jobs:
|
|||||||
# run: |
|
# run: |
|
||||||
# nvidia-smi
|
# nvidia-smi
|
||||||
#
|
#
|
||||||
# - name: Install dependencies
|
|
||||||
# run: |
|
|
||||||
# apt -y update && apt install -y git
|
|
||||||
# pip install --upgrade pip
|
|
||||||
# pip install .[sklearn,testing,onnxruntime,sentencepiece]
|
|
||||||
#
|
|
||||||
# - name: Are GPUs recognized by our DL frameworks
|
# - name: Are GPUs recognized by our DL frameworks
|
||||||
# run: |
|
# run: |
|
||||||
# TF_CPP_MIN_LOG_LEVEL=3 python -c "import tensorflow as tf; print('TF GPUs available:', bool(tf.config.list_physical_devices('GPU')))"
|
# TF_CPP_MIN_LOG_LEVEL=3 python -c "import tensorflow as tf; print('TF GPUs available:', bool(tf.config.list_physical_devices('GPU')))"
|
||||||
@@ -223,7 +223,7 @@ jobs:
|
|||||||
#
|
#
|
||||||
# - name: Fetch the tests to run
|
# - name: Fetch the tests to run
|
||||||
# run: |
|
# run: |
|
||||||
# python utils/tests_fetcher.py | tee test_preparation.txt
|
# python utils/tests_fetcher.py --diff_with_last_commit | tee test_preparation.txt
|
||||||
#
|
#
|
||||||
# - name: Report fetched tests
|
# - name: Report fetched tests
|
||||||
# uses: actions/upload-artifact@v2
|
# uses: actions/upload-artifact@v2
|
||||||
@@ -279,22 +279,21 @@ jobs:
|
|||||||
python -c "import torch; print('CuDNN version:', torch.backends.cudnn.version())"
|
python -c "import torch; print('CuDNN version:', torch.backends.cudnn.version())"
|
||||||
python -c "import torch; print('Number of GPUs available:', torch.cuda.device_count())"
|
python -c "import torch; print('Number of GPUs available:', torch.cuda.device_count())"
|
||||||
|
|
||||||
# - name: Fetch the tests to run
|
- name: Fetch the tests to run
|
||||||
# run: |
|
run: |
|
||||||
# python utils/tests_fetcher.py --filters tests/deepspeed tests/extended | tee test_preparation.txt
|
python utils/tests_fetcher.py --diff_with_last_commit --filters tests/deepspeed tests/extended | tee test_preparation.txt
|
||||||
#
|
|
||||||
# - name: Report fetched tests
|
- name: Report fetched tests
|
||||||
# uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
# with:
|
with:
|
||||||
# name: test_fetched
|
name: test_fetched
|
||||||
# path: test_preparation.txt
|
path: test_preparation.txt
|
||||||
|
|
||||||
- name: Run all tests on GPU
|
- name: Run all tests on GPU
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 1 --dist=loadfile -v --make-reports=tests_torch_cuda_extensions_gpu tests/deepspeed tests/extended
|
if [ -f test_list.txt ]; then
|
||||||
# if [ -f test_list.txt ]; then
|
python -m pytest -n 1 --dist=loadfile -v --make-reports=tests_torch_cuda_extensions_gpu $(cat test_list.txt)
|
||||||
# python -m pytest -n 1 --dist=loadfile -v --make-reports=tests_torch_cuda_extensions_gpu $(cat test_list.txt)
|
fi
|
||||||
# fi
|
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -335,22 +334,21 @@ jobs:
|
|||||||
python -c "import torch; print('CuDNN version:', torch.backends.cudnn.version())"
|
python -c "import torch; print('CuDNN version:', torch.backends.cudnn.version())"
|
||||||
python -c "import torch; print('Number of GPUs available:', torch.cuda.device_count())"
|
python -c "import torch; print('Number of GPUs available:', torch.cuda.device_count())"
|
||||||
|
|
||||||
# - name: Fetch the tests to run
|
- name: Fetch the tests to run
|
||||||
# run: |
|
run: |
|
||||||
# python utils/tests_fetcher.py --filters tests/deepspeed tests/extended | tee test_preparation.txt
|
python utils/tests_fetcher.py --diff_with_last_commit --filters tests/deepspeed tests/extended | tee test_preparation.txt
|
||||||
#
|
|
||||||
# - name: Report fetched tests
|
- name: Report fetched tests
|
||||||
# uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
# with:
|
with:
|
||||||
# name: test_fetched
|
name: test_fetched
|
||||||
# path: test_preparation.txt
|
path: test_preparation.txt
|
||||||
|
|
||||||
- name: Run all tests on GPU
|
- name: Run all tests on GPU
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 1 --dist=loadfile -v --make-reports=tests_torch_cuda_extensions_multi_gpu tests/deepspeed tests/extended
|
if [ -f test_list.txt ]; then
|
||||||
# if [ -f test_list.txt ]; then
|
python -m pytest -n 1 --dist=loadfile -v --make-reports=tests_torch_cuda_extensions_multi_gpu $(cat test_list.txt)
|
||||||
# python -m pytest -n 1 --dist=loadfile -v --make-reports=tests_torch_cuda_extensions_multi_gpu $(cat test_list.txt)
|
fi
|
||||||
# fi
|
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
|
|||||||
@@ -445,7 +445,7 @@ if __name__ == "__main__":
|
|||||||
repo = Repo(PATH_TO_TRANFORMERS)
|
repo = Repo(PATH_TO_TRANFORMERS)
|
||||||
|
|
||||||
diff_with_last_commit = args.diff_with_last_commit
|
diff_with_last_commit = args.diff_with_last_commit
|
||||||
if not repo.head.is_detached and repo.head.ref == repo.refs.master:
|
if not diff_with_last_commit and not repo.head.is_detached and repo.head.ref == repo.refs.master:
|
||||||
print("Master branch detected, fetching tests against last commit.")
|
print("Master branch detected, fetching tests against last commit.")
|
||||||
diff_with_last_commit = True
|
diff_with_last_commit = True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user