Skip to content

Commit 002a935

Browse files
authored
Merge branch 'dev_1.6.1' into development_issue_1047
2 parents 7fc3fdb + b917a1b commit 002a935

File tree

14 files changed

+830
-22
lines changed

14 files changed

+830
-22
lines changed

.github/actions/deepspeech-v2/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: 'Test deepspeech version 2'
2-
description: 'Run tests on deepspeech version 2'
1+
name: 'Test DeepSpeech v2'
2+
description: 'Run tests for DeepSpeech v2'
33
runs:
44
using: 'composite'
55
steps:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Continuous Integration Deepspeech v2
1+
name: CI PyTorchDeepSpeech v2
22
on:
33
# Run on manual trigger
44
workflow_dispatch:
@@ -20,7 +20,7 @@ on:
2020

2121
jobs:
2222
test_deepspeech_v2:
23-
name: A job to test deepspeech version 2
23+
name: PyTorchDeepSpeech v2
2424
runs-on: ubuntu-latest
2525
container: minhitbk/art_testing_envs:deepspeech_v2
2626
steps:

.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: 1 addition & 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:
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: 3 additions & 3 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:
@@ -78,7 +78,7 @@ jobs:
7878
scikit-learn: 0.24.1
7979
python: 3.8
8080

81-
name: Run ${{ matrix.name }} Tests
81+
name: ${{ matrix.name }}
8282
steps:
8383
- name: Checkout Repo
8484
uses: actions/checkout@v2
@@ -130,7 +130,7 @@ jobs:
130130
pip install tensorflow-addons==0.9.1
131131
pip install model-pruning-google-research==0.0.3
132132
pip list
133-
- name: Run ${{ matrix.name }} Tests
133+
- name: Run Tests
134134
run: ./run_tests.sh ${{ matrix.framework }}
135135
- name: Upload coverage to Codecov
136136
uses: codecov/codecov-action@v1

art/attacks/poisoning/bullseye_polytope_attack.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,10 @@ def loss_from_center(
337337
)
338338
elif net_repeat == 1:
339339
if isinstance(feature_layer, list):
340-
poisons_feats = torch.cat(
341-
[
342-
torch.flatten(net.get_activations(poison_batch(), layer=layer, framework=True), 0)
343-
for layer in feature_layer
344-
],
345-
0,
346-
)
340+
poisons_feats = [
341+
torch.flatten(net.get_activations(poison_batch(), layer=layer, framework=True), 0)
342+
for layer in feature_layer
343+
]
347344
else:
348345
poisons_feats = net.get_activations(poison_batch(), layer=feature_layer, framework=True)
349346
else:

art/estimators/classification/xgboost.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def _get_nb_classes(self, nb_classes: Optional[int]) -> int:
160160

161161
if isinstance(self._model, Booster):
162162
try:
163-
return int(len(self._model.get_dump(dump_format="json")) / self._model.n_estimators)
163+
return int(len(self._model.get_dump(dump_format="json")) / self._model.n_estimators) # type: ignore
164164
except AttributeError:
165165
if nb_classes is not None:
166166
return nb_classes

notebooks/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Adversarial Robustness Toolbox notebooks
22

3+
## Expectation over Transformation (EoT)
4+
5+
[expectation_over_transformation_classification_rotation.ipynb](expectation_over_transformation_classification_rotation.ipynb) [[on nbviewer](https://nbviewer.jupyter.org/github/Trusted-AI/adversarial-robustness-toolbox/blob/main/notebooks/expectation_over_transformation_classification_rotation.ipynb)]
6+
show how to use Expectation over Transformation (EoT) sampling to make adversarial examples robust against rotation for image classification.
7+
8+
39
## Video Action Recognition
410

511
[adversarial_action_recognition.ipynb](adversarial_action_recognition.ipynb) [[on nbviewer](https://nbviewer.jupyter.org/github/Trusted-AI/adversarial-robustness-toolbox/blob/main/notebooks/adversarial_action_recognition.ipynb)]

0 commit comments

Comments
 (0)