Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

releasing minor 1.2.1 [rebase & merge] #2249

Merged
merged 81 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
db19beb
docs: fixing links to the hosted docs (#2104)
Borda Sep 24, 2023
58bf466
Rolling Dev & new Chlog Section
Borda Sep 24, 2023
b39108d
rtfd: fix building with stable/latest (#2101)
Borda Sep 24, 2023
2c7e50f
build(deps): bump sphinx-paramlinks from 0.5.4 to 0.6.0 in /requireme…
dependabot[bot] Sep 26, 2023
a563059
build(deps): update pydantic requirement from <2.0.0,>1.0.0 to >1.0.0…
dependabot[bot] Sep 26, 2023
98be4b7
build(deps): bump nbsphinx from 0.9.2 to 0.9.3 in /requirements (#2111)
dependabot[bot] Sep 26, 2023
61599f1
check codespell & fixing some... (#2103)
Borda Sep 26, 2023
94e7eb8
hunting some more typos (#2112)
Borda Sep 26, 2023
7cd8bb9
check typos & fixing some... (#2102)
Borda Sep 26, 2023
9b6b58f
fix pesq docs (#2114)
pme0 Sep 27, 2023
5e9f1fd
add @matsumotosan to core (#2116)
matsumotosan Sep 28, 2023
0436885
Reduce memory usage for certain image metrics (#2089)
SkafteNicki Oct 1, 2023
8786026
build(deps): bump docker/build-push-action from 4 to 5 (#2124)
dependabot[bot] Oct 2, 2023
5d1b96a
build(deps): bump actions/checkout from 3 to 4 (#2126)
dependabot[bot] Oct 2, 2023
e103d07
build(deps): bump docker/login-action from 2 to 3 (#2125)
dependabot[bot] Oct 2, 2023
c5d8069
ci: switch to custom docker images (#2123)
Borda Oct 2, 2023
f615ab8
docs: fix references to the `*_epoch_end` (#2118)
SkafteNicki Oct 2, 2023
383ee81
Clarify input shape expectation in classification for `samplewise` re…
SkafteNicki Oct 2, 2023
62d9095
build(deps): bump coverage from 7.3.1 to 7.3.2 in /requirements (#2133)
dependabot[bot] Oct 3, 2023
d2d5f76
build(deps): update scikit-learn requirement from <1.3.1,>=1.1.1 to >…
dependabot[bot] Oct 3, 2023
f716876
[pre-commit.ci] pre-commit suggestions (#2136)
pre-commit-ci[bot] Oct 3, 2023
ea5ce79
Replace distutils with packaging (#2137)
adamjstewart Oct 4, 2023
9c3dee5
typing: freeze validation to `torch==2.0.0`
Borda Oct 6, 2023
3a20bc3
Improve numeric stability of `LPIPS` (#2144)
SkafteNicki Oct 6, 2023
7a133a1
docs: adding `linkcheck_timeout` (#2150)
Borda Oct 6, 2023
eb6d59a
build images for py3.11 (#2138)
Borda Oct 6, 2023
0628ff3
Add error on missing module to `NoTrainInceptionV3` (#2143)
SkafteNicki Oct 8, 2023
08fea59
docs: avoid pdf links if possible (#2155)
SkafteNicki Oct 9, 2023
d75bb45
build(deps): bump pytest-timeout from 2.1.0 to 2.2.0 in /requirements…
dependabot[bot] Oct 10, 2023
a6dcea2
build(deps): update regex requirement from <=2023.8.8,>=2021.9.24 to …
dependabot[bot] Oct 10, 2023
a7c24af
ci/docs: run docs make in parallel (#2160)
Borda Oct 10, 2023
850713e
build(deps): update torchvision requirement from <=0.15.2,>=0.8 to >=…
dependabot[bot] Oct 10, 2023
19781ff
bump testing for PT 2.1 (#2142)
Borda Oct 10, 2023
3e8417b
req. name clarification (#2128)
Borda Oct 11, 2023
7621b8a
ci/docs: primary installation of fetch template (#2162)
Borda Oct 11, 2023
e94b568
ci: simplify `PUSH_DOCKERHUB` (#2179)
Borda Oct 17, 2023
5a4992c
Use `isinstance` instead of `type(x) is Tensor` (#2180)
SkafteNicki Oct 17, 2023
4234460
docs: fix name of multilabel attribute for `MultilabelMatthewsCorrCoe…
damiankucharski Oct 17, 2023
027f277
build(deps): update psutil requirement from <=5.9.5 to <5.10.0 in /re…
dependabot[bot] Oct 17, 2023
0a354cd
build(deps): bump mypy from 1.5.1 to 1.6.0 in /requirements (#2177)
dependabot[bot] Oct 17, 2023
f00ceb1
ci: proper setting oldest/latest for integrations & `PL>=1.9` (#2129)
Borda Oct 17, 2023
7740724
Lazy import `audio` (#2181)
SkafteNicki Oct 17, 2023
7aa62db
Lazy import `detection` (#2182)
SkafteNicki Oct 17, 2023
75fc681
ci: hotfix docs make html
Borda Oct 17, 2023
c72ef41
build(deps): update huggingface-hub requirement from <0.18 to <0.19 i…
dependabot[bot] Oct 17, 2023
2a3613d
Resolve PYI041 (#2151)
matsumotosan Oct 18, 2023
5832266
docs: fixing typos, grammar and formatting (#2185)
Oct 19, 2023
fd981ed
Resolve pyi024 warnings (#2146)
matsumotosan Oct 20, 2023
71ad9c5
build(deps): update lightning requirement from <2.1.0,>=1.8.0 to >=1.…
dependabot[bot] Oct 21, 2023
f314bd6
build(deps): bump mypy from 1.6.0 to 1.6.1 in /requirements (#2190)
dependabot[bot] Oct 24, 2023
bc5f20e
build(deps): bump pytest from 7.4.2 to 7.4.3 in /requirements (#2194)
dependabot[bot] Nov 2, 2023
5b321dd
build(deps): bump peter-evans/create-or-update-comment from 3.0.2 to …
dependabot[bot] Nov 2, 2023
3d41172
build(deps): update transformers requirement from <4.30.3,>=4.10.0 to…
dependabot[bot] Nov 2, 2023
8fec108
build(deps): update cloudpickle requirement from <=2.2.1,>1.3 to >1.3…
dependabot[bot] Nov 2, 2023
7ab67ff
build(deps): update sacrebleu requirement from <=2.3.1,>=2.3.0 to >=2…
dependabot[bot] Nov 14, 2023
f60e44e
Skip Kendall for Pytorch 2.0+ on Mac (#2210)
SkafteNicki Nov 18, 2023
cab51cd
build(deps): update huggingface-hub requirement from <0.19 to <0.20 i…
dependabot[bot] Nov 21, 2023
de62d54
build(deps): bump torch from 2.1.0 to 2.1.1 in /requirements (#2228)
dependabot[bot] Nov 21, 2023
5b1e960
build(deps): bump mypy from 1.6.1 to 1.7.0 in /requirements (#2227)
dependabot[bot] Nov 21, 2023
645e380
Move eps in `UniversalQualityIndex` (#2222)
SkafteNicki Nov 21, 2023
91442eb
ci: fix torch-ver after 2.1.1 bump
Borda Nov 23, 2023
e8816c4
ci: debugging Azure integrations (#2236)
Borda Nov 23, 2023
c8b964f
docker: pytorch w/o `autoremove`
Borda Nov 23, 2023
58f277c
build(deps): update transformers requirement from <4.34.2,>=4.10.0 to…
dependabot[bot] Nov 24, 2023
ab8af8b
ci: use rich base image for integrations (#2239)
Borda Nov 24, 2023
a1ab373
Fix device and dtype for `LPIPS` functional metric (#2234)
SkafteNicki Nov 25, 2023
b2a039f
Fix support for half precision in Perplexity metric (#2235)
SkafteNicki Nov 25, 2023
753960d
Fix `dim_zero_cat` reduction (#2226)
jankng Nov 25, 2023
8966ef3
Fix the dependencies of LPIPS metric (#2230)
tanguymagne Nov 25, 2023
f25c531
Use arange and repeat for deterministic bincount (#2184)
kyle-dorman Nov 25, 2023
741e854
Lazy import text (#2216)
SkafteNicki Nov 27, 2023
0d30512
build(deps): bump mypy from 1.7.0 to 1.7.1 in /requirements (#2244)
dependabot[bot] Nov 28, 2023
579ddc6
build(deps): bump pytest-rerunfailures from 12.0 to 13.0 in /requirem…
dependabot[bot] Nov 28, 2023
5886cb2
build(deps): update scienceplots requirement from <=2.1.0,>=2.0.0 to …
dependabot[bot] Nov 28, 2023
cb9b4a0
Lazy import in image/multimodal domains (#2215)
SkafteNicki Nov 28, 2023
9cc52a4
build(deps): update lightning-utilities requirement from <0.10.0,>=0.…
dependabot[bot] Nov 28, 2023
8f7d3b1
Docs and tests for how to save and load metrics (#2237)
SkafteNicki Nov 28, 2023
12c2344
Raise error in `MeanAveragePrecision` if too little/many detection ar…
SkafteNicki Nov 28, 2023
52183c3
Fix `MetricCollection` with repeated `compute` calls (#2211)
SkafteNicki Nov 28, 2023
5211b00
Add error on wrong shape in `CosineSimilarity` metric (#2241)
SkafteNicki Nov 28, 2023
ffb48af
releasing 1.2.1
Borda Nov 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 23 additions & 15 deletions .azure/gpu-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ jobs:
- job: integrate_GPU
strategy:
matrix:
"oldest":
docker-image: "pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime"
torch-ver: "1.11.0"
"latest":
docker-image: "pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime"
torch-ver: "2.0.0"
"torch | 1.x":
docker-image: "pytorchlightning/torchmetrics:ubuntu22.04-cuda11.8.0-py3.9-torch1.13"
torch-ver: "1.13.1"
requires: "oldest"
"torch | 2.x":
docker-image: "pytorch/pytorch:2.1.1-cuda12.1-cudnn8-runtime"
torch-ver: "2.1.1"
# 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
Expand All @@ -46,6 +47,8 @@ jobs:
CUDA_version_mm="${CUDA_version//'.'/''}"
echo "##vso[task.setvariable variable=CUDA_VERSION_MM]$CUDA_version_mm"
echo "##vso[task.setvariable variable=TORCH_URL]https://download.pytorch.org/whl/cu${CUDA_version_mm}/torch_stable.html"
# packages for running assistant
pip install -q packaging fire requests wget
displayName: "set Env. vars"

- bash: |
Expand All @@ -63,24 +66,29 @@ jobs:

- bash: |
set -e
pip install -q packaging fire requests wget
python .github/assistant.py set-oldest-versions --req_files='["requirements/_integrate.txt"]'
cat requirements/_integrate.txt
condition: eq(variables['requires'], 'oldest')
displayName: "Setting oldest req."

- bash: |
set -e
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
python adjust-torch-versions.py requirements.txt $(torch-ver)
python adjust-torch-versions.py requirements/integrate.txt $(torch-ver)
python .github/assistant.py set-oldest-versions --req_files='["requirements/integrate.txt"]'
cat requirements/integrate.txt
for fpath in `ls requirements/*.txt`; do
# torch version shall be sourced based on the used docker
python adjust-torch-versions.py $fpath
done
displayName: "Adjust versions"

- bash: |
set -ex
pip install -q -r requirements/integrate.txt
pip install -q -r requirements/_integrate.txt
# force reinstall TM as it could be overwritten by integration's dependencies
pip install . -U -r requirements/test.txt --find-links ${TORCH_URL}
pip list
pip install . -U -r requirements/_tests.txt --find-links ${TORCH_URL}
displayName: "Install package & integrations"

- 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 "import torch ; mgpu = torch.cuda.device_count() ; assert mgpu >= 2, f'found GPUs: {mgpu}'"
displayName: "Sanity check"
Expand Down
69 changes: 18 additions & 51 deletions .azure/gpu-unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,20 @@ jobs:
matrix:
"PyTorch | old":
# Torch does not have build wheels with old Torch versions for newer CUDA
docker-image: "nvidia/cuda:11.1.1-cudnn8-devel-ubuntu20.04"
agent-pool: "lit-rtx-3090"
docker-image: "pytorchlightning/torchmetrics:ubuntu20.04-cuda11.1.1-py3.8-torch1.8.1"
torch-ver: "1.8.1"
"PyTorch | 1.X":
docker-image: "pytorch/pytorch:1.13.1-cuda11.6-cudnn8-runtime"
agent-pool: "lit-rtx-3090"
docker-image: "pytorchlightning/torchmetrics:ubuntu22.04-cuda11.8.0-py3.9-torch1.13"
torch-ver: "1.13.1"
"PyTorch | 2.X":
docker-image: "pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime"
agent-pool: "lit-rtx-3090"
torch-ver: "2.0.0"
docker-image: "pytorchlightning/torchmetrics:ubuntu22.04-cuda12.1.0-py3.11-torch2.1"
torch-ver: "2.1.1"
# how long to run the job before automatically cancelling
timeoutInMinutes: "120"
# how much time to give 'run always even if cancelled tasks' before stopping them
cancelTimeoutInMinutes: "2"

pool: "$(agent-pool)"
pool: "lit-rtx-3090"

variables:
DEVICES: $( python -c 'name = "$(Agent.Name)" ; gpus = name.split("_")[-1] if "_" in name else "0,1"; print(gpus)' )
Expand All @@ -51,37 +48,12 @@ jobs:

container:
image: "$(docker-image)"
options: "--gpus=all --shm-size=8g -v /usr/bin/docker:/tmp/docker:ro -v /var/tmp:/var/tmp"
options: "--gpus=all --shm-size=8g -v /var/tmp:/var/tmp"

workspace:
clean: all

steps:
- script: |
set -ex
container_id=$(head -1 /proc/self/cgroup|cut -d/ -f3)
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
/tmp/docker exec -t -u 0 $container_id \
sh -c "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" -y install sudo"
echo "##vso[task.setvariable variable=CONTAINER_ID]$container_id"
displayName: "Install Sudo in container (thanks Microsoft!)"

- script: |
sudo apt-get update -q --fix-missing
sudo apt-get install -q -y --no-install-recommends \
build-essential \
wget \
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-dev \
python${PYTHON_VERSION}-distutils
sudo update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 1
wget https://bootstrap.pypa.io/get-pip.py --progress=bar:force:noscroll --no-check-certificate
python get-pip.py
env:
PYTHON_VERSION: "3.8"
condition: startsWith(variables['docker-image'], 'nvidia/cuda:')
displayName: "install python & pip"

- bash: |
echo "##vso[task.setvariable variable=CUDA_VISIBLE_DEVICES]$(DEVICES)"
CUDA_version=$(nvcc --version | sed -n 's/^.*release \([0-9]\+\.[0-9]\+\).*$/\1/p')
Expand All @@ -96,7 +68,6 @@ jobs:
whereis nvidia
nvidia-smi
echo $CUDA_VISIBLE_DEVICES
echo $CONTAINER_ID
echo $TORCH_URL
python --version
pip --version
Expand All @@ -105,29 +76,26 @@ jobs:
displayName: "Image info & NVIDIA"

- bash: |
pip install -q packaging wget
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
python adjust-torch-versions.py requirements.txt $(torch-ver)
python .github/assistant.py set-oldest-versions
condition: eq(variables['torch-ver'], '1.8.1')
displayName: "Setting oldest versions"

- bash: |
pip install -q packaging
wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
for fpath in `ls requirements/*.txt`; do
python adjust-torch-versions.py $fpath $(torch-ver)
# torch version shall be sourced based on the used docker
python adjust-torch-versions.py $fpath
done
displayName: "Adjust versions"

- bash: |
set -ex
sudo apt-get update -qq --fix-missing
sudo apt-get install -y --no-install-recommends \
build-essential gcc g++ cmake ffmpeg git libsndfile1 unzip
# pip install pip -U
pip install -q "numpy<1.24" # trying to resolve pesq installation
pip install . -U -r ./requirements/devel.txt \
--prefer-binary --find-links=${TORCH_URL}
pip install mkl-service==2.4.0 # needed for the gpu multiprocessing
pip list
pip install . -U -r ./requirements/_devel.txt --prefer-binary --find-links=${TORCH_URL}
displayName: "Install environment"

- 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 "import torch ; mgpu = torch.cuda.device_count() ; assert mgpu >= 2, f'found GPUs: {mgpu}'"
displayName: "Sanity check"
Expand All @@ -149,8 +117,7 @@ jobs:
displayName: "DocTesting"

- bash: |
# wget is simpler but does not work on Windows
python -c "from urllib.request import urlretrieve ; urlretrieve('https://pl-public-data.s3.amazonaws.com/metrics/data.zip', 'data.zip')"
wget https://pl-public-data.s3.amazonaws.com/metrics/data.zip
unzip -o data.zip
ls -l _data/*
workingDirectory: tests
Expand Down
10 changes: 5 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ RUN if [ "${NODE_VERSION}" != "none" ]; then \
fi

COPY requirements/ /tmp/pip-tmp/requirements/
COPY requirements.txt /tmp/pip-tmp/
RUN \
pip3 install awscli && \
aws s3 sync --no-sign-request s3://sphinx-packages/ dist/ && \
# trying to resolve pesq installation issue
pip3 install -q "numpy<1.24" && \
pip3 --disable-pip-version-check --no-cache-dir install \
-r /tmp/pip-tmp/requirements/devel.txt \
-r /tmp/pip-tmp/requirements/docs.txt \
-r /tmp/pip-tmp/requirements/_devel.txt \
-r /tmp/pip-tmp/requirements/_docs.txt \
--find-links="https://download.pytorch.org/whl/cpu/torch_stable.html" \
--find-links="dist/" && \
rm -rf /tmp/pip-tmp

# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
# COPY requirements.txt /tmp/pip-tmp/
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements/base.txt \
# && rm -rf /tmp/pip-tmp

# [Optional] Uncomment this section to install additional OS packages.
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/python-3
{
"name": "PyTorch Lightning Metrics",
"image": "pytorchlightning/metrics-dev",
"image": "pytorchlightning/torchmetrics:devcontainer-py3.9",
// If you want to use a different Python version, uncomment the build object below
// "build": {
// "dockerfile": "Dockerfile",
Expand Down
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ When you send a PR the continuous integration will run tests and build the docs.
To setup a local development environment, install both local and test dependencies:

```bash
python -m pip install -r requirements/test.txt
python -m pip install -r requirements/_tests.txt
python -m pip install pre-commit
```

Expand Down
7 changes: 4 additions & 3 deletions .github/actions/pull-caches/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ runs:
using: "composite"
steps:
- name: install assistant's deps
run: pip install -q fire requests packaging
run: pip install -q fire requests packaging wget
shell: bash

- name: Set PyTorch version
if: inputs.pytorch-version != ''
run: |
curl https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py -o adjust-torch-versions.py
python adjust-torch-versions.py requirements.txt ${{ inputs.pytorch-version }}
pip install wget
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
python adjust-torch-versions.py requirements/base.txt ${{ inputs.pytorch-version }}
shell: bash

- name: Set min. dependencies
Expand Down
10 changes: 5 additions & 5 deletions .github/actions/push-caches/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ runs:
# run: |
# import os
# fp = 'requirements.dump'
# with open(fp) as fo:
# lines = [ln.strip() for ln in fo.readlines()]
# with open(fp) as fopen:
# lines = [ln.strip() for ln in fopen.readlines()]
# lines = [ln.split('+')[0] for ln in lines if '-e ' not in ln]
# with open(fp, 'w') as fw:
# fw.writelines([ln + os.linesep for ln in lines])
# with open(fp, 'w') as fwrite:
# fwrite.writelines([ln + os.linesep for ln in lines])
# shell: python

- name: Dump wheels
run: |
pip wheel -r requirements/devel.txt --prefer-binary \
pip wheel -r requirements/_devel.txt --prefer-binary \
--wheel-dir=.pip-wheels \
-f ${{ inputs.torch-url }} -f ${{ inputs.pypi-dir }}
ls -lh .pip-wheels
Expand Down
13 changes: 7 additions & 6 deletions .github/assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
import re
import sys
import traceback
from distutils.version import LooseVersion
from typing import List, Optional, Tuple, Union

import fire
import requests
from packaging.version import parse
from pkg_resources import parse_requirements

_REQUEST_TIMEOUT = 10
Expand Down Expand Up @@ -68,20 +68,20 @@ def prune_packages(req_file: str, *pkgs: str) -> None:
fp.writelines(lines)

@staticmethod
def set_min_torch_by_python(fpath: str = "requirements.txt") -> None:
def set_min_torch_by_python(fpath: str = "requirements/base.txt") -> None:
"""Set minimal torch version according to Python actual version.

>>> AssistantCLI.set_min_torch_by_python("../requirements.txt")
>>> AssistantCLI.set_min_torch_by_python("../requirements/base.txt")

"""
py_ver = f"{sys.version_info.major}.{sys.version_info.minor}"
if py_ver not in LUT_PYTHON_TORCH:
return
with open(fpath) as fp:
reqs = parse_requirements(fp.readlines())
pkg_ver = [p for p in reqs if p.name == "torch"][0]
pt_ver = min([LooseVersion(v[1]) for v in pkg_ver.specs])
pt_ver = max(LooseVersion(LUT_PYTHON_TORCH[py_ver]), pt_ver)
pkg_ver = next(p for p in reqs if p.name == "torch")
pt_ver = min([parse(v[1]) for v in pkg_ver.specs])
pt_ver = max(parse(LUT_PYTHON_TORCH[py_ver]), pt_ver)
with open(fpath) as fp:
requires = fp.read()
requires = re.sub(r"torch>=[\d\.]+", f"torch>={pt_ver}", requires)
Expand All @@ -103,6 +103,7 @@ def set_oldest_versions(req_files: List[str] = REQUIREMENTS_FILES) -> None:
"""Set the oldest version for requirements."""
AssistantCLI.set_min_torch_by_python()
for fpath in req_files:
logging.info(f"processing req: `{fpath}`")
AssistantCLI.replace_min_requirements(fpath)

@staticmethod
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [master, "release/*"]
pull_request:
branches: [master, "release/*"]
types: [opened, reopened, ready_for_review, synchronize]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
Expand All @@ -14,8 +15,8 @@ jobs:
check-code:
uses: Lightning-AI/utilities/.github/workflows/check-code.yml@v0.9.0
with:
actions-ref: main
extra-typing: typing
actions-ref: v0.9.0
extra-typing: "typing"

check-schema:
uses: Lightning-AI/utilities/.github/workflows/check-schema.yml@v0.9.0
Expand All @@ -24,7 +25,7 @@ jobs:
if: github.event.pull_request.draft == false
uses: Lightning-AI/utilities/.github/workflows/check-package.yml@v0.9.0
with:
actions-ref: main
actions-ref: v0.9.0
artifact-name: dist-packages-${{ github.sha }}
import-name: "torchmetrics"
testing-matrix: |
Expand Down
Loading
Loading