Add timeout to CI. (#12684)
* Global 60-300 seconds timeout * Add verbose option * [skip ci] typo
This commit is contained in:
9
.github/workflows/self-push.yml
vendored
9
.github/workflows/self-push.yml
vendored
@@ -18,6 +18,7 @@ env:
|
|||||||
TRANSFORMERS_IS_CI: yes
|
TRANSFORMERS_IS_CI: yes
|
||||||
OMP_NUM_THREADS: 8
|
OMP_NUM_THREADS: 8
|
||||||
MKL_NUM_THREADS: 8
|
MKL_NUM_THREADS: 8
|
||||||
|
PYTEST_TIMEOUT: 60
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run_tests_torch_gpu:
|
run_tests_torch_gpu:
|
||||||
@@ -48,7 +49,7 @@ jobs:
|
|||||||
|
|
||||||
- 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 --make-reports=tests_torch_gpu tests
|
python -m pytest -n 2 --dist=loadfile -v --make-reports=tests_torch_gpu tests
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -134,7 +135,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
MKL_SERVICE_FORCE_INTEL: 1
|
MKL_SERVICE_FORCE_INTEL: 1
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 2 --dist=loadfile --make-reports=tests_torch_multi_gpu tests
|
python -m pytest -n 2 --dist=loadfile -v --make-reports=tests_torch_multi_gpu tests
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -217,7 +218,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run all tests on GPU
|
- name: Run all tests on GPU
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 1 --dist=loadfile --make-reports=tests_torch_cuda_extensions_gpu tests/deepspeed tests/extended
|
python -m pytest -n 1 --dist=loadfile -v --make-reports=tests_torch_cuda_extensions_gpu tests/deepspeed tests/extended
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -258,7 +259,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run all tests on GPU
|
- name: Run all tests on GPU
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 1 --dist=loadfile --make-reports=tests_torch_cuda_extensions_multi_gpu tests/deepspeed tests/extended
|
python -m pytest -n 1 --dist=loadfile -v --make-reports=tests_torch_cuda_extensions_multi_gpu tests/deepspeed tests/extended
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
|
|||||||
23
.github/workflows/self-scheduled.yml
vendored
23
.github/workflows/self-scheduled.yml
vendored
@@ -14,6 +14,7 @@ env:
|
|||||||
RUN_SLOW: yes
|
RUN_SLOW: yes
|
||||||
OMP_NUM_THREADS: 16
|
OMP_NUM_THREADS: 16
|
||||||
MKL_NUM_THREADS: 16
|
MKL_NUM_THREADS: 16
|
||||||
|
PYTEST_TIMEOUT: 300
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run_all_tests_torch_gpu:
|
run_all_tests_torch_gpu:
|
||||||
@@ -44,7 +45,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run all tests on GPU
|
- name: Run all tests on GPU
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 1 --dist=loadfile --make-reports=tests_torch_gpu tests
|
python -m pytest -n 1 -v --dist=loadfile --make-reports=tests_torch_gpu tests
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -60,7 +61,7 @@ jobs:
|
|||||||
TRANSFORMERS_IS_CI: yes
|
TRANSFORMERS_IS_CI: yes
|
||||||
run: |
|
run: |
|
||||||
pip install -r examples/pytorch/_tests_requirements.txt
|
pip install -r examples/pytorch/_tests_requirements.txt
|
||||||
python -m pytest -n 1 --dist=loadfile --make-reports=examples_torch_gpu examples
|
python -m pytest -n 1 -v --dist=loadfile --make-reports=examples_torch_gpu examples
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -71,7 +72,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
RUN_PIPELINE_TESTS: yes
|
RUN_PIPELINE_TESTS: yes
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 1 --dist=loadfile -m is_pipeline_test --make-reports=tests_torch_pipeline_gpu tests
|
python -m pytest -n 1 -v --dist=loadfile -m is_pipeline_test --make-reports=tests_torch_pipeline_gpu tests
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -112,7 +113,7 @@ jobs:
|
|||||||
TF_NUM_INTEROP_THREADS: 1
|
TF_NUM_INTEROP_THREADS: 1
|
||||||
TF_NUM_INTRAOP_THREADS: 16
|
TF_NUM_INTRAOP_THREADS: 16
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 1 --dist=loadfile --make-reports=tests_tf_gpu tests
|
python -m pytest -n 1 -v --dist=loadfile --make-reports=tests_tf_gpu tests
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -125,7 +126,7 @@ jobs:
|
|||||||
TF_NUM_INTEROP_THREADS: 1
|
TF_NUM_INTEROP_THREADS: 1
|
||||||
TF_NUM_INTRAOP_THREADS: 16
|
TF_NUM_INTRAOP_THREADS: 16
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 1 --dist=loadfile -m is_pipeline_test --make-reports=tests_tf_pipeline_gpu tests
|
python -m pytest -n 1 -v --dist=loadfile -m is_pipeline_test --make-reports=tests_tf_pipeline_gpu tests
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -168,7 +169,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
MKL_SERVICE_FORCE_INTEL: 1
|
MKL_SERVICE_FORCE_INTEL: 1
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 1 --dist=loadfile --make-reports=tests_torch_multi_gpu tests
|
python -m pytest -n 1 -v --dist=loadfile --make-reports=tests_torch_multi_gpu tests
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -179,7 +180,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
RUN_PIPELINE_TESTS: yes
|
RUN_PIPELINE_TESTS: yes
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 1 --dist=loadfile -m is_pipeline_test --make-reports=tests_torch_pipeline_multi_gpu tests
|
python -m pytest -n 1 -v --dist=loadfile -m is_pipeline_test --make-reports=tests_torch_pipeline_multi_gpu tests
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -220,7 +221,7 @@ jobs:
|
|||||||
TF_NUM_INTEROP_THREADS: 1
|
TF_NUM_INTEROP_THREADS: 1
|
||||||
TF_NUM_INTRAOP_THREADS: 16
|
TF_NUM_INTRAOP_THREADS: 16
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 1 --dist=loadfile --make-reports=tests_tf_multi_gpu tests
|
python -m pytest -n 1 -v --dist=loadfile --make-reports=tests_tf_multi_gpu tests
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -233,7 +234,7 @@ jobs:
|
|||||||
TF_NUM_INTEROP_THREADS: 1
|
TF_NUM_INTEROP_THREADS: 1
|
||||||
TF_NUM_INTRAOP_THREADS: 16
|
TF_NUM_INTRAOP_THREADS: 16
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 1 --dist=loadfile -m is_pipeline_test --make-reports=tests_tf_pipeline_multi_gpu tests
|
python -m pytest -n 1 -v --dist=loadfile -m is_pipeline_test --make-reports=tests_tf_pipeline_multi_gpu tests
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -274,7 +275,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run all tests on GPU
|
- name: Run all tests on GPU
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 1 --dist=loadfile --make-reports=tests_torch_cuda_extensions_gpu tests/deepspeed tests/extended
|
python -m pytest -n 1 -v --dist=loadfile --make-reports=tests_torch_cuda_extensions_gpu tests/deepspeed tests/extended
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -315,7 +316,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run all tests on GPU
|
- name: Run all tests on GPU
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -n 1 --dist=loadfile --make-reports=tests_torch_cuda_extensions_multi_gpu tests/deepspeed tests/extended
|
python -m pytest -n 1 -v --dist=loadfile --make-reports=tests_torch_cuda_extensions_multi_gpu tests/deepspeed tests/extended
|
||||||
|
|
||||||
- name: Failure short reports
|
- name: Failure short reports
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
|
|||||||
4
setup.py
4
setup.py
@@ -122,7 +122,7 @@ _deps = [
|
|||||||
"pyyaml>=5.1",
|
"pyyaml>=5.1",
|
||||||
"pydantic",
|
"pydantic",
|
||||||
"pytest",
|
"pytest",
|
||||||
"pytest-sugar",
|
"pytest-timeout",
|
||||||
"pytest-xdist",
|
"pytest-xdist",
|
||||||
"python>=3.6.0",
|
"python>=3.6.0",
|
||||||
"ray[tune]",
|
"ray[tune]",
|
||||||
@@ -259,7 +259,7 @@ extras["codecarbon"] = deps_list("codecarbon")
|
|||||||
extras["sentencepiece"] = deps_list("sentencepiece", "protobuf")
|
extras["sentencepiece"] = deps_list("sentencepiece", "protobuf")
|
||||||
extras["testing"] = (
|
extras["testing"] = (
|
||||||
deps_list(
|
deps_list(
|
||||||
"pytest", "pytest-xdist", "timeout-decorator", "parameterized", "psutil", "datasets", "pytest-sugar", "black", "sacrebleu", "rouge-score", "nltk"
|
"pytest", "pytest-xdist", "timeout-decorator", "parameterized", "psutil", "datasets", "pytest-timeout", "black", "sacrebleu", "rouge-score", "nltk"
|
||||||
)
|
)
|
||||||
+ extras["retrieval"]
|
+ extras["retrieval"]
|
||||||
+ extras["modelcreation"]
|
+ extras["modelcreation"]
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ deps = {
|
|||||||
"pyyaml": "pyyaml>=5.1",
|
"pyyaml": "pyyaml>=5.1",
|
||||||
"pydantic": "pydantic",
|
"pydantic": "pydantic",
|
||||||
"pytest": "pytest",
|
"pytest": "pytest",
|
||||||
"pytest-sugar": "pytest-sugar",
|
"pytest-timeout": "pytest-timeout",
|
||||||
"pytest-xdist": "pytest-xdist",
|
"pytest-xdist": "pytest-xdist",
|
||||||
"python": "python>=3.6.0",
|
"python": "python>=3.6.0",
|
||||||
"ray[tune]": "ray[tune]",
|
"ray[tune]": "ray[tune]",
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ def format_for_slack(total_results, results, scheduled: bool):
|
|||||||
"type": "header",
|
"type": "header",
|
||||||
"text": {
|
"text": {
|
||||||
"type": "plain_text",
|
"type": "plain_text",
|
||||||
"text": "🤗 Results of the scheduled tests, March 11, 2021." if scheduled else "🤗 Self-push results",
|
"text": "🤗 Results of the scheduled tests." if scheduled else "🤗 Self-push results",
|
||||||
"emoji": True,
|
"emoji": True,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user