From 625583967f726e2bdd7cc7df2d3346568738f945 Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Thu, 28 Mar 2024 15:59:14 +0100 Subject: [PATCH 1/8] ci/gpu: compress computed caches & bump `torch~2.2.2` (#2480) * ci/gpu: compress computed caches * torch 2.2.2 * sanity update * dockers prune * Apply suggestions from code review --- .azure/gpu-integrations.yml | 8 +++---- .azure/gpu-unittests.yml | 36 +++++++++++++++++------------- .github/workflows/ci-tests.yml | 12 +++++----- .github/workflows/docker-build.yml | 5 +---- requirements/audio.txt | 2 +- requirements/base.txt | 2 +- requirements/typing.txt | 2 +- 7 files changed, 35 insertions(+), 32 deletions(-) diff --git a/.azure/gpu-integrations.yml b/.azure/gpu-integrations.yml index 024cc229b66..a0fbd44457e 100644 --- a/.azure/gpu-integrations.yml +++ b/.azure/gpu-integrations.yml @@ -19,11 +19,11 @@ jobs: matrix: "torch | 1.x": docker-image: "pytorchlightning/torchmetrics:ubuntu22.04-cuda11.8.0-py3.9-torch1.13" - torch-ver: "1.13.1" + torch-ver: "1.13" requires: "oldest" "torch | 2.x": - docker-image: "pytorch/pytorch:2.2.1-cuda12.1-cudnn8-runtime" - torch-ver: "2.2.1" + docker-image: "pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime" + torch-ver: "2.2" # 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 @@ -91,7 +91,7 @@ jobs: - bash: | set -e pip list - python -c "from torch import __version__ as ver ; assert str(ver).split('+')[0] == '$(torch-ver)', f'PyTorch: {ver}'" + python -c "from torch import __version__ as ver ; assert '.'.join(str(ver).split('.')[:2]) == '$(torch-ver)', f'PyTorch: {ver}'" python -c "import torch ; mgpu = torch.cuda.device_count() ; assert mgpu >= 2, f'found GPUs: {mgpu}'" displayName: "Sanity check" diff --git a/.azure/gpu-unittests.yml b/.azure/gpu-unittests.yml index f125189adb5..5b67f052d74 100644 --- a/.azure/gpu-unittests.yml +++ b/.azure/gpu-unittests.yml @@ -19,14 +19,14 @@ jobs: matrix: "PyTorch | 1.10": # Torch does not have build wheels with old Torch versions for newer CUDA - docker-image: "pytorchlightning/torchmetrics:ubuntu20.04-cuda11.3.1-py3.9-torch1.10" - torch-ver: "1.10.2" + docker-image: "ubuntu20.04-cuda11.3.1-py3.9-torch1.10" + torch-ver: "1.10" "PyTorch | 1.X": - docker-image: "pytorchlightning/torchmetrics:ubuntu22.04-cuda11.8.0-py3.9-torch1.13" - torch-ver: "1.13.1" + docker-image: "ubuntu22.04-cuda11.8.0-py3.9-torch1.13" + torch-ver: "1.13" "PyTorch | 2.X": - docker-image: "pytorchlightning/torchmetrics:ubuntu22.04-cuda12.1.1-py3.11-torch2.2" - torch-ver: "2.2.1" + docker-image: "ubuntu22.04-cuda12.1.1-py3.11-torch2.2" + torch-ver: "2.2" # 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 @@ -47,11 +47,12 @@ jobs: # MKL_THREADING_LAYER: "GNU" MKL_SERVICE_FORCE_INTEL: "1" TEST_DIRS: "unittests" + CACHED_REFERENCES: "/var/tmp/cached-references.zip" # todo: consider unfreeze for master too FREEZE_REQUIREMENTS: 1 container: - image: "$(docker-image)" + image: "pytorchlightning/torchmetrics:$(docker-image)" options: "--gpus=all --shm-size=8g -v /var/tmp:/var/tmp" workspace: @@ -119,21 +120,26 @@ jobs: set -e pip list python -c "import torch ; mgpu = torch.cuda.device_count() ; assert mgpu >= 2, f'found GPUs: {mgpu}'" - python -c "from torch import __version__ as ver ; assert str(ver).split('+')[0] == '$(torch-ver)', f'PyTorch: installed {ver} but expected $(torch-ver)'" + python -c "from torch import __version__ as ver ; assert '.'.join(str(ver).split('.')[:2]) == '$(torch-ver)', f'PyTorch: installed {ver} but expected $(torch-ver)'" displayName: "Sanity check" - bash: | pip install -q py-tree py-tree /var/tmp/torch py-tree /var/tmp/hf - # this gives more the 60k lines and takes a few minutes to run - #py-tree $(PYTEST_REFERENCE_CACHE) --show_hidden - # make sure the cache exists even it is empty - mkdir -p /var/tmp/cached-references displayName: "Show caches" - bash: | - cp -r /var/tmp/cached-references tests/_cache-references + # Check if the file references exists + if [ -f $(CACHED_REFERENCES) ]; then + # Create a directory if it doesn't already exist + mkdir -p tests/_cache-references + # Unzip 'ref.zip' into the directory inside tests folder + unzip -q $(CACHED_REFERENCES) -d tests/_cache-references + ls -lh tests/_cache-references/ + else + echo "The file '$(CACHED_REFERENCES)' does not exist." + fi du -h --max-depth=1 tests/ condition: eq(variables['Build.Reason'], 'PullRequest') # if pull request, copy the cache to the tests folder to be used in the next steps @@ -182,9 +188,9 @@ jobs: displayName: "UnitTesting DDP" - bash: | + # archive potentially updated cache to the machine filesystem to be reused with next jobs + zip -q -r $(CACHED_REFERENCES) tests/_cache-references du -h --max-depth=1 tests/ - # copy potentially updated cache to the machine filesystem to be reused with next jobs - cp -r --update tests/_cache-references /var/tmp/cached-references # set as extra step to not pollute general cache when jobs fails or crashes # so do this update only with successful jobs on master condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index b898bffe223..12d4c000162 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -40,24 +40,24 @@ jobs: - "1.13.1" - "2.0.1" - "2.1.2" - - "2.2.1" + - "2.2.2" include: # cover additional python nad PR combinations - { os: "ubuntu-22.04", python-version: "3.8", pytorch-version: "1.13.1" } - { 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.1" } - - { os: "ubuntu-22.04", python-version: "3.11", pytorch-version: "2.2.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.2.2" } # standard mac machine, not the M1 - { os: "macOS-12", python-version: "3.8", pytorch-version: "1.13.1" } - { os: "macOS-12", python-version: "3.10", pytorch-version: "2.0.1" } - - { os: "macOS-12", python-version: "3.11", pytorch-version: "2.2.1" } + - { os: "macOS-12", python-version: "3.11", pytorch-version: "2.2.2" } # 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.2.1" } + - { os: "macOS-14", python-version: "3.11", pytorch-version: "2.2.2" } # 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.2.1" } + - { os: "windows-2022", python-version: "3.11", pytorch-version: "2.2.2" } env: PYTORCH_URL: "https://download.pytorch.org/whl/cpu/torch_stable.html" FREEZE_REQUIREMENTS: ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }} diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 58921bdc30e..0c51cd1c854 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -69,10 +69,7 @@ jobs: - { python: "3.9", pytorch: "1.10", 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.0", cuda: "11.8.0", ubuntu: "22.04" } - - { python: "3.10", pytorch: "2.0", cuda: "12.1.1", ubuntu: "22.04" } - - { python: "3.10", pytorch: "2.1", cuda: "12.1.1", ubuntu: "22.04" } - - { python: "3.11", pytorch: "2.1", cuda: "12.1.1", 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" } steps: - uses: actions/checkout@v4 diff --git a/requirements/audio.txt b/requirements/audio.txt index b54ad6e240d..2d1069545d4 100644 --- a/requirements/audio.txt +++ b/requirements/audio.txt @@ -4,5 +4,5 @@ # this need to be the same as used inside speechmetrics pesq @ git+https://github.com/ludlows/python-pesq pystoi >=0.3.0, <0.5.0 -torchaudio >=0.10.0, <=2.2.1 +torchaudio >=0.10.0, <2.3.0 gammatone @ https://github.com/detly/gammatone/archive/master.zip#egg=Gammatone diff --git a/requirements/base.txt b/requirements/base.txt index 94ee1a90ebe..eb47b30f778 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -3,6 +3,6 @@ numpy >1.20.0 packaging >17.1 -torch >=1.10.0, <=2.2.1 +torch >=1.10.0, <2.3.0 typing-extensions; python_version < '3.9' lightning-utilities >=0.8.0, <0.12.0 diff --git a/requirements/typing.txt b/requirements/typing.txt index 60a830803bd..71ca3a8e1fa 100644 --- a/requirements/typing.txt +++ b/requirements/typing.txt @@ -1,5 +1,5 @@ mypy ==1.9.0 -torch ==2.2.1 +torch ==2.2.2 types-PyYAML types-emoji From f389892255478da702daff9405e827842233eca9 Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Thu, 28 Mar 2024 17:53:11 +0100 Subject: [PATCH 2/8] ci: build & test with next `torch~=2.3` (#2475) --- .azure/gpu-unittests.yml | 24 ++++++++++++++---------- .github/workflows/docker-build.yml | 3 ++- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.azure/gpu-unittests.yml b/.azure/gpu-unittests.yml index 5b67f052d74..4182b74797c 100644 --- a/.azure/gpu-unittests.yml +++ b/.azure/gpu-unittests.yml @@ -17,16 +17,19 @@ jobs: - job: unitest_GPU strategy: matrix: - "PyTorch | 1.10": + "PyTorch | 1.10 oldest": # Torch does not have build wheels with old Torch versions for newer CUDA docker-image: "ubuntu20.04-cuda11.3.1-py3.9-torch1.10" torch-ver: "1.10" - "PyTorch | 1.X": + "PyTorch | 1.X LTS": docker-image: "ubuntu22.04-cuda11.8.0-py3.9-torch1.13" torch-ver: "1.13" - "PyTorch | 2.X": + "PyTorch | 2.X stable": docker-image: "ubuntu22.04-cuda12.1.1-py3.11-torch2.2" torch-ver: "2.2" + "PyTorch | 2.X future": + docker-image: "ubuntu22.04-cuda12.1.1-py3.11-torch2.3" + torch-ver: "2.3" # 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 @@ -141,8 +144,9 @@ jobs: echo "The file '$(CACHED_REFERENCES)' does not exist." fi du -h --max-depth=1 tests/ - condition: eq(variables['Build.Reason'], 'PullRequest') + timeoutInMinutes: "5" # if pull request, copy the cache to the tests folder to be used in the next steps + condition: eq(variables['Build.Reason'], 'PullRequest') displayName: "Copy cached refs" - bash: | @@ -153,7 +157,7 @@ jobs: env: DOCTEST_DOWNLOAD_TIMEOUT: "180" SKIP_SLOW_DOCTEST: "1" - workingDirectory: src + workingDirectory: "src/" timeoutInMinutes: "40" displayName: "DocTesting" @@ -161,7 +165,7 @@ jobs: wget https://pl-public-data.s3.amazonaws.com/metrics/data.zip unzip -o data.zip ls -l _data/* - workingDirectory: tests + workingDirectory: "tests/" displayName: "Pull testing data from S3" - bash: | @@ -169,7 +173,7 @@ jobs: -m "not DDP" --numprocesses=5 --dist=loadfile \ --cov=torchmetrics --timeout=240 --durations=100 \ --reruns 3 --reruns-delay 1 - workingDirectory: tests + workingDirectory: "tests/" # skip for PR if there is nothing to test, note that outside PR there is default 'unittests' condition: and(succeeded(), ne(variables['TEST_DIRS'], '')) timeoutInMinutes: "90" @@ -181,7 +185,7 @@ jobs: --timeout=240 --durations=100 env: USE_PYTEST_POOL: "1" - workingDirectory: tests + workingDirectory: "tests/" # skip for PR if there is nothing to test, note that outside PR there is default 'unittests' condition: and(succeeded(), ne(variables['TEST_DIRS'], '')) timeoutInMinutes: "90" @@ -202,7 +206,7 @@ jobs: python -m codecov --token=$(CODECOV_TOKEN) --name="GPU-coverage" \ --commit=$(Build.SourceVersion) --flags=gpu,unittest --env=linux,azure ls -l - workingDirectory: tests + workingDirectory: "tests/" # skip for PR if there is nothing to test, note that outside PR there is default 'unittests' condition: and(succeeded(), ne(variables['TEST_DIRS'], '')) displayName: "Statistics" @@ -215,7 +219,7 @@ jobs: echo "Processing $fn example..." python $fn done - workingDirectory: examples + workingDirectory: "examples/" # skip for PR if there is nothing to test, note that outside PR there is default 'unittests' condition: and(succeeded(), ne(variables['TEST_DIRS'], '')) displayName: "Examples" diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 0c51cd1c854..33d437f296a 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -67,10 +67,11 @@ jobs: # 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.11", cuda: "11.8.0", ubuntu: "22.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" } steps: - uses: actions/checkout@v4 From 3c81aa3dd301adfa1c1f0cda6fb7dffe43b53b4e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 20:12:18 +0100 Subject: [PATCH 3/8] build(deps): update transformers requirement from <4.39.0,>=4.10.0 to >=4.10.0,<4.40.0 in /requirements (#2470) build(deps): update transformers requirement in /requirements Updates the requirements on [transformers](https://github.com/huggingface/transformers) to permit the latest version. - [Release notes](https://github.com/huggingface/transformers/releases) - [Commits](https://github.com/huggingface/transformers/compare/v4.10.0...v4.39.1) --- updated-dependencies: - dependency-name: transformers dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/multimodal.txt | 2 +- requirements/text.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/multimodal.txt b/requirements/multimodal.txt index befbf067aab..549255e6dc4 100644 --- a/requirements/multimodal.txt +++ b/requirements/multimodal.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 -transformers >=4.10.0, <4.39.0 +transformers >=4.10.0, <4.40.0 piq <=0.8.0 diff --git a/requirements/text.txt b/requirements/text.txt index efb494369f7..e902bf83aa4 100644 --- a/requirements/text.txt +++ b/requirements/text.txt @@ -4,7 +4,7 @@ nltk >=3.6, <=3.8.1 tqdm >=4.41.0, <4.67.0 regex >=2021.9.24, <=2023.12.25 -transformers >4.4.0, <4.39.0 +transformers >4.4.0, <4.40.0 mecab-python3 >=1.0.6, <1.1.0 mecab-ko >=1.0.0, <1.1.0 mecab-ko-dic >=1.0.0, <1.1.0 From cb71f13b68a1d43d3bc5581d8075d8099d5a86f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 22:12:35 +0100 Subject: [PATCH 4/8] build(deps): update huggingface-hub requirement from <0.22 to <0.23 in /requirements (#2472) build(deps): update huggingface-hub requirement in /requirements Updates the requirements on [huggingface-hub](https://github.com/huggingface/huggingface_hub) to permit the latest version. - [Release notes](https://github.com/huggingface/huggingface_hub/releases) - [Commits](https://github.com/huggingface/huggingface_hub/compare/v0.0.1...v0.22.0) --- updated-dependencies: - dependency-name: huggingface-hub dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/text_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/text_test.txt b/requirements/text_test.txt index d670edf5832..94a9807e769 100644 --- a/requirements/text_test.txt +++ b/requirements/text_test.txt @@ -4,5 +4,5 @@ jiwer >=2.3.0, <3.1.0 rouge-score >0.1.0, <=0.1.2 bert_score ==0.3.13 -huggingface-hub <0.22 +huggingface-hub <0.23 sacrebleu >=2.3.0, <2.5.0 From e8bfa7a8b5048aea37f7e400732c996762d4a47a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 10:57:43 +0200 Subject: [PATCH 5/8] build(deps): bump Lightning-AI/utilities from 0.10.1 to 0.11.2 (#2486) * build(deps): bump Lightning-AI/utilities from 0.10.1 to 0.11.2 Bumps [Lightning-AI/utilities](https://github.com/lightning-ai/utilities) from 0.10.1 to 0.11.2. - [Release notes](https://github.com/lightning-ai/utilities/releases) - [Changelog](https://github.com/Lightning-AI/utilities/blob/main/CHANGELOG.md) - [Commits](https://github.com/lightning-ai/utilities/compare/v0.10.1...v0.11.2) --- updated-dependencies: - dependency-name: Lightning-AI/utilities dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Apply suggestions from code review --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com> --- .github/workflows/ci-checks.yml | 12 ++++++------ .github/workflows/clear-cache.yml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-checks.yml b/.github/workflows/ci-checks.yml index 880cdd8849e..6bc9cbdcac7 100644 --- a/.github/workflows/ci-checks.yml +++ b/.github/workflows/ci-checks.yml @@ -13,19 +13,19 @@ concurrency: jobs: check-code: - uses: Lightning-AI/utilities/.github/workflows/check-typing.yml@v0.10.1 + uses: Lightning-AI/utilities/.github/workflows/check-typing.yml@v0.11.2 with: - actions-ref: v0.10.1 + actions-ref: v0.11.2 extra-typing: "typing" check-schema: - uses: Lightning-AI/utilities/.github/workflows/check-schema.yml@v0.10.1 + uses: Lightning-AI/utilities/.github/workflows/check-schema.yml@v0.11.2 check-package: if: github.event.pull_request.draft == false - uses: Lightning-AI/utilities/.github/workflows/check-package.yml@v0.10.1 + uses: Lightning-AI/utilities/.github/workflows/check-package.yml@v0.11.2 with: - actions-ref: v0.10.1 + actions-ref: v0.11.2 artifact-name: dist-packages-${{ github.sha }} import-name: "torchmetrics" testing-matrix: | @@ -35,7 +35,7 @@ jobs: } check-md-links: - uses: Lightning-AI/utilities/.github/workflows/check-md-links.yml@v0.10.1 + uses: Lightning-AI/utilities/.github/workflows/check-md-links.yml@v0.11.2 with: base-branch: master config-file: ".github/markdown-links-config.json" diff --git a/.github/workflows/clear-cache.yml b/.github/workflows/clear-cache.yml index 66ac8ccb190..092748826a5 100644 --- a/.github/workflows/clear-cache.yml +++ b/.github/workflows/clear-cache.yml @@ -12,12 +12,12 @@ on: jobs: cron-clear: if: github.event_name == 'schedule' - uses: Lightning-AI/utilities/.github/workflows/clear-cache.yml@v0.10.1 + uses: Lightning-AI/utilities/.github/workflows/clear-cache.yml@v0.11.2 with: pattern: "pip-latest" direct-clear: if: github.event_name == 'workflow_dispatch' - uses: Lightning-AI/utilities/.github/workflows/clear-cache.yml@v0.10.1 + uses: Lightning-AI/utilities/.github/workflows/clear-cache.yml@v0.11.2 with: pattern: ${{ inputs.pattern }} From d6b5b9883928df6d9bdfddf60b339ea24ba71ff7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 13:55:35 +0200 Subject: [PATCH 6/8] build(deps): bump pypa/gh-action-pypi-publish from 1.8.12 to 1.8.14 (#2485) Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.12 to 1.8.14. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.8.12...v1.8.14) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-pkg.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-pkg.yml b/.github/workflows/publish-pkg.yml index 48c7c974e70..f3e73b6ebb6 100644 --- a/.github/workflows/publish-pkg.yml +++ b/.github/workflows/publish-pkg.yml @@ -67,7 +67,7 @@ jobs: - run: ls -lh dist/ # We do this, since failures on test.pypi aren't that bad - name: Publish to Test PyPI - uses: pypa/gh-action-pypi-publish@v1.8.12 + uses: pypa/gh-action-pypi-publish@v1.8.14 with: user: __token__ password: ${{ secrets.test_pypi_password }} @@ -94,7 +94,7 @@ jobs: path: dist - run: ls -lh dist/ - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@v1.8.12 + uses: pypa/gh-action-pypi-publish@v1.8.14 with: user: __token__ password: ${{ secrets.pypi_password }} From f3582bd4dbdaa5947e60299f97a053f9ac3effb1 Mon Sep 17 00:00:00 2001 From: Jirka Date: Sat, 6 Apr 2024 18:08:13 +0200 Subject: [PATCH 7/8] ci/lint: simplify prettier --- .pre-commit-config.yaml | 1 + .prettierignore | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 .prettierignore diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 59b691fd73c..42f48e134b0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -83,6 +83,7 @@ repos: rev: v3.1.0 hooks: - id: prettier + files: \.(json|yml|yaml|toml) # https://prettier.io/docs/en/options.html#print-width args: ["--print-width=120"] diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index c5646f71127..00000000000 --- a/.prettierignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore all MD files: -**/*.md From e5b113595e78083b2b6d94fc31f2a0dc33076f5c Mon Sep 17 00:00:00 2001 From: Lukas Ewecker <61707855+lukazso@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:15:26 +0200 Subject: [PATCH 8/8] docs: fix specificity when metric is not defined (#2491) Co-authored-by: Lukas Ewecker --- src/torchmetrics/classification/specificity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/torchmetrics/classification/specificity.py b/src/torchmetrics/classification/specificity.py index a297cfe9ca5..caca10dfa2b 100644 --- a/src/torchmetrics/classification/specificity.py +++ b/src/torchmetrics/classification/specificity.py @@ -453,7 +453,7 @@ class Specificity(_ClassificationTaskWrapper): .. math:: \text{Specificity} = \frac{\text{TN}}{\text{TN} + \text{FP}} Where :math:`\text{TN}` and :math:`\text{FP}` represent the number of true negatives and false positives - respectively. The metric is only proper defined when :math:`\text{TP} + \text{FP} \neq 0`. If this case is + respectively. The metric is only proper defined when :math:`\text{TN} + \text{FP} \neq 0`. If this case is encountered for any class/label, the metric for that class/label will be set to 0 and the overall metric may therefore be affected in turn.