Skip to content

Commit be31bd8

Browse files
authored
Merge pull request #2478 from Trusted-AI/development_pytest_flake8
Update style checks
2 parents 6410aa1 + d75ec05 commit be31bd8

File tree

367 files changed

+4139
-4189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

367 files changed

+4139
-4189
lines changed

.github/workflows/ci-deepspeech-v3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
- cron: '0 8 * * 0'
2323

2424
jobs:
25-
test_deepspeech_v3_torch_1_10:
25+
test_deepspeech_v3_torch_2_1_1:
2626
name: PyTorchDeepSpeech v3 / PyTorch 2.1.1
2727
runs-on: ubuntu-latest
2828
container: adversarialrobustnesstoolbox/art_testing_envs:deepspeech_v3_torch_2_1_1

.github/workflows/ci-lingvo.yml

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
include:
31-
- name: TensorFlow+Lingvo 2.1.0v1 (Keras 2.3.1 Python 3.6)
32-
framework: tensorflow2v1
33-
python: 3.6
34-
tensorflow: 2.1.0
31+
- name: TensorFlow+Lingvo 0.13.1 (Python 3.10)
32+
framework: tensorflow
33+
python: '3.10'
34+
lingvo: 0.13.1
35+
tensorflow: 2.14.0
3536
tf_version: v2
36-
keras: 2.3.1
37-
lingvo: 0.6.4
37+
keras: 2.14.0
38+
tf_addons: 0.21.0
3839

3940
name: Run ${{ matrix.name }} Tests
4041
steps:
@@ -45,39 +46,17 @@ jobs:
4546
with:
4647
python-version: ${{ matrix.python }}
4748
- name: Pre-install Lingvo ASR
48-
# scipy beyond 1.6.0 is not available on Python 3.6, therefore we adapt the installation of requirements_test.txt
4949
run: |
5050
sudo apt-get update
5151
sudo apt-get -y -q install ffmpeg libavcodec-extra
5252
python -m pip install --upgrade pip setuptools wheel
53-
pip install -q -r <(sed '/^scipy/d;/^matplotlib/d;/^pandas/d;/^statsmodels/d;/^numba/d;/^jax/d;/^h5py/d;/^Pillow/d;/^pytest/d;/^pytest-mock/d;/^torch/d;/^torchaudio/d;/^torchvision/d;/^xgboost/d;/^requests/d;/^tensorflow/d;/^keras/d;/^kornia/d;/^librosa/d;/^tqdm/d;/^timm/d;/^catboost/d;/^scikit-learn/d;/^GPy/d;/^lief/d;/^ultralytics/d;/^ipython/d' requirements_test.txt)
54-
pip install scipy==1.5.4
55-
pip install matplotlib==3.3.4
56-
pip install pandas==1.1.5
57-
pip install statsmodels==0.12.2
58-
pip install numba==0.53.1
53+
pip install -q -r requirements_test.txt
54+
pip install -q -r <(sed '/^tensorflow/d;/^keras/d;/^tensorflow-addons/d;/^lingvo/d;/^Pillow/d' requirements_test.txt)
5955
pip install tensorflow==${{ matrix.tensorflow }}
6056
pip install keras==${{ matrix.keras }}
61-
pip install lingvo==${{ matrix.lingvo }}
62-
pip install tensorflow-addons==0.9.1
63-
pip install model-pruning-google-research==0.0.3
64-
pip install h5py==2.10.0
65-
pip install pytest~=7.0.1
66-
pip install pytest-flake8~=1.1.0
67-
pip install pytest-mock
68-
pip install pytest-cov~=3.0.0
69-
pip install torch==1.10.2+cpu --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
70-
pip install torchaudio==0.10.2+cpu --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
71-
pip install torchvision==0.11.3+cpu --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
72-
pip install xgboost==1.5.2
73-
pip install requests==2.27.1
74-
pip install kornia==0.6.8
75-
pip install librosa==0.9.2
76-
pip install tqdm==4.64.1
77-
pip install catboost==1.1.1
78-
pip install scikit-learn==0.24.2
79-
pip install GPy==1.10.0
80-
pip install lief==0.12.3
57+
pip install tensorflow-addons==${{ matrix.tf_addons }}
58+
pip install lingvo==0.13.1
59+
pip install Pillow==10.0.0
8160
pip list
8261
- name: Run ${{ matrix.name }} Tests
8362
run: pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/speech_recognition/test_tensorflow_lingvo.py --framework=${{ matrix.framework }} --durations=0

