-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1291 from Trusted-AI/dev_1.7.2
Update to ART 1.7.2
- Loading branch information
Showing
106 changed files
with
3,463 additions
and
988 deletions.
There are no files selected for viewing
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
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,47 @@ | ||
# Get base from a tensorflow image | ||
FROM tensorflow/tensorflow:1.15.5-py3 | ||
|
||
# Set to install things in non-interactive mode | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Install system wide softwares | ||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
libgl1-mesa-glx \ | ||
libx11-xcb1 \ | ||
git \ | ||
gcc \ | ||
mono-mcs \ | ||
libavcodec-extra \ | ||
ffmpeg \ | ||
curl \ | ||
libsndfile-dev \ | ||
libsndfile1 \ | ||
wget \ | ||
unzip \ | ||
&& apt-get clean all \ | ||
&& rm -r /var/lib/apt/lists/* | ||
|
||
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | ||
RUN bash Miniconda3-latest-Linux-x86_64.sh -b -p /miniconda | ||
RUN /miniconda/bin/conda install --yes \ | ||
astropy \ | ||
matplotlib \ | ||
pandas \ | ||
scikit-learn \ | ||
scikit-image | ||
|
||
# Install necessary libraries for tensorflow faster rcnn | ||
RUN mkdir TensorFlow | ||
RUN cd TensorFlow && git clone https://github.com/tensorflow/models | ||
RUN cd TensorFlow && wget https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protoc-3.17.3-linux-x86_64.zip | ||
RUN cd TensorFlow && unzip protoc-3.17.3-linux-x86_64.zip -d protobuf | ||
RUN cd TensorFlow/models/research && /TensorFlow/protobuf/bin/protoc object_detection/protos/*.proto --python_out=. | ||
RUN cd TensorFlow/models/research && cp object_detection/packages/tf1/setup.py . | ||
RUN cd TensorFlow/models/research && python -m pip install --use-feature=2020-resolver . | ||
|
||
RUN pip install tqdm | ||
RUN pip install requests | ||
RUN pip install sklearn | ||
RUN pip install numba==0.50.0 | ||
RUN pip install pytest-cov |
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,7 @@ | ||
name: 'Test TensorFlowFasterRCNN' | ||
description: 'Run tests for TensorFlowFasterRCNN' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- run: $GITHUB_ACTION_PATH/run.sh | ||
shell: bash |
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,11 @@ | ||
#!/bin/bash | ||
|
||
exit_code=0 | ||
|
||
pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/object_detection/test_tensorflow_faster_rcnn.py --framework=tensorflow --durations=0 | ||
if [[ $? -ne 0 ]]; then exit_code=1; echo "Failed estimators/object_detection/test_tensorflow_faster_rcnn.py tests"; fi | ||
|
||
pytest --cov-report=xml --cov=art --cov-append -q -vv tests/attacks/test_shapeshifter.py --framework=tensorflow --durations=0 | ||
if [[ $? -ne 0 ]]; then exit_code=1; echo "Failed attacks/test_shapeshifter.py tests"; fi | ||
|
||
exit ${exit_code} |
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,87 @@ | ||
name: CI Legacy | ||
on: | ||
# Run on manual trigger | ||
workflow_dispatch: | ||
|
||
# Run on pull requests | ||
pull_request: | ||
paths-ignore: | ||
- '*.md' | ||
|
||
# Run when pushing to main or dev branches | ||
push: | ||
branches: | ||
- main | ||
- dev* | ||
|
||
# Run scheduled CI flow daily | ||
schedule: | ||
- cron: '0 8 * * 0' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-16.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
module: [attacks, classifiers, speech_recognizers, defences, metrics, wrappers, art] | ||
include: | ||
- name: legacy (TensorFlow 2.3.2 Keras 2.4.3 PyTorch 1.7.1 scikit-learn 0.22.2 Python 3.7) | ||
framework: legacy | ||
python: 3.7 | ||
tensorflow: 2.3.2 | ||
keras: 2.4.3 | ||
scikit-learn: 0.22.2 | ||
torch: 1.7.1+cpu | ||
torchvision: 0.8.2+cpu | ||
torchaudio: 0.7.2 | ||
- name: legacy (TensorFlow 2.4.1 Keras 2.4.3 PyTorch 1.7.1 scikit-learn 0.23.2 Python 3.7) | ||
framework: legacy | ||
python: 3.7 | ||
tensorflow: 2.4.1 | ||
keras: 2.4.3 | ||
torch: 1.7.1+cpu | ||
torchvision: 0.8.2+cpu | ||
torchaudio: 0.7.2 | ||
scikit-learn: 0.23.2 | ||
- name: legacy (TensorFlow 2.4.1 Keras 2.4.3 PyTorch 1.7.1 scikit-learn 0.24.1 Python 3.7) | ||
framework: legacy | ||
python: 3.7 | ||
tensorflow: 2.4.1 | ||
keras: 2.4.3 | ||
torch: 1.7.1+cpu | ||
torchvision: 0.8.2+cpu | ||
torchaudio: 0.7.2 | ||
scikit-learn: 0.24.1 | ||
|
||
name: Run ${{ matrix.module }} ${{ matrix.name }} Tests | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/[email protected] | ||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y -q install ffmpeg libavcodec-extra | ||
python -m pip install --upgrade pip setuptools wheel | ||
pip install tensorflow==2.4.1 | ||
pip install keras==2.4.3 | ||
pip3 install -q -r requirements.txt | ||
pip list | ||
- name: Pre-install legacy | ||
if: ${{ matrix.framework == 'legacy' }} | ||
run: | | ||
pip install tensorflow==${{ matrix.tensorflow }} | ||
pip install keras==${{ matrix.keras }} | ||
pip install scikit-learn==${{ matrix.scikit-learn }} | ||
pip install torch==${{ matrix.torch }} -f https://download.pytorch.org/whl/torch_stable.html | ||
pip install torchvision==${{ matrix.torchvision }} -f https://download.pytorch.org/whl/torch_stable.html | ||
pip install torchaudio==${{ matrix.torchaudio }} -f https://download.pytorch.org/whl/torch_stable.html | ||
pip list | ||
- name: Run ${{ matrix.name }} ${{ matrix.module }} Tests | ||
run: ./run_tests.sh ${{ matrix.framework }} ${{ matrix.module }} | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: CI MXNet + Legacy | ||
name: CI MXNet | ||
on: | ||
# Run on manual trigger | ||
workflow_dispatch: | ||
|
@@ -28,33 +28,6 @@ jobs: | |
- name: mxnet (Python 3.7) | ||
framework: mxnet | ||
python: 3.7 | ||
- name: legacy (TensorFlow 2.3.2 Keras 2.4.3 PyTorch 1.7.1 scikit-learn 0.22.2 Python 3.7) | ||
framework: legacy | ||
python: 3.7 | ||
tensorflow: 2.3.2 | ||
keras: 2.4.3 | ||
scikit-learn: 0.22.2 | ||
torch: 1.7.1+cpu | ||
torchvision: 0.8.2+cpu | ||
torchaudio: 0.7.2 | ||
- name: legacy (TensorFlow 2.4.1 Keras 2.4.3 PyTorch 1.7.1 scikit-learn 0.23.2 Python 3.7) | ||
framework: legacy | ||
python: 3.7 | ||
tensorflow: 2.4.1 | ||
keras: 2.4.3 | ||
torch: 1.7.1+cpu | ||
torchvision: 0.8.2+cpu | ||
torchaudio: 0.7.2 | ||
scikit-learn: 0.23.2 | ||
- name: legacy (TensorFlow 2.4.1 Keras 2.4.3 PyTorch 1.7.1 scikit-learn 0.24.1 Python 3.7) | ||
framework: legacy | ||
python: 3.7 | ||
tensorflow: 2.4.1 | ||
keras: 2.4.3 | ||
torch: 1.7.1+cpu | ||
torchvision: 0.8.2+cpu | ||
torchaudio: 0.7.2 | ||
scikit-learn: 0.24.1 | ||
|
||
name: Run ${{ matrix.name }} Tests | ||
steps: | ||
|
@@ -73,17 +46,7 @@ jobs: | |
pip install keras==2.4.3 | ||
pip3 install -q -r requirements.txt | ||
pip list | ||
- name: Pre-install legacy | ||
if: ${{ matrix.framework == 'legacy' }} | ||
run: | | ||
pip install tensorflow==${{ matrix.tensorflow }} | ||
pip install keras==${{ matrix.keras }} | ||
pip install scikit-learn==${{ matrix.scikit-learn }} | ||
pip install torch==${{ matrix.torch }} -f https://download.pytorch.org/whl/torch_stable.html | ||
pip install torchvision==${{ matrix.torchvision }} -f https://download.pytorch.org/whl/torch_stable.html | ||
pip install torchaudio==${{ matrix.torchaudio }} -f https://download.pytorch.org/whl/torch_stable.html | ||
pip list | ||
- name: Run ${{ matrix.name }} Tests | ||
run: ./run_tests.sh ${{ matrix.framework }} | ||
- name: Run ${{ matrix.name }} ${{ matrix.module }} Tests | ||
run: ./run_tests.sh ${{ matrix.framework }} ${{ matrix.module }} | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] |
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 |
---|---|---|
|
@@ -44,6 +44,6 @@ jobs: | |
pip install torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html | ||
pip install torchaudio==0.6.0 -f https://download.pytorch.org/whl/torch_stable.html | ||
- name: Run Test Action | ||
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 | ||
run: pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/object_detection/test_pytorch_faster_rcnn.py --framework=pytorch --durations=0 | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] |
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,32 @@ | ||
name: CI TensorFlowFasterRCNN | ||
on: | ||
# Run on manual trigger | ||
workflow_dispatch: | ||
|
||
# Run on pull requests | ||
pull_request: | ||
paths-ignore: | ||
- '*.md' | ||
|
||
# Run when pushing to main or dev branches | ||
push: | ||
branches: | ||
- main | ||
- dev* | ||
|
||
# Run scheduled CI flow daily | ||
schedule: | ||
- cron: '0 8 * * 0' | ||
|
||
jobs: | ||
test_tf_faster_rcnn: | ||
name: TensorFlowFasterRCNN | ||
runs-on: ubuntu-latest | ||
container: minhitbk/art_testing_envs:tf_fasterrcnn | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/[email protected] | ||
- name: Run Test Action | ||
uses: ./.github/actions/tf-faster-rcnn | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] |
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
Oops, something went wrong.