Skip to content

Commit bb5b5c1

Browse files
author
Beat Buesser
committed
Merge remote-tracking branch 'origin/main' into dev_1.8.0
2 parents a3525e9 + 07e18ee commit bb5b5c1

File tree

110 files changed

+3471
-996
lines changed

Some content is hidden

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

110 files changed

+3471
-996
lines changed

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ exclude_lines =
88
pragma: no cover
99
raise NotImplementedError
1010
if __name__ == .__main__.:
11+
if TYPE_CHECKING:
1112
ignore_errors = True
1213
omit =
1314
docs/*

.github/actions/deepspeech-v2/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
exit_code=0
44

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
5+
pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/speech_recognition/test_pytorch_deep_speech.py --framework=pytorch --durations=0
66
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
7+
pytest --cov-report=xml --cov=art --cov-append -q -vv tests/attacks/evasion/test_imperceptible_asr_pytorch.py --framework=pytorch --durations=0
88
if [[ $? -ne 0 ]]; then exit_code=1; echo "Failed attacks/evasion/test_imperceptible_asr_pytorch tests"; fi
99

1010
exit ${exit_code}

.github/actions/deepspeech-v3/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
exit_code=0
44

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
5+
pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/speech_recognition/test_pytorch_deep_speech.py --framework=pytorch --durations=0
66
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
7+
pytest --cov-report=xml --cov=art --cov-append -q -vv tests/attacks/evasion/test_imperceptible_asr_pytorch.py --framework=pytorch --durations=0
88
if [[ $? -ne 0 ]]; then exit_code=1; echo "Failed attacks/evasion/test_imperceptible_asr_pytorch tests"; fi
99

1010
exit ${exit_code}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Get base from a tensorflow image
2+
FROM tensorflow/tensorflow:1.15.5-py3
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+
libavcodec-extra \
16+
ffmpeg \
17+
curl \
18+
libsndfile-dev \
19+
libsndfile1 \
20+
wget \
21+
unzip \
22+
&& apt-get clean all \
23+
&& rm -r /var/lib/apt/lists/*
24+
25+
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
26+
RUN bash Miniconda3-latest-Linux-x86_64.sh -b -p /miniconda
27+
RUN /miniconda/bin/conda install --yes \
28+
astropy \
29+
matplotlib \
30+
pandas \
31+
scikit-learn \
32+
scikit-image
33+
34+
# Install necessary libraries for tensorflow faster rcnn
35+
RUN mkdir TensorFlow
36+
RUN cd TensorFlow && git clone https://github.com/tensorflow/models
37+
RUN cd TensorFlow && wget https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protoc-3.17.3-linux-x86_64.zip
38+
RUN cd TensorFlow && unzip protoc-3.17.3-linux-x86_64.zip -d protobuf
39+
RUN cd TensorFlow/models/research && /TensorFlow/protobuf/bin/protoc object_detection/protos/*.proto --python_out=.
40+
RUN cd TensorFlow/models/research && cp object_detection/packages/tf1/setup.py .
41+
RUN cd TensorFlow/models/research && python -m pip install --use-feature=2020-resolver .
42+
43+
RUN pip install tqdm
44+
RUN pip install requests
45+
RUN pip install sklearn
46+
RUN pip install numba==0.50.0
47+
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 TensorFlowFasterRCNN'
2+
description: 'Run tests for TensorFlowFasterRCNN'
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- run: $GITHUB_ACTION_PATH/run.sh
7+
shell: bash
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
exit_code=0
4+
5+
pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/object_detection/test_tensorflow_faster_rcnn.py --framework=tensorflow --durations=0
6+
if [[ $? -ne 0 ]]; then exit_code=1; echo "Failed estimators/object_detection/test_tensorflow_faster_rcnn.py tests"; fi
7+
8+
pytest --cov-report=xml --cov=art --cov-append -q -vv tests/attacks/test_shapeshifter.py --framework=tensorflow --durations=0
9+
if [[ $? -ne 0 ]]; then exit_code=1; echo "Failed attacks/test_shapeshifter.py tests"; fi
10+
11+
exit ${exit_code}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
- name: Run Test Action
3030
uses: ./.github/actions/deepspeech-v2
3131
- name: Upload coverage to Codecov
32-
uses: codecov/[email protected].2
32+
uses: codecov/[email protected].3

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
- name: Run Test Action
3030
uses: ./.github/actions/deepspeech-v3
3131
- name: Upload coverage to Codecov
32-
uses: codecov/[email protected].2
32+
uses: codecov/[email protected].3

.github/workflows/ci-legacy.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: CI Legacy
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:
23+
runs-on: ubuntu-16.04
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
module: [attacks, classifiers, speech_recognizers, defences, metrics, wrappers, art]
28+
include:
29+
- name: legacy (TensorFlow 2.3.2 Keras 2.4.3 PyTorch 1.7.1 scikit-learn 0.22.2 Python 3.7)
30+
framework: legacy
31+
python: 3.7
32+
tensorflow: 2.3.2
33+
keras: 2.4.3
34+
scikit-learn: 0.22.2
35+
torch: 1.7.1+cpu
36+
torchvision: 0.8.2+cpu
37+
torchaudio: 0.7.2
38+
- name: legacy (TensorFlow 2.4.1 Keras 2.4.3 PyTorch 1.7.1 scikit-learn 0.23.2 Python 3.7)
39+
framework: legacy
40+
python: 3.7
41+
tensorflow: 2.4.1
42+
keras: 2.4.3
43+
torch: 1.7.1+cpu
44+
torchvision: 0.8.2+cpu
45+
torchaudio: 0.7.2
46+
scikit-learn: 0.23.2
47+
- name: legacy (TensorFlow 2.4.1 Keras 2.4.3 PyTorch 1.7.1 scikit-learn 0.24.1 Python 3.7)
48+
framework: legacy
49+
python: 3.7
50+
tensorflow: 2.4.1
51+
keras: 2.4.3
52+
torch: 1.7.1+cpu
53+
torchvision: 0.8.2+cpu
54+
torchaudio: 0.7.2
55+
scikit-learn: 0.24.1
56+
57+
name: Run ${{ matrix.module }} ${{ matrix.name }} Tests
58+
steps:
59+
- name: Checkout Repo
60+
uses: actions/[email protected]
61+
- name: Setup Python
62+
uses: actions/[email protected]
63+
with:
64+
python-version: ${{ matrix.python }}
65+
- name: Install Dependencies
66+
run: |
67+
sudo apt-get update
68+
sudo apt-get -y -q install ffmpeg libavcodec-extra
69+
python -m pip install --upgrade pip setuptools wheel
70+
pip install tensorflow==2.4.1
71+
pip install keras==2.4.3
72+
pip3 install -q -r requirements.txt
73+
pip list
74+
- name: Pre-install legacy
75+
if: ${{ matrix.framework == 'legacy' }}
76+
run: |
77+
pip install tensorflow==${{ matrix.tensorflow }}
78+
pip install keras==${{ matrix.keras }}
79+
pip install scikit-learn==${{ matrix.scikit-learn }}
80+
pip install torch==${{ matrix.torch }} -f https://download.pytorch.org/whl/torch_stable.html
81+
pip install torchvision==${{ matrix.torchvision }} -f https://download.pytorch.org/whl/torch_stable.html
82+
pip install torchaudio==${{ matrix.torchaudio }} -f https://download.pytorch.org/whl/torch_stable.html
83+
pip list
84+
- name: Run ${{ matrix.name }} ${{ matrix.module }} Tests
85+
run: ./run_tests.sh ${{ matrix.framework }} ${{ matrix.module }}
86+
- name: Upload coverage to Codecov
87+
uses: codecov/[email protected]

.github/workflows/ci-lingvo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ jobs:
6060
- name: Run ${{ matrix.name }} Tests
6161
run: ./run_tests.sh ${{ matrix.framework }}
6262
- name: Upload coverage to Codecov
63-
uses: codecov/[email protected].2
63+
uses: codecov/[email protected].3

0 commit comments

Comments
 (0)