Skip to content

Commit

Permalink
retry failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leej3 committed Apr 2, 2024
1 parent 8bcd2fa commit 57891d5
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 15 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/hvd-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ jobs:
target_dir: /tmp

- name: Run Tests
shell: bash -l {0}
run: |
bash tests/run_cpu_tests.sh
uses: nick-fields/retry@v3
with:
max_attempts: 2
shell: bash -l {0}
command: bash tests/run_cpu_tests.sh
on_retry_command: echo "EXTRA_PYTHON_ARGS=--last-failed" >> $GITHUB_ENV

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/pytorch-version-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,13 @@ jobs:
target_dir: /tmp

- name: Run Tests
shell: bash -l {0}
run: |
bash tests/run_cpu_tests.sh "not test_time_profilers"
uses: nick-fields/retry@v3
with:
max_attempts: 2
shell: bash -l {0}
command: bash tests/run_cpu_tests.sh "not test_time_profilers"
on_retry_command: echo "EXTRA_PYTHON_ARGS=--last-failed" >> $GITHUB_ENV


# create-issue:
# runs-on: ubuntu-latest
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/tpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,17 @@ jobs:
target_dir: /tmp

- name: Run Tests
run: |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${Python_ROOT_DIR}/lib
export XRT_DEVICE_MAP="CPU:0;/job:localservice/replica:0/task:0/device:XLA_CPU:0"
export XRT_WORKERS="localservice:0;grpc://localhost:40934"
python -c "import torch_xla; print('torch xla version:', torch_xla.__version__)"
bash tests/run_tpu_tests.sh
uses: nick-fields/retry@v3
with:
max_attempts: 2
command: |
python -c "import torch_xla; print('torch xla version:', torch_xla.__version__)"
bash tests/run_tpu_tests.sh
on_retry_command: echo "EXTRA_PYTHON_ARGS=--last-failed" >> $GITHUB_ENV
env:
LD_LIBRARY_PATH: ${{ env.LD_LIBRARY_PATH }}:${{ env.Python_ROOT_DIR }}/lib
XRT_DEVICE_MAP: "CPU:0;/job:localservice/replica:0/task:0/device:XLA_CPU:0"
XRT_WORKERS: "localservice:0;grpc://localhost:40934"

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,11 @@ jobs:
cp -R /tmp/MNIST .
- name: Run Tests
run: |
SKIP_DISTRIB_TESTS=${{ matrix.skip-distrib-tests }} bash tests/run_cpu_tests.sh
uses: nick-fields/retry@v3
with:
max_attempts: 2
command: SKIP_DISTRIB_TESTS=${{ matrix.skip-distrib-tests }} bash tests/run_cpu_tests.sh
on_retry_command: echo "EXTRA_PYTHON_ARGS=--last-failed" >> $GITHUB_ENV

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down

0 comments on commit 57891d5

Please sign in to comment.