Skip to content

Commit

Permalink
ci: bump integration test to 3.9+ & patch np.Inf (#2826)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
(cherry picked from commit 06c005f)
  • Loading branch information
Borda committed Nov 7, 2024
1 parent 65a0828 commit 3163028
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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-13", "windows-2022"]
python-version: ["3.8", "3.10"]
python-version: ["3.9", "3.11"]
requires: ["oldest", "latest"]
exclude:
- { python-version: "3.11", requires: "oldest" }
Expand Down
7 changes: 7 additions & 0 deletions src/torchmetrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
_PACKAGE_ROOT = os.path.dirname(__file__)
_PROJECT_ROOT = os.path.dirname(_PACKAGE_ROOT)

if package_available("numpy"):
# compatibility for AttributeError: `np.Inf` was removed in the NumPy 2.0 release. Use `np.inf` instead
import numpy

numpy.Inf = numpy.inf


if package_available("PIL"):
import PIL

Expand Down

0 comments on commit 3163028

Please sign in to comment.