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

Drop python 3.7 support #1640

Merged
merged 38 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8fc94a4
drop 3.7
SkafteNicki Mar 21, 2023
3fe96ca
changelog
SkafteNicki Mar 21, 2023
81ef91e
Merge branch 'master' into drop_py37
SkafteNicki Mar 21, 2023
35fd969
check package
SkafteNicki Mar 21, 2023
73601eb
Merge branch 'drop_py37' of https://github.com/PyTorchLightning/metri…
SkafteNicki Mar 21, 2023
dec44f9
Merge branch 'master' into drop_py37
Borda Mar 21, 2023
179f08d
sklearn
Borda Mar 21, 2023
9fade58
Merge branch 'master' into drop_py37
Borda Mar 28, 2023
a060e7f
Merge branch 'master' into drop_py37
mergify[bot] Mar 28, 2023
a0735e6
try fix req
SkafteNicki Mar 28, 2023
531e679
Merge branch 'master' into drop_py37
mergify[bot] Mar 28, 2023
c383b67
up req
SkafteNicki Mar 29, 2023
bca4880
pandas up
SkafteNicki Mar 29, 2023
aad96a2
up numpy
SkafteNicki Mar 29, 2023
3083a5b
Merge branch 'master' into drop_py37
mergify[bot] Mar 29, 2023
3e0721f
Merge branch 'master' into drop_py37
mergify[bot] Mar 31, 2023
13158c9
Merge branch 'master' into drop_py37
mergify[bot] Mar 31, 2023
894d5bf
Merge branch 'master' into drop_py37
mergify[bot] Mar 31, 2023
a52d23c
Merge branch 'master' into drop_py37
mergify[bot] Mar 31, 2023
daea0ec
Merge branch 'master' into drop_py37
mergify[bot] Mar 31, 2023
3f592fb
Merge branch 'master' into drop_py37
mergify[bot] Mar 31, 2023
87fba7a
Merge branch 'master' into drop_py37
Borda Mar 31, 2023
9f19e6c
Merge branch 'master' into drop_py37
mergify[bot] Mar 31, 2023
63b4056
Merge branch 'master' into drop_py37
mergify[bot] Mar 31, 2023
976fad3
Merge branch 'master' into drop_py37
mergify[bot] Apr 1, 2023
bb27d78
Merge branch 'master' into drop_py37
mergify[bot] Apr 3, 2023
72f790e
Merge branch 'master' into drop_py37
mergify[bot] Apr 3, 2023
56c73fc
update Azure
Borda Apr 3, 2023
d56191f
cuda vis
Borda Apr 3, 2023
0efb467
...
Borda Apr 3, 2023
6ae3734
torch
Borda Apr 3, 2023
a1199df
1.9.0
Borda Apr 3, 2023
dc89359
timeout=240
Borda Apr 3, 2023
3c96955
adjust
Borda Apr 3, 2023
d232a62
11.1
Borda Apr 3, 2023
cde9e1f
1.8.1
Borda Apr 3, 2023
7893c4b
skip
Borda Apr 3, 2023
0f2fcaf
str
Borda Apr 3, 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
1 change: 1 addition & 0 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ jobs:
actions-ref: main
artifact-name: dist-packages-${{ github.sha }}
import-name: "torchmetrics"
testing-matrix: {"os": ["ubuntu-20.04", "macos-11", "windows-2022"], "python-version": ["3.8", "3.10"]}
3 changes: 1 addition & 2 deletions .github/workflows/ci-integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, macOS-11, windows-2022]
python-version: ['3.7', '3.10']
python-version: ['3.8', '3.10']
requires: ['oldest', 'latest']
exclude:
- {python-version: '3.7', requires: 'latest'}
- {python-version: '3.10', requires: 'oldest'}
- {python-version: '3.10', os: 'windows'} # todo: https://discuss.pytorch.org/t/numpy-is-not-available-error/146192
include:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/ci-tests-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,8 @@ jobs:
- {os: 'windows-2022', python-version: '3.9', pytorch-version: '1.13.1'}
- {os: 'windows-2022', python-version: '3.10', pytorch-version: '2.0.0'}
# the oldest configurations
- {os: 'ubuntu-20.04', python-version: '3.7', pytorch-version: '1.8.1', requires: 'oldest'}
- {os: 'ubuntu-20.04', python-version: '3.8', pytorch-version: '1.8.1', requires: 'oldest'}
- {os: 'macOS-11', python-version: '3.7', pytorch-version: '1.8.1', requires: 'oldest'}
- {os: 'macOS-11', python-version: '3.8', pytorch-version: '1.8.1', requires: 'oldest'}
- {os: 'windows-2019', python-version: '3.7', pytorch-version: '1.8.1', requires: 'oldest'}
- {os: 'windows-2019', python-version: '3.8', pytorch-version: '1.8.1', requires: 'oldest'}
env:
PYTORCH_URL: "https://download.pytorch.org/whl/cpu/torch_stable.html"
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

