-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add pipeline to test torch wrapper, regroup cfg file in a single …
…setup and adapt worflows for the wrapper
- Loading branch information
1 parent
95ac086
commit 82231f4
Showing
8 changed files
with
133 additions
and
53 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: tests for torch | ||
|
||
on: | ||
push: | ||
branches: | ||
- lucas/torch | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
checks: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
include: | ||
- python-version: 3.8 | ||
tf-version: 2.5 | ||
torch-version: 1.11 | ||
- python-version: 3.8 | ||
tf-version: 2.8 | ||
torch-version: 1.11 | ||
- python-version: 3.8 | ||
tf-version: 2.11 | ||
torch-version: 1.11 | ||
- python-version: 3.9 | ||
tf-version: 2.8 | ||
torch-version: 1.13 | ||
- python-version: 3.9 | ||
tf-version: 2.11 | ||
torch-version: 1.13 | ||
- python-version: "3.10" | ||
tf-version: 2.8 | ||
torch-version: 2.0.0 | ||
- python-version: "3.10" | ||
tf-version: 2.11 | ||
torch-version: 2.0.0 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: Test with tox (Python ${{ matrix.python-version }} - TF ${{ matrix.tf-version }} - PyTorch ${{ matrix.torch-version }}) | ||
run: tox -e py$(echo ${{ matrix.python-version }}-tf${{ matrix.tf-version }}-torch${{matrix.torch-version}} | tr -d .) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
[bumpversion] | ||
current_version = 1.0.1 | ||
commit = True | ||
tag = True | ||
|
||
[bumpversion:file:setup.py] | ||
|
||
[bumpversion:file:xplique/__init__.py] | ||
|
||
[pylint] | ||
disable = | ||
R0903, # allows to expose only one public method | ||
R0914, # allow multiples local variables | ||
E0401, # pending issue with pylint see pylint#2603 | ||
E1123, # issues between pylint and tensorflow since 2.2.0 | ||
E1120, # see pylint#3613 | ||
C3001, # lambda function as variable | ||
max-line-length = 100 | ||
max-args = 12 | ||
|
||
[similarities] | ||
min-similarity-lines = 6 | ||
ignore-comments = yes | ||
ignore-docstrings = yes | ||
ignore-imports = no | ||
|
||
[tox:tox] | ||
envlist = py{37,38,39,310}-lint, py{37,38,39,310}-tf{21,25,28,211}, py{38,39,310}-tf{25,28,211}-torch{111,113,200} | ||
|
||
[testenv:py{37,38,39,310}-lint] | ||
commands = | ||
python -m pylint xplique | ||
|
||
[testenv:py{37,38,39,310}-tf{31,25,28,211}] | ||
deps = | ||
pytest | ||
pytest-cov | ||
tf21: tensorflow ~= 2.1.0 | ||
tf25: tensorflow ~= 2.5.0 | ||
tf28: tensorflow ~= 2.8.0 | ||
tf211: tensorflow ~= 2.11.0 | ||
-rrequirements.txt | ||
|
||
commands = | ||
pytest --cov=xplique --ignore=xplique/wrappers/pytorch.py --ignore=tests/wrappers/test_pytorch_wrapper.py {posargs} | ||
|
||
[testenv:py{38,39,310}-tf{25,28,211}-torch{111,113,200}] | ||
deps = | ||
pytest | ||
pytest-cov | ||
tf25: tensorflow ~= 2.5.0 | ||
tf28: tensorflow ~= 2.8.0 | ||
tf211: tensorflow ~= 2.11.0 | ||
torch111: torch == 1.11.0 | ||
torch113: torch == 1.13.0 | ||
torch200: torch | ||
-rrequirements.txt | ||
|
||
commands = | ||
pytest --cov=xplique/wrappers/pytorch tests/wrappers/test_pytorch_wrapper.py | ||
|
||
[mypy] | ||
check_untyped_defs = True | ||
warn_unused_configs = True | ||
|
||
[mypy-numpy.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-sklearn.*] | ||
ignore_missing_imports = True |