From 1c8fdf9f58a2e4e00c1dc3a06074d6b38ad3592a Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Tue, 7 Mar 2023 16:54:50 +0100 Subject: [PATCH 01/14] port special tests from CircleCI to GHA --- .github/{unittest.sh => scripts/setup-env.sh} | 8 -- .github/scripts/unittest.sh | 18 +++++ .github/workflows/test-linux.yml | 75 ++++++++++++++++++- 3 files changed, 90 insertions(+), 11 deletions(-) rename .github/{unittest.sh => scripts/setup-env.sh} (91%) create mode 100755 .github/scripts/unittest.sh diff --git a/.github/unittest.sh b/.github/scripts/setup-env.sh similarity index 91% rename from .github/unittest.sh rename to .github/scripts/setup-env.sh index 0109a5cc2b1..c405668ddf8 100755 --- a/.github/unittest.sh +++ b/.github/scripts/setup-env.sh @@ -69,11 +69,3 @@ echo '::endgroup::' echo '::group::Collect PyTorch environment information' python -m torch.utils.collect_env echo '::endgroup::' - -echo '::group::Install testing utilities' -pip install --progress-bar=off pytest pytest-mock pytest-cov -echo '::endgroup::' - -echo '::group::Run tests' -pytest --durations=25 -echo '::endgroup::' diff --git a/.github/scripts/unittest.sh b/.github/scripts/unittest.sh new file mode 100755 index 00000000000..ca3cfd6c0bc --- /dev/null +++ b/.github/scripts/unittest.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -euo pipefail + +./.github/scripts/setup-env.sh + +# Prepare conda +CONDA_PATH=$(which conda) +eval "$(${CONDA_PATH} shell.bash hook)" +conda activate ci + +echo '::group::Install testing utilities' +pip install --progress-bar=off pytest pytest-mock pytest-cov +echo '::endgroup::' + +echo '::group::Run unittests' +pytest --durations=25 +echo '::endgroup::' diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 133eaf606eb..a17b167d4f9 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -1,4 +1,4 @@ -name: Unit-tests on Linux +name: Tests on Linux on: pull_request: @@ -10,7 +10,7 @@ on: workflow_dispatch: jobs: - tests: + unittests: strategy: matrix: python-version: @@ -38,4 +38,73 @@ jobs: export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} - ./.github/unittest.sh + ./.github/scripts/unittest.sh + + torchhub: + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + repository: pytorch/vision + script: | + export PYTHON_VERSION=3.8 + export GPU_ARCH_TYPE=cpu + + ./.github/scripts/setup-env.sh + + # Prepare conda + CONDA_PATH=$(which conda) + eval "$(${CONDA_PATH} shell.bash hook)" + conda activate ci + + echo '::group::Run torchhub tests' + pytest --durations=25 -v test/test_hub.py + echo '::endgroup::' + + onnx: + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + repository: pytorch/vision + script: | + export PYTHON_VERSION=3.8 + export GPU_ARCH_TYPE=cpu + + ./.github/scripts/setup-env.sh + + # Prepare conda + CONDA_PATH=$(which conda) + eval "$(${CONDA_PATH} shell.bash hook)" + conda activate ci + + echo '::group::Install ONNX' + pip install --progress-bar=off onnx onnxruntime + echo '::endgroup::' + + echo '::group::Run torchhub tests' + pytest --durations=25 -v test/test_hub.py + echo '::endgroup::' + + unittests-extended: + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + repository: pytorch/vision + script: | + export PYTHON_VERSION=3.8 + export GPU_ARCH_TYPE=cpu + + ./.github/scripts/setup-env.sh + + # Prepare conda + CONDA_PATH=$(which conda) + eval "$(${CONDA_PATH} shell.bash hook)" + conda activate ci + + echo '::group::Pre-download model weights' + conda install wget parallel + mkdir -p ~/.cache/torch/hub/checkpoints + python scripts/collect_model_urls.py torchvision/models \ + | parallel -j0 'wget --no-verbose -O ~/.cache/torch/hub/checkpoints/`basename {}` {}\?source=ci' + echo '::endgroup::' + + echo '::group::Run torchhub tests' + export PYTORCH_TEST_WITH_EXTENDED=1 + pytest --durations=25 -v test/test_extended_*.py + echo '::endgroup::' From 18fbc1c5c9377f8f27eda5bdefd2c96ef34bb510 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Tue, 7 Mar 2023 17:36:39 +0100 Subject: [PATCH 02/14] install pytest --- .github/workflows/test-linux.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index a17b167d4f9..0680f48569a 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -55,6 +55,10 @@ jobs: eval "$(${CONDA_PATH} shell.bash hook)" conda activate ci + echo '::group::Install testing utilities' + pip install --progress-bar=off pytest + echo '::endgroup::' + echo '::group::Run torchhub tests' pytest --durations=25 -v test/test_hub.py echo '::endgroup::' @@ -78,6 +82,10 @@ jobs: pip install --progress-bar=off onnx onnxruntime echo '::endgroup::' + echo '::group::Install testing utilities' + pip install --progress-bar=off pytest + echo '::endgroup::' + echo '::group::Run torchhub tests' pytest --durations=25 -v test/test_hub.py echo '::endgroup::' @@ -104,6 +112,10 @@ jobs: | parallel -j0 'wget --no-verbose -O ~/.cache/torch/hub/checkpoints/`basename {}` {}\?source=ci' echo '::endgroup::' + echo '::group::Install testing utilities' + pip install --progress-bar=off pytest + echo '::endgroup::' + echo '::group::Run torchhub tests' export PYTORCH_TEST_WITH_EXTENDED=1 pytest --durations=25 -v test/test_extended_*.py From 0daaf9cae94345e71d107320552bf757803579d1 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Tue, 7 Mar 2023 17:39:12 +0100 Subject: [PATCH 03/14] add script to async download model urls --- .github/workflows/test-linux.yml | 6 ++---- scripts/download_model_urls.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 scripts/download_model_urls.py diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 0680f48569a..8fad72ffbba 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -106,10 +106,8 @@ jobs: conda activate ci echo '::group::Pre-download model weights' - conda install wget parallel - mkdir -p ~/.cache/torch/hub/checkpoints - python scripts/collect_model_urls.py torchvision/models \ - | parallel -j0 'wget --no-verbose -O ~/.cache/torch/hub/checkpoints/`basename {}` {}\?source=ci' + pip install --progress-bar=off aiohttp aiofiles tqdm + python scripts/download_model_urls.py echo '::endgroup::' echo '::group::Install testing utilities' diff --git a/scripts/download_model_urls.py b/scripts/download_model_urls.py new file mode 100644 index 00000000000..fd7e4079068 --- /dev/null +++ b/scripts/download_model_urls.py @@ -0,0 +1,30 @@ +import asyncio +import sys +from pathlib import Path +from urllib.parse import urlsplit + +import aiofiles +import aiohttp +from torchvision import models +from tqdm.asyncio import tqdm + + +async def main(download_root): + download_root.mkdir(parents=True, exist_ok=True) + urls = {weight.url for name in models.list_models() for weight in iter(models.get_model_weights(name))} + async with aiohttp.ClientSession() as session: + await tqdm.gather(*[download(download_root, session, url) for url in urls]) + + +async def download(download_root, session, url): + response = await session.get(url) + + file_name = Path(urlsplit(url).path).name + async with aiofiles.open(download_root / file_name, "wb") as f: + async for data in response.content.iter_any(): + await f.write(data) + + +if __name__ == "__main__": + download_root = Path(sys.argv[1]) if len(sys.argv) > 1 else Path("~/.cache/torch/hub/checkpoints") + asyncio.get_event_loop().run_until_complete(main(download_root)) From f800fa5388e4b0943c0e7f2804ea9f1bc29de02a Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 8 Mar 2023 09:38:25 +0100 Subject: [PATCH 04/14] actually run ONNX tests --- .github/workflows/test-linux.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 8fad72ffbba..4a12d122b26 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -86,8 +86,8 @@ jobs: pip install --progress-bar=off pytest echo '::endgroup::' - echo '::group::Run torchhub tests' - pytest --durations=25 -v test/test_hub.py + echo '::group::Run ONNX tests' + pytest --durations=25 -v test/test_onnx.py echo '::endgroup::' unittests-extended: @@ -114,7 +114,7 @@ jobs: pip install --progress-bar=off pytest echo '::endgroup::' - echo '::group::Run torchhub tests' + echo '::group::Run extended unittests' export PYTORCH_TEST_WITH_EXTENDED=1 pytest --durations=25 -v test/test_extended_*.py echo '::endgroup::' From 19b76075b48bbad7ece73d477cc2cfa70141e17f Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 8 Mar 2023 09:38:37 +0100 Subject: [PATCH 05/14] fix path in model weights download --- scripts/download_model_urls.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/download_model_urls.py b/scripts/download_model_urls.py index fd7e4079068..5d66131a76d 100644 --- a/scripts/download_model_urls.py +++ b/scripts/download_model_urls.py @@ -10,6 +10,7 @@ async def main(download_root): + print(f"Downloading model weights to {download_root}") download_root.mkdir(parents=True, exist_ok=True) urls = {weight.url for name in models.list_models() for weight in iter(models.get_model_weights(name))} async with aiohttp.ClientSession() as session: @@ -26,5 +27,7 @@ async def download(download_root, session, url): if __name__ == "__main__": - download_root = Path(sys.argv[1]) if len(sys.argv) > 1 else Path("~/.cache/torch/hub/checkpoints") + download_root = ( + (Path(sys.argv[1]) if len(sys.argv) > 1 else Path("~/.cache/torch/hub/checkpoints")).expanduser().resolve() + ) asyncio.get_event_loop().run_until_complete(main(download_root)) From 7e94344c15202d921611f099b6212f38e2ed6535 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 8 Mar 2023 10:57:03 +0100 Subject: [PATCH 06/14] increase timeout, add total time, and add request source --- scripts/download_model_urls.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/download_model_urls.py b/scripts/download_model_urls.py index 5d66131a76d..f5f53d71e98 100644 --- a/scripts/download_model_urls.py +++ b/scripts/download_model_urls.py @@ -1,6 +1,7 @@ import asyncio import sys from pathlib import Path +from time import perf_counter from urllib.parse import urlsplit import aiofiles @@ -10,15 +11,17 @@ async def main(download_root): - print(f"Downloading model weights to {download_root}") download_root.mkdir(parents=True, exist_ok=True) urls = {weight.url for name in models.list_models() for weight in iter(models.get_model_weights(name))} - async with aiohttp.ClientSession() as session: + + async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=None)) as session: await tqdm.gather(*[download(download_root, session, url) for url in urls]) async def download(download_root, session, url): - response = await session.get(url) + response = await session.get(url, params=dict(source="ci")) + + assert response.ok file_name = Path(urlsplit(url).path).name async with aiofiles.open(download_root / file_name, "wb") as f: @@ -30,4 +33,9 @@ async def download(download_root, session, url): download_root = ( (Path(sys.argv[1]) if len(sys.argv) > 1 else Path("~/.cache/torch/hub/checkpoints")).expanduser().resolve() ) + print(f"Downloading model weights to {download_root}") + start = perf_counter() asyncio.get_event_loop().run_until_complete(main(download_root)) + stop = perf_counter() + minutes, seconds = divmod(stop - start, 60) + print(f"Download took {minutes:2.0f}m {seconds:2.0f}s") From 5d26aad5a8db4915aa64fe96d25ed8805d904e9e Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 8 Mar 2023 11:15:50 +0100 Subject: [PATCH 07/14] expand bash strict mode --- .github/workflows/test-linux.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 4a12d122b26..7266e970f90 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -34,6 +34,8 @@ jobs: gpu-arch-version: ${{ matrix.gpu-arch-version }} timeout: 120 script: | + set -euo pipefail + export PYTHON_VERSION=${{ matrix.python-version }} export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} @@ -45,6 +47,8 @@ jobs: with: repository: pytorch/vision script: | + set -euo pipefail + export PYTHON_VERSION=3.8 export GPU_ARCH_TYPE=cpu @@ -68,6 +72,8 @@ jobs: with: repository: pytorch/vision script: | + set -euo pipefail + export PYTHON_VERSION=3.8 export GPU_ARCH_TYPE=cpu @@ -95,6 +101,8 @@ jobs: with: repository: pytorch/vision script: | + set -euo pipefail + export PYTHON_VERSION=3.8 export GPU_ARCH_TYPE=cpu From 5d6f391b88ab0133c55f47ce5179fdf7d8f37ed0 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 8 Mar 2023 12:52:29 +0100 Subject: [PATCH 08/14] try download with multiprocessing with threads --- .github/workflows/test-linux.yml | 2 +- scripts/download_model_urls.py | 34 ++++++++++++++++++++------------ 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 7266e970f90..48eda73f53a 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -114,7 +114,7 @@ jobs: conda activate ci echo '::group::Pre-download model weights' - pip install --progress-bar=off aiohttp aiofiles tqdm + pip install --progress-bar=off requests tqdm python scripts/download_model_urls.py echo '::endgroup::' diff --git a/scripts/download_model_urls.py b/scripts/download_model_urls.py index f5f53d71e98..92cd1af6e3c 100644 --- a/scripts/download_model_urls.py +++ b/scripts/download_model_urls.py @@ -1,32 +1,40 @@ -import asyncio import sys +from concurrent.futures import as_completed, ThreadPoolExecutor from pathlib import Path from time import perf_counter from urllib.parse import urlsplit -import aiofiles -import aiohttp +import requests +import tqdm from torchvision import models -from tqdm.asyncio import tqdm -async def main(download_root): +def main(download_root): download_root.mkdir(parents=True, exist_ok=True) urls = {weight.url for name in models.list_models() for weight in iter(models.get_model_weights(name))} - async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=None)) as session: - await tqdm.gather(*[download(download_root, session, url) for url in urls]) + with requests.Session() as session, tqdm.tqdm(total=len(urls)) as progress_bar: + session.params = dict(source="ci") + with ThreadPoolExecutor() as executor: + futures = [executor.submit(download, download_root, session, url) for url in sorted(urls)] + for future in as_completed(futures): + file_name = future.result() + progress_bar.set_description(file_name) + progress_bar.update() -async def download(download_root, session, url): - response = await session.get(url, params=dict(source="ci")) + +def download(download_root, session, url): + response = session.get(url) assert response.ok file_name = Path(urlsplit(url).path).name - async with aiofiles.open(download_root / file_name, "wb") as f: - async for data in response.content.iter_any(): - await f.write(data) + with open(download_root / file_name, "wb") as file: + for data in response.iter_content(32 * 1024): + file.write(data) + + return file_name if __name__ == "__main__": @@ -35,7 +43,7 @@ async def download(download_root, session, url): ) print(f"Downloading model weights to {download_root}") start = perf_counter() - asyncio.get_event_loop().run_until_complete(main(download_root)) + main(download_root) stop = perf_counter() minutes, seconds = divmod(stop - start, 60) print(f"Download took {minutes:2.0f}m {seconds:2.0f}s") From 933a78bf59277ce88b378a7b28cff1f498c2c19f Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 8 Mar 2023 12:53:59 +0100 Subject: [PATCH 09/14] remove torch.hub tests --- .github/workflows/test-linux.yml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 48eda73f53a..92484066a32 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -42,31 +42,6 @@ jobs: ./.github/scripts/unittest.sh - torchhub: - uses: pytorch/test-infra/.github/workflows/linux_job.yml@main - with: - repository: pytorch/vision - script: | - set -euo pipefail - - export PYTHON_VERSION=3.8 - export GPU_ARCH_TYPE=cpu - - ./.github/scripts/setup-env.sh - - # Prepare conda - CONDA_PATH=$(which conda) - eval "$(${CONDA_PATH} shell.bash hook)" - conda activate ci - - echo '::group::Install testing utilities' - pip install --progress-bar=off pytest - echo '::endgroup::' - - echo '::group::Run torchhub tests' - pytest --durations=25 -v test/test_hub.py - echo '::endgroup::' - onnx: uses: pytorch/test-infra/.github/workflows/linux_job.yml@main with: From 4909c84d66ecf4640a74b4d1591909443d98ee57 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 8 Mar 2023 13:24:53 +0100 Subject: [PATCH 10/14] Revert "try download with multiprocessing with threads" This reverts commit 5d6f391b88ab0133c55f47ce5179fdf7d8f37ed0. --- .github/workflows/test-linux.yml | 2 +- scripts/download_model_urls.py | 34 ++++++++++++-------------------- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 92484066a32..bab30916131 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -89,7 +89,7 @@ jobs: conda activate ci echo '::group::Pre-download model weights' - pip install --progress-bar=off requests tqdm + pip install --progress-bar=off aiohttp aiofiles tqdm python scripts/download_model_urls.py echo '::endgroup::' diff --git a/scripts/download_model_urls.py b/scripts/download_model_urls.py index 92cd1af6e3c..f5f53d71e98 100644 --- a/scripts/download_model_urls.py +++ b/scripts/download_model_urls.py @@ -1,40 +1,32 @@ +import asyncio import sys -from concurrent.futures import as_completed, ThreadPoolExecutor from pathlib import Path from time import perf_counter from urllib.parse import urlsplit -import requests -import tqdm +import aiofiles +import aiohttp from torchvision import models +from tqdm.asyncio import tqdm -def main(download_root): +async def main(download_root): download_root.mkdir(parents=True, exist_ok=True) urls = {weight.url for name in models.list_models() for weight in iter(models.get_model_weights(name))} - with requests.Session() as session, tqdm.tqdm(total=len(urls)) as progress_bar: - session.params = dict(source="ci") + async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=None)) as session: + await tqdm.gather(*[download(download_root, session, url) for url in urls]) - with ThreadPoolExecutor() as executor: - futures = [executor.submit(download, download_root, session, url) for url in sorted(urls)] - for future in as_completed(futures): - file_name = future.result() - progress_bar.set_description(file_name) - progress_bar.update() - -def download(download_root, session, url): - response = session.get(url) +async def download(download_root, session, url): + response = await session.get(url, params=dict(source="ci")) assert response.ok file_name = Path(urlsplit(url).path).name - with open(download_root / file_name, "wb") as file: - for data in response.iter_content(32 * 1024): - file.write(data) - - return file_name + async with aiofiles.open(download_root / file_name, "wb") as f: + async for data in response.content.iter_any(): + await f.write(data) if __name__ == "__main__": @@ -43,7 +35,7 @@ def download(download_root, session, url): ) print(f"Downloading model weights to {download_root}") start = perf_counter() - main(download_root) + asyncio.get_event_loop().run_until_complete(main(download_root)) stop = perf_counter() minutes, seconds = divmod(stop - start, 60) print(f"Download took {minutes:2.0f}m {seconds:2.0f}s") From 2b94a36f9056bc46df3d61b00f65302f2fc80ca4 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 8 Mar 2023 13:28:36 +0100 Subject: [PATCH 11/14] fix macos script location --- .github/workflows/test-macos.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index ce4d8cb1fe3..e4bdc983ac5 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -31,7 +31,9 @@ jobs: timeout: 240 runner: ${{ matrix.runner }} script: | + set -euo pipefail + export PYTHON_VERSION=${{ matrix.python-version }} export GPU_ARCH_TYPE=cpu - ./.github/unittest.sh + ./.github/scripts/unittest.sh From 3cafef246dd791e7f781df375a8e95409a49d35a Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 8 Mar 2023 13:29:25 +0100 Subject: [PATCH 12/14] cleanup --- .github/workflows/test-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index e4bdc983ac5..f188a6416ed 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -1,4 +1,4 @@ -name: Unit-tests on macOS +name: Tests on macOS on: pull_request: @@ -10,7 +10,7 @@ on: workflow_dispatch: jobs: - tests: + unittests: strategy: matrix: python-version: From 3a3b300831bc36eddb04aefffb79f70d98439fcf Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 8 Mar 2023 22:16:50 +0100 Subject: [PATCH 13/14] try bash -x --- .github/scripts/setup-env.sh | 2 +- .github/scripts/unittest.sh | 2 +- .github/workflows/test-linux.yml | 6 +++--- .github/workflows/test-macos.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/scripts/setup-env.sh b/.github/scripts/setup-env.sh index 80787f4dd84..24e348c61df 100755 --- a/.github/scripts/setup-env.sh +++ b/.github/scripts/setup-env.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -euo pipefail +set -euxo pipefail # Prepare conda CONDA_PATH=$(which conda) diff --git a/.github/scripts/unittest.sh b/.github/scripts/unittest.sh index ca3cfd6c0bc..69c8603c136 100755 --- a/.github/scripts/unittest.sh +++ b/.github/scripts/unittest.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -euo pipefail +set -euxo pipefail ./.github/scripts/setup-env.sh diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index bab30916131..9e1ca023f05 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -34,7 +34,7 @@ jobs: gpu-arch-version: ${{ matrix.gpu-arch-version }} timeout: 120 script: | - set -euo pipefail + set -euxo pipefail export PYTHON_VERSION=${{ matrix.python-version }} export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} @@ -47,7 +47,7 @@ jobs: with: repository: pytorch/vision script: | - set -euo pipefail + set -euxo pipefail export PYTHON_VERSION=3.8 export GPU_ARCH_TYPE=cpu @@ -76,7 +76,7 @@ jobs: with: repository: pytorch/vision script: | - set -euo pipefail + set -euxo pipefail export PYTHON_VERSION=3.8 export GPU_ARCH_TYPE=cpu diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index f188a6416ed..0d4bc272da6 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -31,7 +31,7 @@ jobs: timeout: 240 runner: ${{ matrix.runner }} script: | - set -euo pipefail + set -euxo pipefail export PYTHON_VERSION=${{ matrix.python-version }} export GPU_ARCH_TYPE=cpu From e6708542135afc3a11dfa302c84c17dc8a27b96d Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Wed, 8 Mar 2023 22:28:01 +0100 Subject: [PATCH 14/14] Revert "try bash -x" This reverts commit 3a3b300831bc36eddb04aefffb79f70d98439fcf. --- .github/scripts/setup-env.sh | 2 +- .github/scripts/unittest.sh | 2 +- .github/workflows/test-linux.yml | 6 +++--- .github/workflows/test-macos.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/scripts/setup-env.sh b/.github/scripts/setup-env.sh index 24e348c61df..80787f4dd84 100755 --- a/.github/scripts/setup-env.sh +++ b/.github/scripts/setup-env.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -euxo pipefail +set -euo pipefail # Prepare conda CONDA_PATH=$(which conda) diff --git a/.github/scripts/unittest.sh b/.github/scripts/unittest.sh index 69c8603c136..ca3cfd6c0bc 100755 --- a/.github/scripts/unittest.sh +++ b/.github/scripts/unittest.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -euxo pipefail +set -euo pipefail ./.github/scripts/setup-env.sh diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 9e1ca023f05..bab30916131 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -34,7 +34,7 @@ jobs: gpu-arch-version: ${{ matrix.gpu-arch-version }} timeout: 120 script: | - set -euxo pipefail + set -euo pipefail export PYTHON_VERSION=${{ matrix.python-version }} export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} @@ -47,7 +47,7 @@ jobs: with: repository: pytorch/vision script: | - set -euxo pipefail + set -euo pipefail export PYTHON_VERSION=3.8 export GPU_ARCH_TYPE=cpu @@ -76,7 +76,7 @@ jobs: with: repository: pytorch/vision script: | - set -euxo pipefail + set -euo pipefail export PYTHON_VERSION=3.8 export GPU_ARCH_TYPE=cpu diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 0d4bc272da6..f188a6416ed 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -31,7 +31,7 @@ jobs: timeout: 240 runner: ${{ matrix.runner }} script: | - set -euxo pipefail + set -euo pipefail export PYTHON_VERSION=${{ matrix.python-version }} export GPU_ARCH_TYPE=cpu