.github/workflows/ci-style-checks.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,23 @@ jobs:
3939
- name: Install Dependencies
4040
run: |
4141
python -m pip install --upgrade pip setuptools wheel
42-
pip install -q pylint==2.12.2 mypy==1.7.1 pycodestyle==2.8.0 black==21.12b0
43-
pip install -q -r <(sed '/^numpy/d;/^pluggy/d;/^tensorflow/d;/^keras/d' requirements_test.txt)
42+
pip install -q pylint==3.2.6 mypy==1.11.1 pycodestyle==2.12.0 black==24.4.2 ruff==0.5.5
43+
pip install -q -r <(sed '/^numpy/d;/^tensorflow/d;/^keras/d' requirements_test.txt)
4444
pip install numpy==1.22.4
45-
pip install pluggy==0.13.1
4645
pip install tensorflow==2.13.1
4746
pip install keras==2.13.1
48-
pip install types-six
49-
pip install types-PyYAML
50-
pip install types-setuptools
51-
pip install click==8.0.2
5247
pip list
5348
- name: pycodestyle
5449
run: pycodestyle --ignore=C0330,C0415,E203,E231,W503 --max-line-length=120 art
5550
- name: pylint
5651
if: ${{ always() }}
57-
run: pylint --disable=C0330,C0415,E203,E1136,E0401,E1102 -rn art
52+
run: pylint --fail-under=9.67 art/
5853
- name: mypy
5954
if: ${{ always() }}
6055
run: mypy art
61-
- name: pytest-flake8
56+
- name: ruff
6257
if: ${{ always() }}
63-
run: pytest --flake8 -v -m flake8 --ignore=contrib
58+
run: ruff check art/ tests/ examples/
6459
- name: black
6560
if: ${{ always() }}
6661
run: |

.github/workflows/ci-tensorflow-v1.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
sudo apt-get update
4949
sudo apt-get -y -q install ffmpeg libavcodec-extra
5050
python -m pip install --upgrade pip setuptools wheel
51-
pip install -q -r <(sed '/^pandas/d;/^scipy/d;/^matplotlib/d;/^xgboost/d;/^tensorflow/d;/^keras/d;/^jax/d;/^torch/d;/^Pillow/d;/^h5py/d;/^kornia/d;/^scikit-learn/d;/^pytest-mock/d;/^GPy/d;/^lief/d;/^statsmodels/d;/^ultralytics/d;/^ipython/d' requirements_test.txt)
51+
pip install -q -r <(sed '/^pandas/d;/^scipy/d;/^matplotlib/d;/^xgboost/d;/^tensorflow/d;/^keras/d;/^jax/d;/^torch/d;/^Pillow/d;/^h5py/d;/^kornia/d;/^scikit-learn/d;/^pytest-mock/d;/^GPy/d;/^lief/d;/^statsmodels/d;/^ultralytics/d;/^ipython/d;/^numba/d;/^pytest/d;/^pylint/d;/^mypy/d;/^pycodestyle/d;/^black/d;/^types-PyYAML/d;/^types-setuptools/d' requirements_test.txt)
5252
pip install pandas==1.3.5
5353
pip install scipy==1.7.2
5454
pip install matplotlib==3.5.3
@@ -68,6 +68,9 @@ jobs:
6868
pip install GPy~=1.10.0
6969
pip install lief==0.12.3
7070
pip install statsmodels==0.13.5
71+
pip install numba==0.56.4
72+
pip install pytest==7.4.4
73+
pip install pytest-cov
7174
pip list
7275
- name: Run Tests
7376
run: ./run_tests.sh ${{ matrix.framework }}

0 commit comments

Comments
 (0)