-
- Support for python 3.7 ([#1640](https://github.com/Lightning-AI/metrics/pull/1640))


### Fixed
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def _prepare_extras(skip_files: Tuple[str] = ("devel.txt", "doctest.txt", "integ
include_package_data=True,
zip_safe=False,
keywords=["deep learning", "machine learning", "pytorch", "metrics", "AI"],
python_requires=">=3.7",
python_requires=">=3.8",
setup_requires=[],
install_requires=BASE_REQUIREMENTS,
extras_require=_prepare_extras(),
Expand All @@ -227,7 +227,6 @@ def _prepare_extras(skip_files: Tuple[str] = ("devel.txt", "doctest.txt", "integ
# 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.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
6 changes: 0 additions & 6 deletions tests/unittests/nominal/test_cramers.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ def _dython_cramers_v_matrix(matrix, bias_correction, nan_strategy, nan_replace_


@pytest.mark.skipif(compare_version("pandas", operator.lt, "1.3.2"), reason="`dython` package requires `pandas>=1.3.2`")
@pytest.mark.skipif( # TODO: testing on CUDA fails with pandas 1.3.5, and newer is not available for python 3.7
torch.cuda.is_available(), reason="Tests fail on CUDA with the most up-to-date available pandas"
)
@pytest.mark.parametrize(
"preds, target",
[
Expand Down Expand Up @@ -167,9 +164,6 @@ def test_cramers_v_differentiability(self, preds, target, bias_correction, nan_s


@pytest.mark.skipif(compare_version("pandas", operator.lt, "1.3.2"), reason="`dython` package requires `pandas>=1.3.2`")
@pytest.mark.skipif( # TODO: testing on CUDA fails with pandas 1.3.5, and newer is not available for python 3.7
torch.cuda.is_available(), reason="Tests fail on CUDA with the most up-to-date available pandas"
)
@pytest.mark.parametrize("bias_correction", [False, True])
@pytest.mark.parametrize(("nan_strategy", "nan_replace_value"), [("replace", 1.0), ("drop", None)])
def test_cramers_v_matrix(cramers_matrix_input, bias_correction, nan_strategy, nan_replace_value):
Expand Down
6 changes: 0 additions & 6 deletions tests/unittests/nominal/test_pearson.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ def _pd_pearsons_t_matrix(matrix):


@pytest.mark.skipif(compare_version("pandas", operator.lt, "1.3.2"), reason="`dython` package requires `pandas>=1.3.2`")
@pytest.mark.skipif( # TODO: testing on CUDA fails with pandas 1.3.5, and newer is not available for python 3.7
torch.cuda.is_available(), reason="Tests fail on CUDA with the most up-to-date available pandas"
)
@pytest.mark.parametrize(
"preds, target",
[
Expand Down Expand Up @@ -124,9 +121,6 @@ def test_pearsons_t_differentiability(self, preds, target):


@pytest.mark.skipif(compare_version("pandas", operator.lt, "1.3.2"), reason="`dython` package requires `pandas>=1.3.2`")
@pytest.mark.skipif( # TODO: testing on CUDA fails with pandas 1.3.5, and newer is not available for python 3.7
torch.cuda.is_available(), reason="Tests fail on CUDA with the most up-to-date available pandas"
)
def test_pearsons_contingency_coefficient_matrix(pearson_matrix_input):
"""Test matrix version of metric works as expected."""
tm_score = pearsons_contingency_coefficient_matrix(pearson_matrix_input)
Expand Down
6 changes: 0 additions & 6 deletions tests/unittests/nominal/test_theils_u.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ def _dython_theils_u_matrix(matrix, nan_strategy, nan_replace_value):


@pytest.mark.skipif(compare_version("pandas", operator.lt, "1.3.2"), reason="`dython` package requires `pandas>=1.3.2`")
@pytest.mark.skipif( # TODO: testing on CUDA fails with pandas 1.3.5, and newer is not available for python 3.7
torch.cuda.is_available(), reason="Tests fail on CUDA with the most up-to-date available pandas"
)
@pytest.mark.parametrize(
"preds, target",
[
Expand Down Expand Up @@ -159,9 +156,6 @@ def test_theils_u_differentiability(self, preds, target, nan_strategy, nan_repla


@pytest.mark.skipif(compare_version("pandas", operator.lt, "1.3.2"), reason="`dython` package requires `pandas>=1.3.2`")
@pytest.mark.skipif( # TODO: testing on CUDA fails with pandas 1.3.5, and newer is not available for python 3.7
torch.cuda.is_available(), reason="Tests fail on CUDA with the most up-to-date available pandas"
)
@pytest.mark.parametrize(("nan_strategy", "nan_replace_value"), [("replace", 1.0), ("drop", None)])
def test_theils_u_matrix(theils_u_matrix_input, nan_strategy, nan_replace_value):
"""Test matrix version of metric works as expected."""
Expand Down
6 changes: 0 additions & 6 deletions tests/unittests/nominal/test_tschuprows.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ def _pd_tschuprows_t_matrix(matrix):


@pytest.mark.skipif(compare_version("pandas", operator.lt, "1.3.2"), reason="`dython` package requires `pandas>=1.3.2`")
@pytest.mark.skipif( # TODO: testing on CUDA fails with pandas 1.3.5, and newer is not available for python 3.7
torch.cuda.is_available(), reason="Tests fail on CUDA with the most up-to-date available pandas"
)
@pytest.mark.parametrize(
"preds, target",
[
Expand Down Expand Up @@ -122,9 +119,6 @@ def test_tschuprows_t_differentiability(self, preds, target):


@pytest.mark.skipif(compare_version("pandas", operator.lt, "1.3.2"), reason="`dython` package requires `pandas>=1.3.2`")
@pytest.mark.skipif( # TODO: testing on CUDA fails with pandas 1.3.5, and newer is not available for python 3.7
torch.cuda.is_available(), reason="Tests fail on CUDA with the most up-to-date available pandas"
)
def test_tschuprows_t_matrix(tschuprows_matrix_input):
"""Test matrix version of metric works as expected."""
tm_score = tschuprows_t_matrix(tschuprows_matrix_input, bias_correction=False)
Expand Down