Skip to content

Commit b5cb15a

Browse files
authored
Merge pull request #1044 from Trusted-AI/dev_1.6.1
Update to ART 1.6.1
2 parents 3870448 + c93f778 commit b5cb15a

File tree

191 files changed

+4681
-1819
lines changed

Some content is hidden

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

191 files changed

+4681
-1819
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Get base from a pytorch image
2+
FROM pytorch/pytorch:1.5.1-cuda10.1-cudnn7-runtime
3+
4+
# Set to install things in non-interactive mode
5+
ENV DEBIAN_FRONTEND noninteractive
6+
7+
# Install system wide softwares
8+
RUN apt-get update \
9+
&& apt-get install -y \
10+
libgl1-mesa-glx \
11+
libx11-xcb1 \
12+
git \
13+
gcc \
14+
mono-mcs \
15+
cmake \
16+
libavcodec-extra \
17+
ffmpeg \
18+
curl \
19+
&& apt-get clean all \
20+
&& rm -r /var/lib/apt/lists/*
21+
22+
RUN /opt/conda/bin/conda install --yes \
23+
astropy \
24+
matplotlib \
25+
pandas \
26+
scikit-learn \
27+
scikit-image
28+
29+
# Install necessary libraries for deepspeech v2
30+
RUN pip install torch
31+
RUN pip install tensorflow
32+
RUN pip install torchaudio==0.5.1
33+
34+
RUN git clone https://github.com/SeanNaren/warp-ctc.git
35+
RUN cd warp-ctc && mkdir build && cd build && cmake .. && make
36+
RUN cd warp-ctc/pytorch_binding && python setup.py install
37+
38+
RUN git clone https://github.com/SeanNaren/deepspeech.pytorch.git
39+
RUN cd deepspeech.pytorch && git checkout V2.1
40+
RUN cd deepspeech.pytorch && pip install -r requirements.txt
41+
RUN cd deepspeech.pytorch && pip install -e .
42+
43+
RUN pip install numba==0.50.0
44+
RUN pip install pytest-cov
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: 'Test DeepSpeech v2'
2+
description: 'Run tests for DeepSpeech v2'
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- run: $GITHUB_ACTION_PATH/run.sh
7+
shell: bash
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh -l
2+
3+
exit_code=0
4+
5+
pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/speech_recognition/test_pytorch_deep_speech.py --framework=pytorch --skip_travis=True --durations=0
6+
if [[ $? -ne 0 ]]; then exit_code=1; echo "Failed estimators/speech_recognition/test_pytorch_deep_speech tests"; fi
7+
pytest --cov-report=xml --cov=art --cov-append -q -vv tests/attacks/evasion/test_imperceptible_asr_pytorch.py --framework=pytorch --skip_travis=True --durations=0
8+
if [[ $? -ne 0 ]]; then exit_code=1; echo "Failed attacks/evasion/test_imperceptible_asr_pytorch tests"; fi
9+
10+
exit ${exit_code}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI PyTorchDeepSpeech v2
2+
on:
3+
# Run on manual trigger
4+
workflow_dispatch:
5+
6+
# Run on pull requests
7+
pull_request:
8+
paths-ignore:
9+
- '*.md'
10+
11+
# Run when pushing to main or dev branches
12+
push:
13+
branches:
14+
- main
15+
- dev*
16+
17+
# Run scheduled CI flow daily
18+
schedule:
19+
- cron: '0 8 * * 0'
20+
21+
jobs:
22+
test_deepspeech_v2:
23+
name: PyTorchDeepSpeech v2
24+
runs-on: ubuntu-latest
25+
container: minhitbk/art_testing_envs:deepspeech_v2
26+
steps:
27+
- name: Checkout Repo
28+
uses: actions/checkout@v2
29+
- name: Run Test Action
30+
uses: ./.github/actions/deepspeech-v2
31+
- name: Upload coverage to Codecov
32+
uses: codecov/codecov-action@v1

.github/workflows/ci-lingvo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Continuous Integration
1+
name: CI Lingvo
22
on:
33
# Run on manual trigger
44
workflow_dispatch:

.github/workflows/ci-mxnet.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Continuous Integration
1+
name: CI MXNet
22
on:
33
# Run on manual trigger
44
workflow_dispatch:
@@ -46,6 +46,15 @@ jobs:
4646
torchvision: 0.8.2+cpu
4747
torchaudio: 0.7.2
4848
scikit-learn: 0.23.2
49+
- name: legacy (TensorFlow 2.4.1 Keras 2.4.3 PyTorch 1.7.1 scikit-learn 0.24.1 Python 3.7)
50+
framework: legacy
51+
python: 3.7
52+
tensorflow: 2.4.1
53+
keras: 2.4.3
54+
torch: 1.7.1+cpu
55+
torchvision: 0.8.2+cpu
56+
torchaudio: 0.7.2
57+
scikit-learn: 0.24.1
4958

5059
name: Run ${{ matrix.name }} Tests
5160
steps:
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI PyTorchFasterRCNN
2+
on:
3+
# Run on manual trigger
4+
workflow_dispatch:
5+
6+
# Run on pull requests
7+
pull_request:
8+
paths-ignore:
9+
- '*.md'
10+
11+
# Run when pushing to main or dev branches
12+
push:
13+
branches:
14+
- main
15+
- dev*
16+
17+
# Run scheduled CI flow daily
18+
schedule:
19+
- cron: '0 8 * * 0'
20+
21+
jobs:
22+
test_pytorch_fasterrcnn:
23+
name: PyTorchFasterRCNN
24+
runs-on: ubuntu-20.04
25+
strategy:
26+
fail-fast: false
27+
steps:
28+
- name: Checkout Repo
29+
uses: actions/checkout@v2
30+
- name: Setup Python
31+
uses: actions/setup-python@v2
32+
with:
33+
python-version: 3.7
34+
- name: Install Dependencies
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get -y -q install ffmpeg libavcodec-extra
38+
python -m pip install --upgrade pip setuptools wheel
39+
pip3 install -q -r requirements.txt
40+
pip list
41+
- name: Pre-install torch
42+
run: |
43+
pip install torch==1.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
44+
pip install torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
45+
pip install torchaudio==0.6.0 -f https://download.pytorch.org/whl/torch_stable.html
46+
- name: Run Test Action
47+
run: pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/object_detection/test_pytorch_faster_rcnn.py --framework=pytorch --skip_travis=True --durations=0
48+
- name: Upload coverage to Codecov
49+
uses: codecov/codecov-action@v1

.github/workflows/ci.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Continuous Integration
1+
name: CI General
22
on:
33
# Run on manual trigger
44
workflow_dispatch:
@@ -73,8 +73,12 @@ jobs:
7373
framework: scikitlearn
7474
scikit-learn: 0.23.2
7575
python: 3.8
76+
- name: scikit-learn 0.24.1 (Python 3.8)
77+
framework: scikitlearn
78+
scikit-learn: 0.24.1
79+
python: 3.8
7680

77-
name: Run ${{ matrix.name }} Tests
81+
name: ${{ matrix.name }}
7882
steps:
7983
- name: Checkout Repo
8084
uses: actions/checkout@v2
@@ -126,7 +130,7 @@ jobs:
126130
pip install tensorflow-addons==0.9.1
127131
pip install model-pruning-google-research==0.0.3
128132
pip list
129-
- name: Run ${{ matrix.name }} Tests
133+
- name: Run Tests
130134
run: ./run_tests.sh ${{ matrix.framework }}
131135
- name: Upload coverage to Codecov
132136
uses: codecov/codecov-action@v1
@@ -144,19 +148,22 @@ jobs:
144148
run: |
145149
sudo apt-get update
146150
sudo apt-get -y -q install ffmpeg libavcodec-extra
147-
pip install tensorflow==2.2.2
148-
pip install keras==2.3.1
151+
pip install tensorflow==2.4.1
152+
pip install keras==2.4.3
149153
- name: Install Dependencies
150154
run: |
151155
python -m pip install --upgrade pip setuptools wheel
152156
pip install -q pylint pycodestyle
153157
pip install -q -r requirements.txt
154158
pip list
155159
- name: pycodestyle
156-
run: (pycodestyle --ignore=C0330,C0415,E203,E231,W503 --max-line-length=120 art || exit 0)
160+
run: pycodestyle --ignore=C0330,C0415,E203,E231,W503 --max-line-length=120 art
157161
- name: pylint
158-
run: (pylint --disable=C0330,C0415,E203,E1136 -rn art || exit 0)
159-
- name: Check Types (mypy)
160-
run: (mypy art || exit 0)
161-
- name: pytest
162-
run: (py.test --flake8 -m flake8 || exit 0)
162+
if: ${{ always() }}
163+
run: pylint --disable=C0330,C0415,E203,E1136,E0401,E1102 -rn art
164+
- name: mypy
165+
if: ${{ always() }}
166+
run: mypy art
167+
- name: pytest-flake8
168+
if: ${{ always() }}
169+
run: pytest --flake8 -v -m flake8

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ name: "CodeQL"
77

88
on:
99
push:
10-
branches: [main, dev_1.6.0, dev_1.6.1]
10+
branches: [main, dev_*]
1111
pull_request:
1212
# The branches below must be a subset of the branches above
13-
branches: [main]
13+
branches: [main, dev_*]
1414
schedule:
1515
- cron: '0 7 * * 0'
1616

.pylintrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ score=yes
189189
[REFACTORING]
190190

191191
# Maximum number of nested blocks for function / method body
192-
max-nested-blocks=5
192+
max-nested-blocks=7
193193

194194
# Complete name of functions that never returns. When checking for
195195
# inconsistent-return-statements if a never returning function is called then
@@ -531,7 +531,7 @@ max-branches=12
531531
max-locals=15
532532

533533
# Maximum number of parents for a class (see R0901).
534-
max-parents=7
534+
max-parents=11
535535

536536
# Maximum number of public methods for a class (see R0904).
537537
max-public-methods=20

0 commit comments

Comments
 (0)