Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .azure/gpu-unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
matrix:
"PyTorch | 2.0 oldest":
# Torch does not have build wheels with old Torch versions for newer CUDA
docker-image: "ubuntu22.04-cuda12.1.1-py3.9-torch2.0"
docker-image: "ubuntu22.04-cuda12.1.1-py3.10-torch2.0"
torch-ver: "2.0"
"PyTorch | 2.X stable":
docker-image: "ubuntu24.04-cuda12.6.3-py3.12-torch2.8"
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/python-3/.devcontainer/base.Dockerfile

# [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6
ARG VARIANT="3.9"
# [Choice] Python version: 3, 3.10, 3.11, 3.12
ARG VARIANT="3.10"
FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT}

# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
Expand Down
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/python-3
{
"name": "PyTorch Lightning Metrics",
"image": "pytorchlightning/torchmetrics:devcontainer-py3.9",
"image": "pytorchlightning/torchmetrics:devcontainer-py3.10",
// If you want to use a different Python version, uncomment the build object below
// "build": {
// "dockerfile": "Dockerfile",
// "context": "..",
// "args": {
// // Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9
// "VARIANT": "3.9",
// // Update 'VARIANT' to pick a Python version: 3, 3.10, 3.11, 3.12
// "VARIANT": "3.10",
// // Options
// "NODE_VERSION": "none"
// }
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
testing-matrix: |
{
"os": ["ubuntu-22.04", "macOS-14", "windows-2022"],
"python-version": ["3.9", "3.11"]
"python-version": ["3.10", "3.11"]
}

check-md-links:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-22.04", "macOS-14", "windows-2022"]
python-version: ["3.9", "3.11"]
python-version: ["3.10", "3.11"]
requires: ["oldest", "latest"]
exclude:
- { python-version: "3.10", requires: "oldest" }
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- "2.8.0"
include:
# cover additional python and PT combinations
- { os: "ubuntu-22.04", python-version: "3.9", pytorch-version: "2.0.1", requires: "oldest" }
- { os: "ubuntu-22.04", python-version: "3.10", pytorch-version: "2.0.1", requires: "oldest" }
- { os: "ubuntu-22.04", python-version: "3.12", pytorch-version: "2.7.1" }
- { os: "ubuntu-22.04", python-version: "3.12", pytorch-version: "2.8.0" }
# using the ARM based M1 machine
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ["3.9", "3.10", "3.11"]
python: ["3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v5
Expand Down Expand Up @@ -67,7 +67,6 @@ 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: "2.0.1", cuda: "12.1.1", ubuntu: "22.04" }
- { python: "3.10", pytorch: "2.0.1", cuda: "12.1.1", ubuntu: "22.04" }
- { python: "3.11", pytorch: "2.1.2", cuda: "12.1.1", ubuntu: "22.04" }
- { python: "3.11", pytorch: "2.2.2", cuda: "12.1.1", ubuntu: "22.04" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ machine: "L4_X_2"
parametrize:
matrix:
image: # note that this is setting also all oldest requirements which is linked to Torch == 2.0
- "pytorchlightning/torchmetrics:ubuntu22.04-cuda12.1.1-py3.9-torch2.0"
- "pytorchlightning/torchmetrics:ubuntu22.04-cuda12.1.1-py3.10-torch2.0"
- "pytorchlightning/torchmetrics:ubuntu24.04-cuda12.6.3-py3.12-torch2.8"
# testing: ["doctest", "common", "distributed"] # todo
include: []
Expand Down
10 changes: 5 additions & 5 deletions dockers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ git clone https://github.com/Lightning-AI/torchmetrics.git
docker image build -t torchmetrics:latest -f dockers/ubuntu-cuda/Dockerfile .

# build with specific arguments
docker image build -t torchmetrics:ubuntu-cuda11.7.1-py3.9-torch1.13 \
docker image build -t torchmetrics:ubuntu-cuda12.1.1-py3.10-torch2.0 \
-f dockers/base-cuda/Dockerfile \
--build-arg PYTHON_VERSION=3.9 \
--build-arg PYTORCH_VERSION=1.13 \
--build-arg CUDA_VERSION=11.7.1 \
--build-arg PYTHON_VERSION=3.10 \
--build-arg PYTORCH_VERSION=2.0.1 \
--build-arg CUDA_VERSION=12.1.1 \
.
```

Expand Down Expand Up @@ -50,5 +50,5 @@ sudo systemctl restart docker
and later run the docker image with `--gpus all`. For example,

```bash
docker run --rm -it --gpus all torchmetrics:ubuntu-cuda11.7.1-py3.9-torch1.12
docker run --rm -it --gpus all torchmetrics:ubuntu-cuda12.1.1-py3.10-torch2.0
```
4 changes: 2 additions & 2 deletions dockers/ubuntu-cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
# limitations under the License.

ARG UBUNTU_VERSION=22.04
ARG CUDA_VERSION=11.7.1
ARG CUDA_VERSION=12.1.1


FROM nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}

ARG PYTHON_VERSION=3.10
ARG PYTORCH_VERSION=2.0
ARG PYTORCH_VERSION=2.0.1

SHELL ["/bin/bash", "-c"]
# https://techoverflow.net/2019/05/18/how-to-fix-configuring-tzdata-interactive-input-when-building-docker-images/
Expand Down
2 changes: 1 addition & 1 deletion docs/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sphinx:
build:
os: "ubuntu-22.04"
tools:
python: "3.9"
python: "3.10"
commands:
- printenv
- pwd ; ls -lh
Expand Down
3 changes: 1 addition & 2 deletions requirements/_docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ pydantic > 1.0.0, < 3.0.0
# --------------------------
# todo: until this has resolution - https://github.com/sphinx-gallery/sphinx-gallery/issues/1290
# Image
scikit-image ~=0.22; python_version < "3.10"
scikit-image ~=0.25; python_version > "3.9" # we do not use `> =` because of oldest replcement
scikit-image ~=0.25
2 changes: 1 addition & 1 deletion requirements/audio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ torchaudio >=2.0.1, <2.9.0
gammatone >=1.0.0, <1.1.0
librosa >=0.10.0, <0.12.0
onnxruntime >=1.12.0, <1.23 # installing onnxruntime_gpu-gpu failed on macos
requests >=2.19.0, <2.33.0
requests >=2.22.0, <2.33.0
6 changes: 3 additions & 3 deletions requirements/classification_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ numpy <2.4.0
fairlearn # group_fairness

# locauc, temporal_dependency
PyTDC @ https://github.com/Lightning-Sandbox/PyTDC/archive/bb9f7cbcbd6f894e0e94676cad12d60710aee042.zip ; platform_system != "Windows" and python_version > "3.9"
PyTDC @ https://github.com/Lightning-Sandbox/PyTDC/archive/bb9f7cbcbd6f894e0e94676cad12d60710aee042.zip ; platform_system != "Windows"
# switch to old version on Windows due AssertionError: error when building libtiledbsoma from source
# switch to old version for Python <3.10 due to impossible version/dependency resolving
PyTDC ==0.4.1 ; python_version <"3.10" or (platform_system == "Windows" and python_version < "3.12")
# switch to old version for Python <3.12 on Windows due to impossible version/dependency resolving
PyTDC ==0.4.1 ; platform_system == "Windows" and python_version < "3.12"
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def _prepare_extras(skip_pattern: str = "^_", skip_files: tuple[str] = ("base.tx
include_package_data=True,
zip_safe=False,
keywords=["deep learning", "machine learning", "pytorch", "metrics", "AI"],
python_requires=">=3.9",
python_requires=">=3.10",
setup_requires=[],
install_requires=BASE_REQUIREMENTS,
extras_require=_prepare_extras(),
Expand All @@ -242,7 +242,6 @@ def _prepare_extras(skip_pattern: str = "^_", skip_files: tuple[str] = ("base.tx
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down
Loading