Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
17 changes: 8 additions & 9 deletions .github/workflows/python-coverage-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,21 @@ jobs:
strategy:
matrix:
include:
- python-version: 3.9
tf-version: 2.11
torch-version: 1.12
- python-version: "3.10"
tf-version: "2.15"
torch-version: "2.2"

steps:
- uses: actions/checkout@v3

Copilot AI Sep 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Python setup step was removed but shell configuration bash -el {0} suggests conda/mamba environment usage. Without the Python setup step, the workflow may fail if the default Python version doesn't match the matrix requirements.

Suggested change
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Copilot uses AI. Check for mistakes.
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash -el {0}
run: |
python -m pip install --upgrade pip
pip install --upgrade uv tox tox-uv
python -m pip install --upgrade uv tox tox-uv
- name: Get coverage xml (Python ${{ matrix.python-version }} - TensorFlow ${{ matrix.tf-version }} - Torch ${{ matrix.torch-version }})
run: tox -e py$(echo ${{ matrix.python-version }}-tf${{ matrix.tf-version }}-torch${{ matrix.torch-version }}-coverage | tr -d .)
shell: bash -el {0}
run: |
python -m tox -e py$(echo ${{ matrix.python-version }}-tf${{ matrix.tf-version }}-torch${{ matrix.torch-version }}-coverage | tr -d .)
- name: Get Cover
uses: orgoro/coverage@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not so important, but Python 3.9 support will end very soon (in the next weeks). We could already test with 3.10 to 3.12 (or even 3.13).


steps:
- uses: actions/checkout@v3
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/python-tests-tf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,21 @@ jobs:
max-parallel: 4
matrix:
include:
- python-version: 3.8
tf-version: 2.5
- python-version: 3.9
tf-version: 2.8
- python-version: "3.10"
- python-version: "3.9"
tf-version: 2.11
- python-version: "3.10"
tf-version: 2.13
- python-version: "3.11"
tf-version: 2.15

steps:
- uses: actions/checkout@v3

Copilot AI Sep 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Python setup step was removed but shell configuration bash -el {0} suggests conda/mamba environment usage. Without the Python setup step, the workflow may fail if the default Python version doesn't match the matrix requirements.

Suggested change
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Copilot uses AI. Check for mistakes.
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash -el {0}
run: |
python -m pip install --upgrade pip
pip install --upgrade uv tox tox-uv
python -m pip install --upgrade uv tox tox-uv
- name: Test with tox (Python ${{ matrix.python-version }} - TensorFlow ${{ matrix.tf-version }})
run: tox -e py$(echo ${{ matrix.python-version }}-tf${{ matrix.tf-version }} | tr -d .)
shell: bash -el {0}
run: |
python -m tox -e py$(echo ${{ matrix.python-version }}-tf${{ matrix.tf-version }} | tr -d .)
21 changes: 10 additions & 11 deletions .github/workflows/python-tests-torch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,21 @@ jobs:
max-parallel: 4
matrix:
include:
- python-version: 3.8
torch-version: 1.11
- python-version: 3.9
torch-version: 1.13
- python-version: "3.10"
- python-version: "3.9"
torch-version: 2.0.0
- python-version: "3.10"
torch-version: 2.4
- python-version: "3.11"
torch-version: 2.6

steps:
- uses: actions/checkout@v3

Copilot AI Sep 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Python setup step was removed but shell configuration bash -el {0} suggests conda/mamba environment usage. Without the Python setup step, the workflow may fail if the default Python version doesn't match the matrix requirements.

