From 325062ad6dbc8da9f29cc6e176344f8c3debc4a2 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Fri, 18 Oct 2024 21:55:10 +0200 Subject: [PATCH 1/7] bump: Torch `2.5.0` --- .azure/gpu-integrations.yml | 4 ++-- .azure/gpu-unittests.yml | 4 ++-- .github/workflows/ci-tests.yml | 6 +++--- .github/workflows/docker-build.yml | 1 + requirements/typing.txt | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.azure/gpu-integrations.yml b/.azure/gpu-integrations.yml index 8478ab6d3e0..a0e5e44ea71 100644 --- a/.azure/gpu-integrations.yml +++ b/.azure/gpu-integrations.yml @@ -22,8 +22,8 @@ jobs: torch-ver: "1.13" requires: "oldest" "torch | 2.x": - docker-image: "pytorch/pytorch:2.4.0-cuda12.1-cudnn9-runtime" - torch-ver: "2.4" + docker-image: "pytorch/pytorch:2.5.0-cuda12.1-cudnn9-runtime" + torch-ver: "2.5" # how long to run the job before automatically cancelling timeoutInMinutes: "40" # how much time to give 'run always even if cancelled tasks' before stopping them diff --git a/.azure/gpu-unittests.yml b/.azure/gpu-unittests.yml index 78dc6beee86..724f8444cbc 100644 --- a/.azure/gpu-unittests.yml +++ b/.azure/gpu-unittests.yml @@ -32,8 +32,8 @@ jobs: docker-image: "ubuntu22.04-cuda11.8.0-py3.9-torch1.13" torch-ver: "1.13" "PyTorch | 2.X stable": - docker-image: "ubuntu22.04-cuda12.1.1-py3.11-torch2.4" - torch-ver: "2.4" + docker-image: "ubuntu22.04-cuda12.1.1-py3.11-torch2.5" + torch-ver: "2.5" # how long to run the job before automatically cancelling timeoutInMinutes: "180" # how much time to give 'run always even if cancelled tasks' before stopping them diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 0647a865ebb..889d94718eb 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -42,7 +42,7 @@ jobs: - "2.1.2" - "2.2.2" - "2.3.1" - - "2.4.0" + - "2.5.0" include: # cover additional python and PT combinations - { os: "ubuntu-22.04", python-version: "3.8", pytorch-version: "1.13.1" } @@ -54,11 +54,11 @@ jobs: - { os: "macOS-13", python-version: "3.10", pytorch-version: "2.0.1" } # using the ARM based M1 machine - { os: "macOS-14", python-version: "3.10", pytorch-version: "2.0.1" } - - { os: "macOS-14", python-version: "3.11", pytorch-version: "2.4.0" } + - { os: "macOS-14", python-version: "3.11", pytorch-version: "2.5.0" } # some windows - { os: "windows-2022", python-version: "3.8", pytorch-version: "1.13.1" } - { os: "windows-2022", python-version: "3.10", pytorch-version: "2.0.1" } - - { os: "windows-2022", python-version: "3.11", pytorch-version: "2.4.0" } + - { os: "windows-2022", python-version: "3.11", pytorch-version: "2.5.0" } # Future released version #- { os: "ubuntu-22.04", python-version: "3.11", pytorch-version: "2.5.0" } #- { os: "macOS-14", python-version: "3.11", pytorch-version: "2.5.0" } diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 2c17c5ee68d..4d876cda2e3 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -73,6 +73,7 @@ jobs: - { python: "3.11", pytorch: "2.2", cuda: "12.1.1", ubuntu: "22.04" } - { python: "3.11", pytorch: "2.3", cuda: "12.1.1", ubuntu: "22.04" } - { python: "3.11", pytorch: "2.4", cuda: "12.1.1", ubuntu: "22.04" } + - { python: "3.11", pytorch: "2.5", cuda: "12.1.1", ubuntu: "22.04" } # the future version - test or RC version #- { python: "3.11", pytorch: "2.5", cuda: "12.1.1", ubuntu: "22.04" } steps: diff --git a/requirements/typing.txt b/requirements/typing.txt index 2b8cf0b5082..01c6897fa9c 100644 --- a/requirements/typing.txt +++ b/requirements/typing.txt @@ -1,5 +1,5 @@ mypy ==1.11.2 -torch ==2.4.1 +torch ==2.5.0 types-PyYAML types-emoji From 167132f447021423448f8f20ea5ec65b504d9b4e Mon Sep 17 00:00:00 2001 From: Jirka B Date: Fri, 18 Oct 2024 22:05:02 +0200 Subject: [PATCH 2/7] push --- .github/workflows/docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 4d876cda2e3..92b55515064 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -26,7 +26,7 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} env: - PUSH_DOCKERHUB: ${{ github.ref == 'refs/heads/master' || github.event_name != 'pull_request' }} + PUSH_DOCKERHUB: true # ${{ github.ref == 'refs/heads/master' || github.event_name != 'pull_request' }} jobs: build-Devcontainer: From d65f84c1b348a1a22c2916562a1a53f95ca292c1 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Fri, 18 Oct 2024 22:16:32 +0200 Subject: [PATCH 3/7] Revert "push" This reverts commit 167132f447021423448f8f20ea5ec65b504d9b4e. --- .github/workflows/docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 92b55515064..4d876cda2e3 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -26,7 +26,7 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} env: - PUSH_DOCKERHUB: true # ${{ github.ref == 'refs/heads/master' || github.event_name != 'pull_request' }} + PUSH_DOCKERHUB: ${{ github.ref == 'refs/heads/master' || github.event_name != 'pull_request' }} jobs: build-Devcontainer: From d292204fce2c03b23ac6f50f752d8a9d69504c57 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Fri, 18 Oct 2024 22:43:42 +0200 Subject: [PATCH 4/7] shorten --- .github/workflows/docker-build.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 4d876cda2e3..359f1e8a0a7 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -66,16 +66,16 @@ jobs: include: # These are the base images for PL release docker images, # so include at least all the combinations in release-dockers.yml. - - { python: "3.9", pytorch: "1.10", cuda: "11.3.1", ubuntu: "20.04" } + - { python: "3.9", pytorch: "1.10.2", cuda: "11.3.1", ubuntu: "20.04" } #- { python: "3.9", pytorch: "1.11", cuda: "11.8.0", ubuntu: "22.04" } - - { python: "3.9", pytorch: "1.13", cuda: "11.8.0", ubuntu: "22.04" } - - { python: "3.10", pytorch: "2.2", cuda: "12.1.1", ubuntu: "22.04" } - - { python: "3.11", pytorch: "2.2", cuda: "12.1.1", ubuntu: "22.04" } - - { python: "3.11", pytorch: "2.3", cuda: "12.1.1", ubuntu: "22.04" } - - { python: "3.11", pytorch: "2.4", cuda: "12.1.1", ubuntu: "22.04" } - - { python: "3.11", pytorch: "2.5", cuda: "12.1.1", ubuntu: "22.04" } + - { python: "3.9", pytorch: "1.13.1", cuda: "11.8.0", ubuntu: "22.04" } + - { python: "3.10", pytorch: "2.2.2", cuda: "12.1.1", ubuntu: "22.04" } + - { python: "3.11", pytorch: "2.2.2", cuda: "12.1.1", ubuntu: "22.04" } + - { python: "3.11", pytorch: "2.3.1", cuda: "12.1.1", ubuntu: "22.04" } + - { python: "3.11", pytorch: "2.4.1", cuda: "12.1.1", ubuntu: "22.04" } + - { python: "3.11", pytorch: "2.5.0", cuda: "12.1.1", ubuntu: "22.04" } # the future version - test or RC version - #- { python: "3.11", pytorch: "2.5", cuda: "12.1.1", ubuntu: "22.04" } + #- { python: "3.11", pytorch: "2.6", cuda: "12.1.1", ubuntu: "22.04" } steps: - uses: actions/checkout@v4 @@ -86,6 +86,12 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: shorten Torch version + run: | + # convert 1.10.2 to 1.10 + pt_version=$(echo ${{ matrix.pytorch }} | cut -d. -f1,2) + echo "PT_VERSION=$pt_version" >> $GITHUB_ENV + - name: Build (and Push) runner uses: docker/build-push-action@v6 with: @@ -96,5 +102,5 @@ jobs: CUDA_VERSION=${{ matrix.cuda }} file: dockers/ubuntu-cuda/Dockerfile push: ${{ env.PUSH_DOCKERHUB }} - tags: "pytorchlightning/torchmetrics:ubuntu${{ matrix.ubuntu }}-cuda${{ matrix.cuda }}-py${{ matrix.python }}-torch${{ matrix.pytorch }}" + tags: "pytorchlightning/torchmetrics:ubuntu${{ matrix.ubuntu }}-cuda${{ matrix.cuda }}-py${{ matrix.python }}-torch${{ env.PT_VERSION }}" timeout-minutes: 55 From e64a268a75ec65fe54009051e0382a611a103a7c Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Fri, 18 Oct 2024 22:48:43 +0200 Subject: [PATCH 5/7] Apply suggestions from code review --- .github/workflows/ci-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 889d94718eb..9c193eae015 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -42,6 +42,7 @@ jobs: - "2.1.2" - "2.2.2" - "2.3.1" + - "2.4.1" - "2.5.0" include: # cover additional python and PT combinations From 74538acf74ad4d62fe05627d3c5b211efe1ee495 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Fri, 18 Oct 2024 22:52:17 +0200 Subject: [PATCH 6/7] others --- requirements/_integrate.txt | 2 +- requirements/audio.txt | 2 +- requirements/base.txt | 2 +- requirements/detection.txt | 2 +- requirements/image.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements/_integrate.txt b/requirements/_integrate.txt index efc0370237e..87ee9a33585 100644 --- a/requirements/_integrate.txt +++ b/requirements/_integrate.txt @@ -1,4 +1,4 @@ # contentiously validated integration with these expected ranges # ToDo: investigate and add validation with 2.0+ on GPU -pytorch-lightning >=1.9.0, <2.5.0 +pytorch-lightning >=1.9.0, <2.6.0 diff --git a/requirements/audio.txt b/requirements/audio.txt index 0e443bfc4c0..dcfc5b05740 100644 --- a/requirements/audio.txt +++ b/requirements/audio.txt @@ -4,7 +4,7 @@ # this need to be the same as used inside speechmetrics pesq >=0.0.4, <0.0.5 pystoi >=0.4.0, <0.5.0 -torchaudio >=0.10.0, <2.5.0 +torchaudio >=0.10.0, <2.6.0 gammatone >=1.0.0, <1.1.0 librosa >=0.9.0, <0.11.0 onnxruntime >=1.12.0, <1.20 # installing onnxruntime_gpu-gpu failed on macos diff --git a/requirements/base.txt b/requirements/base.txt index 0140f7a5519..35f1b4406c7 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -3,6 +3,6 @@ numpy >1.20.0, <2.0 # strict, for compatibility reasons packaging >17.1 -torch >=1.10.0, <2.5.0 +torch >=1.10.0, <2.6.0 typing-extensions; python_version < '3.9' lightning-utilities >=0.8.0, <0.12.0 diff --git a/requirements/detection.txt b/requirements/detection.txt index cc65884fa16..0b3a8dcce48 100644 --- a/requirements/detection.txt +++ b/requirements/detection.txt @@ -1,5 +1,5 @@ # NOTE: the upper bound for the package version is only set for CI stability, and it is dropped while installing this package # in case you want to preserve/enforce restrictions on the latest compatible version, add "strict" as an in-line comment -torchvision >=0.8, <0.20.0 +torchvision >=0.8, <0.21.0 pycocotools >2.0.0, <2.1.0 diff --git a/requirements/image.txt b/requirements/image.txt index 70cd2ee21a2..8c31222b6ed 100644 --- a/requirements/image.txt +++ b/requirements/image.txt @@ -2,5 +2,5 @@ # in case you want to preserve/enforce restrictions on the latest compatible version, add "strict" as an in-line comment scipy >1.0.0, <1.15.0 -torchvision >=0.8, <0.20.0 +torchvision >=0.8, <0.21.0 torch-fidelity <=0.4.0 # bumping to allow install version from master, now used in testing From 8a6ef981aaead0d7924a03200a338edbe017fe2a Mon Sep 17 00:00:00 2001 From: Jirka B Date: Sat, 19 Oct 2024 11:09:53 +0200 Subject: [PATCH 7/7] py --- .github/workflows/ci-tests.yml | 7 ++++--- .github/workflows/docker-build.yml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 9c193eae015..2449ff972ff 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -32,7 +32,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-20.04"] - python-version: ["3.9"] + python-version: ["3.10"] pytorch-version: - "1.10.2" - "1.11.0" @@ -50,16 +50,17 @@ jobs: - { os: "ubuntu-22.04", python-version: "3.10", pytorch-version: "2.0.1" } - { os: "ubuntu-22.04", python-version: "3.10", pytorch-version: "2.2.2" } - { os: "ubuntu-22.04", python-version: "3.11", pytorch-version: "2.3.1" } + - { os: "ubuntu-22.04", python-version: "3.12", pytorch-version: "2.5.0" } # standard mac machine, not the M1 - { os: "macOS-13", python-version: "3.8", pytorch-version: "1.13.1" } - { os: "macOS-13", python-version: "3.10", pytorch-version: "2.0.1" } # using the ARM based M1 machine - { os: "macOS-14", python-version: "3.10", pytorch-version: "2.0.1" } - - { os: "macOS-14", python-version: "3.11", pytorch-version: "2.5.0" } + - { os: "macOS-14", python-version: "3.12", pytorch-version: "2.5.0" } # some windows - { os: "windows-2022", python-version: "3.8", pytorch-version: "1.13.1" } - { os: "windows-2022", python-version: "3.10", pytorch-version: "2.0.1" } - - { os: "windows-2022", python-version: "3.11", pytorch-version: "2.5.0" } + - { os: "windows-2022", python-version: "3.12", pytorch-version: "2.5.0" } # Future released version #- { os: "ubuntu-22.04", python-version: "3.11", pytorch-version: "2.5.0" } #- { os: "macOS-14", python-version: "3.11", pytorch-version: "2.5.0" } diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 359f1e8a0a7..5a21978f270 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -73,7 +73,7 @@ jobs: - { python: "3.11", pytorch: "2.2.2", cuda: "12.1.1", ubuntu: "22.04" } - { python: "3.11", pytorch: "2.3.1", cuda: "12.1.1", ubuntu: "22.04" } - { python: "3.11", pytorch: "2.4.1", cuda: "12.1.1", ubuntu: "22.04" } - - { python: "3.11", pytorch: "2.5.0", cuda: "12.1.1", ubuntu: "22.04" } + - { python: "3.12", pytorch: "2.5.0", cuda: "12.1.1", ubuntu: "22.04" } # the future version - test or RC version #- { python: "3.11", pytorch: "2.6", cuda: "12.1.1", ubuntu: "22.04" } steps: