From db0593dc4e751fc7996ddb8df23bf6f28c175962 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Tue, 28 Feb 2023 19:59:35 +0100 Subject: [PATCH 01/16] try upload test results --- .github/workflows/test-linux-cpu.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 8a9f7d33b49..74b63494fc4 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -54,4 +54,6 @@ jobs: # Run Tests python3 -m torch.utils.collect_env - python3 -m pytest --junitxml=test-results/junit.xml --durations 20 + TEST_RESULTS="${RUNNER_ARTIFACT_DIR}/test-results.xml" + echo "${TEST_RESULTS}" + python3 -m pytest --junitxml="${TEST_RESULTS}" --durations 20 -v From caf522a1f9183d2f2b7c235877e3195938281e5e Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Tue, 28 Feb 2023 20:02:03 +0100 Subject: [PATCH 02/16] [REVERTME] introduce some failures --- test/test_transforms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_transforms.py b/test/test_transforms.py index 03b385e9edd..d3b39e31427 100644 --- a/test/test_transforms.py +++ b/test/test_transforms.py @@ -2146,6 +2146,8 @@ def test_transformation_discrete(self, pil_image, input_img): @pytest.mark.parametrize("scale", [0.77, 1.0, 1.27]) @pytest.mark.parametrize("shear", range(-15, 15, 5)) def test_transformation_range(self, angle, translate, scale, shear, pil_image, input_img): + if angle * translate * shear < 0: + raise AssertionError("Boo!") self._test_transformation( angle=angle, translate=(translate, translate), From 0f8d554cd7f2cce18748e7b0201d06c58b436bb5 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 1 Mar 2023 09:17:10 +0100 Subject: [PATCH 03/16] name upload artifact --- .github/workflows/test-linux-cpu.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 74b63494fc4..ee4e7f45342 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -22,6 +22,7 @@ jobs: with: runner: linux.12xlarge repository: pytorch/vision + upload-artifact: test-results script: | # Mark Build Directory Safe git config --global --add safe.directory /__w/vision/vision @@ -54,6 +55,4 @@ jobs: # Run Tests python3 -m torch.utils.collect_env - TEST_RESULTS="${RUNNER_ARTIFACT_DIR}/test-results.xml" - echo "${TEST_RESULTS}" - python3 -m pytest --junitxml="${TEST_RESULTS}" --durations 20 -v + python3 -m pytest --junitxml="${RUNNER_ARTIFACT_DIR}/test-results.xml" --durations 20 -v test/test_transforms.py From 6f5b112d183499b79ef18009b9ad0c535cea8592 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 1 Mar 2023 09:52:30 +0100 Subject: [PATCH 04/16] trigger CI From 82e341f4d90e108d734262d3950df334e6b6457f Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 1 Mar 2023 10:04:53 +0100 Subject: [PATCH 05/16] return 0 even with failing tests --- .github/workflows/test-linux-cpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index ee4e7f45342..aa5b00eb3b6 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -55,4 +55,4 @@ jobs: # Run Tests python3 -m torch.utils.collect_env - python3 -m pytest --junitxml="${RUNNER_ARTIFACT_DIR}/test-results.xml" --durations 20 -v test/test_transforms.py + python3 -m pytest --junitxml="${RUNNER_ARTIFACT_DIR}/test-results.xml" --durations 20 -v test/test_transforms.py || true From 07e540151ac728f1f33a87db7306b0561a523d21 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 1 Mar 2023 10:22:14 +0100 Subject: [PATCH 06/16] try upload --- .github/workflows/test-linux-cpu.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index aa5b00eb3b6..3e173372303 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -18,7 +18,7 @@ jobs: matrix: python_version: ["3.8", "3.9", "3.10"] fail-fast: false - uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + uses: pmeier/test-infra/.github/workflows/linux_job.yml@test-results with: runner: linux.12xlarge repository: pytorch/vision @@ -55,4 +55,4 @@ jobs: # Run Tests python3 -m torch.utils.collect_env - python3 -m pytest --junitxml="${RUNNER_ARTIFACT_DIR}/test-results.xml" --durations 20 -v test/test_transforms.py || true + python3 -m pytest --junitxml="${RUNNER_ARTIFACT_DIR}/test-results.xml" --durations 20 -v test/test_transforms.py From 63f186de909a11a1c373efffb09ac9e12c941566 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 1 Mar 2023 10:27:32 +0100 Subject: [PATCH 07/16] trigger CI From 1f1df25a3bcd483e4a5c6232ddb6f9b009f13f6b Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 1 Mar 2023 14:02:20 +0100 Subject: [PATCH 08/16] use origin repo rather than fork --- .github/workflows/test-linux-cpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 3e173372303..7fb2f4c368d 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -18,7 +18,7 @@ jobs: matrix: python_version: ["3.8", "3.9", "3.10"] fail-fast: false - uses: pmeier/test-infra/.github/workflows/linux_job.yml@test-results + uses: pytorch/test-infra/.github/workflows/linux_job.yml@test-results with: runner: linux.12xlarge repository: pytorch/vision From e25ba3e7d21e245b3f6e7249f71e8261cc1bdfb0 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 1 Mar 2023 14:16:32 +0100 Subject: [PATCH 09/16] trigger CI From 1637ed56a9a1494bb1e07be6e390b0bda53b85be Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 1 Mar 2023 14:56:17 +0100 Subject: [PATCH 10/16] run full test suite --- .github/workflows/test-linux-cpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 7fb2f4c368d..3e872d23f2e 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -55,4 +55,4 @@ jobs: # Run Tests python3 -m torch.utils.collect_env - python3 -m pytest --junitxml="${RUNNER_ARTIFACT_DIR}/test-results.xml" --durations 20 -v test/test_transforms.py + python3 -m pytest --junitxml="${RUNNER_ARTIFACT_DIR}/test-results.xml" -v --durations 20 From a44008e37737b144a2877fbeb0d64833449e04c7 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 13 Mar 2023 11:35:23 +0100 Subject: [PATCH 11/16] fix linux workflows --- .github/workflows/test-linux.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index d2c246bdf63..53b496636b7 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -32,7 +32,6 @@ jobs: runner: ${{ matrix.runner }} gpu-arch-type: ${{ matrix.gpu-arch-type }} gpu-arch-version: ${{ matrix.gpu-arch-version }} - pytest-results: test-results.xml timeout: 120 script: | set -euo pipefail From b298df542a86f1e46c74cdd36c6c5f484c98c5ec Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 13 Mar 2023 11:36:43 +0100 Subject: [PATCH 12/16] also surface failing special tests --- .github/scripts/unittest.sh | 2 +- .github/workflows/test-linux.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/scripts/unittest.sh b/.github/scripts/unittest.sh index dfefff93ce4..41c750ebce2 100755 --- a/.github/scripts/unittest.sh +++ b/.github/scripts/unittest.sh @@ -14,5 +14,5 @@ pip install --progress-bar=off pytest pytest-mock pytest-cov echo '::endgroup::' echo '::group::Run unittests' -pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 +pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 echo '::endgroup::' diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 53b496636b7..7b141975954 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -69,7 +69,7 @@ jobs: echo '::endgroup::' echo '::group::Run ONNX tests' - pytest --durations=25 -v test/test_onnx.py + pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_onnx.py echo '::endgroup::' unittests-extended: @@ -101,5 +101,5 @@ jobs: echo '::group::Run extended unittests' export PYTORCH_TEST_WITH_EXTENDED=1 - pytest --durations=25 -v test/test_extended_*.py + pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_extended_*.py echo '::endgroup::' From 8dbfcb12a1220bffb8f77e0cd87a106bd9c57306 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 13 Mar 2023 11:40:31 +0100 Subject: [PATCH 13/16] fix refs --- .github/workflows/test-linux.yml | 7 +++++-- .github/workflows/test-macos.yml | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 7b141975954..93ce3413bde 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -28,6 +28,7 @@ jobs: fail-fast: false uses: pytorch/test-infra/.github/workflows/linux_job.yml@test-results with: + test-infra-ref: test-results repository: pytorch/vision runner: ${{ matrix.runner }} gpu-arch-type: ${{ matrix.gpu-arch-type }} @@ -43,8 +44,9 @@ jobs: ./.github/scripts/unittest.sh onnx: - uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + uses: pytorch/test-infra/.github/workflows/linux_job.yml@test-results with: + test-infra-ref: test-results repository: pytorch/vision script: | set -euo pipefail @@ -73,8 +75,9 @@ jobs: echo '::endgroup::' unittests-extended: - uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + uses: pytorch/test-infra/.github/workflows/linux_job.yml@test-results with: + test-infra-ref: test-results repository: pytorch/vision script: | set -euo pipefail diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 03e4b2db121..513fdfa46e9 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -23,8 +23,9 @@ jobs: - python-version: "3.8" runner: macos-m1-12 fail-fast: false - uses: pytorch/test-infra/.github/workflows/macos_job.yml@main + uses: pytorch/test-infra/.github/workflows/macos_job.yml@test-results with: + test-infra-ref: test-results repository: pytorch/vision # We need an increased timeout here, since the macos-12 runner is the free one from GH # and needs roughly 2 hours to just run the test suite From e217e0d55716536e5dabe496615076b99e8cf01c Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 13 Mar 2023 14:15:40 +0100 Subject: [PATCH 14/16] trigger CI From 312f4dcbbf09b2250ddfcc3994ac1ca90c181653 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 13 Mar 2023 23:28:19 +0100 Subject: [PATCH 15/16] use main branch from test-infra --- .github/workflows/test-linux.yml | 9 +++------ .github/workflows/test-macos.yml | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 93ce3413bde..b9b01b7a55e 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -26,9 +26,8 @@ jobs: gpu-arch-type: cuda gpu-arch-version: "11.7" fail-fast: false - uses: pytorch/test-infra/.github/workflows/linux_job.yml@test-results + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main with: - test-infra-ref: test-results repository: pytorch/vision runner: ${{ matrix.runner }} gpu-arch-type: ${{ matrix.gpu-arch-type }} @@ -44,9 +43,8 @@ jobs: ./.github/scripts/unittest.sh onnx: - uses: pytorch/test-infra/.github/workflows/linux_job.yml@test-results + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main with: - test-infra-ref: test-results repository: pytorch/vision script: | set -euo pipefail @@ -75,9 +73,8 @@ jobs: echo '::endgroup::' unittests-extended: - uses: pytorch/test-infra/.github/workflows/linux_job.yml@test-results + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main with: - test-infra-ref: test-results repository: pytorch/vision script: | set -euo pipefail diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 513fdfa46e9..03e4b2db121 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -23,9 +23,8 @@ jobs: - python-version: "3.8" runner: macos-m1-12 fail-fast: false - uses: pytorch/test-infra/.github/workflows/macos_job.yml@test-results + uses: pytorch/test-infra/.github/workflows/macos_job.yml@main with: - test-infra-ref: test-results repository: pytorch/vision # We need an increased timeout here, since the macos-12 runner is the free one from GH # and needs roughly 2 hours to just run the test suite From cc11bde0562cd0fdb419708db9fe717ade891dd6 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Tue, 14 Mar 2023 09:17:24 +0100 Subject: [PATCH 16/16] Revert "[REVERTME] introduce some failures" This reverts commit caf522a1f9183d2f2b7c235877e3195938281e5e. --- test/test_transforms.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/test_transforms.py b/test/test_transforms.py index 5cf281ad3d6..c96fbb28496 100644 --- a/test/test_transforms.py +++ b/test/test_transforms.py @@ -2146,8 +2146,6 @@ def test_transformation_discrete(self, pil_image, input_img): @pytest.mark.parametrize("scale", [0.77, 1.0, 1.27]) @pytest.mark.parametrize("shear", range(-15, 15, 5)) def test_transformation_range(self, angle, translate, scale, shear, pil_image, input_img): - if angle * translate * shear < 0: - raise AssertionError("Boo!") self._test_transformation( angle=angle, translate=(translate, translate),