Suggested change
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Copilot uses AI. Check for mistakes.
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash -el {0}
run: |
python -m pip install --upgrade pip
pip install --upgrade uv tox tox-uv
python -m pip install --upgrade uv tox tox-uv
- name: Test with tox (Python ${{ matrix.python-version }} - Pytorch ${{ matrix.torch-version }})
run: tox -e py$(echo ${{ matrix.python-version }}-torch${{ matrix.torch-version }} | tr -d .)
shell: bash -el {0}
run: |
python -m tox -e py$(echo ${{ matrix.python-version }}-torch${{ matrix.torch-version }} | tr -d .)
97 changes: 50 additions & 47 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
max-line-length = 88
extend-ignore =
# See https://github.com/PyCQA/pycodestyle/issues/373
E203,
E203

Copilot AI Sep 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trailing comma was removed from the extend-ignore configuration. This change makes it harder to add new ignore codes in the future and goes against common formatting practices for configuration lists.

Suggested change
E203
E203,

Copilot uses AI. Check for mistakes.
per-file-ignores =
*/__init__.py: F401

Expand Down Expand Up @@ -37,91 +37,94 @@ exclude_also =
except ImportError

[tox:tox]
envlist = py{38,39,310}-tf{24,25,27,28,211},py{38,39,310}-torch{17,19,110,113,200},py{38,39,310}-lint,py{39}-tf{211}-torch{112}-coverage
envlist = py{39,310,311}-tf{211,213,214,215},py{39,310,311}-torch{113,200,22,24,26},py{39,310,311}-lint,py{39}-tf{215}-torch{202}-coverage

[testenv:py{38,39,310}-tf{24,25,27,28,211}]
[testenv:py{39,310,311}-tf{211,213,214,215}]
deps =
packaging
faiss_gpu
scikit_learn
scipy
setuptools
pytest
kneed
tqdm
protobuf <=3.20
pandas
seaborn
requests
plotly == 5.15.0
tf24: tensorflow ~= 2.4.0
tf24: tensorflow_datasets ~= 4.3.0
tf24: tensorflow_probability ~= 0.12.2
tf25: tensorflow ~= 2.5.0
tf25: tensorflow_datasets ~= 4.3.0
tf25: tensorflow_probability ~= 0.13.0
tf27: tensorflow ~= 2.7.0
tf27: tensorflow_datasets
tf27: tensorflow_probability ~= 0.15.0
tf28: tensorflow ~= 2.8.0
tf28: tensorflow_datasets
tf28: tensorflow_probability ~= 0.16.0
tf211: protobuf>=3.9.2,<3.20
tf213: protobuf>=3.20.3,<4.21.0
tf214: protobuf>=3.20.3,<4.21.0
tf215: protobuf>=3.20.3,<4.21.0
tf211: numpy~=1.23.5
tf213: numpy~=1.24.3
tf214: numpy~=1.24.3
tf215: numpy~=1.26.0
tf211: tensorflow ~= 2.11.0
tf211: tensorflow_datasets
tf211: tensorflow_probability ~= 0.19.0
tf213: tensorflow ~= 2.13.0
tf213: tensorflow_datasets
tf213: tensorflow_probability ~= 0.21.0
tf214: tensorflow ~= 2.14.0
tf214: tensorflow_datasets
tf214: tensorflow_probability ~= 0.22.0
tf215: tensorflow ~= 2.15.0
tf215: tensorflow_datasets
tf215: tensorflow_probability ~= 0.23.0
install_command = uv pip install {opts} {packages}
setenv =
DL_LIB = tensorflow
commands =
tf24: uv pip install --force-reinstall numpy==1.21.0
tf25: uv pip install --force-reinstall numpy==1.21.0
tf28: uv pip install --force-reinstall numpy==1.24.0
tf211: uv pip install --force-reinstall numpy==1.26.0
py39,py310,py311: uv pip install faiss-cpu==1.7.4
tf211: uv pip install --force-reinstall numpy==1.24.0
tf213: uv pip install --force-reinstall numpy==1.24.0
tf214: uv pip install --force-reinstall numpy==1.24.0
tf215: uv pip install --force-reinstall numpy==1.26.0
pytest tests/tests_tensorflow

[testenv:py{38,39,310}-torch{17,19,110,111,113,200}]
[testenv:py{39,310,311}-torch{113,200,22,24,26}]
deps =
packaging
faiss_gpu
scikit_learn
scipy
setuptools
pytest
kneed
tqdm
protobuf <=3.20
protobuf>=3.20.3,<4.21.0
pandas
seaborn
requests
plotly == 5.15.0
torch17: torch == 1.7.1+cpu
torch17: torchvision == 0.8.2+cpu
torch17: transformers == 4.30.0
torch19: torch == 1.9.1+cpu
torch19: torchvision == 0.10.1+cpu
torch19: transformers == 4.30.0
torch110: torch == 1.10.1+cpu
torch110: torchvision == 0.11.2+cpu
torch110: transformers == 4.40.0
torch111: torch == 1.11.0+cpu
torch111: transformers == 4.43.0
torch111: torchvision == 0.12.0+cpu
torch113: torch == 1.13.1+cpu
torch113: torchvision == 0.14.1+cpu
torch113: transformers == 4.43.0
torch200: torch == 2.0.0+cpu
torch200: torchvision == 0.15.0+cpu
torch200: transformers == 4.49.0
torch22: torch == 2.2.0+cpu
torch22: torchvision == 0.17.0+cpu
torch22: transformers == 4.49.0
torch24: torch == 2.4.0+cpu
torch24: torchvision == 0.19.0+cpu
torch24: transformers == 4.49.0
torch26: torch == 2.6.0+cpu
torch26: torchvision == 0.21.0+cpu
torch26: transformers == 4.49.0
install_command = uv pip install --extra-index-url https://download.pytorch.org/whl/cpu {opts} {packages}
setenv =
DL_LIB = torch
commands =
torch111: uv pip install --force-reinstall numpy==1.21.0
py39,py310,py311: uv pip install faiss-cpu==1.7.4
torch113: uv pip install --force-reinstall numpy==1.24.0
torch200: uv pip install --force-reinstall numpy==1.26.0
torch22: uv pip install --force-reinstall numpy==1.26.0
torch24: uv pip install --force-reinstall numpy==1.26.0
torch26: uv pip install --force-reinstall numpy==1.26.0
pytest tests/tests_torch

[testenv:py{38,39,310}-lint]
[testenv:py{39,310,311}-lint]
deps =
black
flake8
Expand All @@ -133,7 +136,7 @@ commands =
flake8 oodeel tests
# mypy --namespace-packages oodeel tests

[testenv:py{39}-tf{211}-torch{112}-coverage]
[testenv:py{310}-tf{215}-torch{22}-coverage]
deps =
packaging
faiss_gpu
Expand All @@ -143,21 +146,21 @@ deps =
pytest
kneed
tqdm
protobuf <=3.20
protobuf>=3.20.3,<4.21.0
coverage
pandas
seaborn
plotly == 5.15.0
torch112: torch == 1.12.0+cpu
torch112: torchvision == 0.13.0+cpu
torch112: transformers == 4.43.0
tf211: tensorflow ~= 2.11.0
tf211: tensorflow_datasets
tf211: tensorflow_probability ~= 0.19.0
torch22: torch == 2.2.0+cpu
torch22: torchvision == 0.17.0+cpu
torch22: transformers == 4.49.0
tf215: tensorflow ~= 2.15.0
tf215: tensorflow_datasets
tf215: tensorflow_probability ~= 0.23.0
install_command = uv pip install --extra-index-url https://download.pytorch.org/whl/cpu {opts} {packages}
setenv =
DL_LIB = both
commands =
tf211: uv pip install --force-reinstall numpy==1.26.0
tf215: uv pip install --force-reinstall numpy==1.26.0
coverage run --source oodeel -m pytest
coverage xml
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
long_description = f.read()

requirements = [
"faiss_gpu",
"numpy <= 1.26.4",
"scikit_learn",
"scipy",
Expand Down