Skip to content

Commit dcbcb41

Browse files
authored
Merge branch 'main' into dependabot/pip/scipy-1.7.2
2 parents 854cfda + 1da3cd9 commit dcbcb41

File tree

7 files changed

+27
-20
lines changed

7 files changed

+27
-20
lines changed

.github/workflows/ci-legacy.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ jobs:
2626
matrix:
2727
module: [attacks_1, attacks_2, estimators, defences, metrics, art]
2828
include:
29-
- name: legacy (TensorFlow 2.6.0 Keras 2.6.0 PyTorch 1.9.1 scikit-learn 0.24.2 Python 3.8)
29+
- name: legacy (TensorFlow 2.6.0 Keras 2.6.0 PyTorch 1.10.0 scikit-learn 0.24.2 Python 3.8)
3030
framework: legacy
3131
python: 3.8
3232
tensorflow: 2.6.0
3333
keras: 2.6.0
34-
torch: 1.9.1+cpu
35-
torchvision: 0.10.1+cpu
36-
torchaudio: 0.9.1
34+
torch: 1.10.0+cpu
35+
torchvision: 0.11.1+cpu
36+
torchaudio: 0.10.0
3737
scikit-learn: 0.24.2
3838

3939
name: Run ${{ matrix.module }} ${{ matrix.name }} Tests
@@ -53,9 +53,9 @@ jobs:
5353
pip install tensorflow==${{ matrix.tensorflow }}
5454
pip install keras==${{ matrix.keras }}
5555
pip install scikit-learn==${{ matrix.scikit-learn }}
56-
pip install torch==${{ matrix.torch }} -f https://download.pytorch.org/whl/torch_stable.html
57-
pip install torchvision==${{ matrix.torchvision }} -f https://download.pytorch.org/whl/torch_stable.html
58-
pip install torchaudio==${{ matrix.torchaudio }} -f https://download.pytorch.org/whl/torch_stable.html
56+
pip install torch==${{ matrix.torch }} -f https://download.pytorch.org/whl/cpu/torch_stable.html
57+
pip install torchvision==${{ matrix.torchvision }} -f https://download.pytorch.org/whl/cpu/torch_stable.html
58+
pip install torchaudio==${{ matrix.torchaudio }} -f https://download.pytorch.org/whl/cpu/torch_stable.html
5959
pip list
6060
- name: Run ${{ matrix.name }} ${{ matrix.module }} Tests
6161
run: ./run_tests.sh ${{ matrix.framework }} ${{ matrix.module }}

.github/workflows/ci-pytorch-object-detectors.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ jobs:
4040
pip list
4141
- name: Pre-install torch
4242
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
43+
pip install torch==1.10.0+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
44+
pip install torchvision==0.11.1+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
45+
pip install torchaudio==0.10.0+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
4646
- name: Run Test Action - test_pytorch_object_detector
4747
run: pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/object_detection/test_pytorch_object_detector.py --framework=pytorch --durations=0
4848
- name: Run Test Action - test_pytorch_faster_rcnn

.github/workflows/ci-pytorch.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ jobs:
3737
torch: 1.9.1+cpu
3838
torchvision: 0.10.1+cpu
3939
torchaudio: 0.9.1
40+
- name: PyTorch 1.10.0 (Python 3.7)
41+
framework: pytorch
42+
python: 3.7
43+
torch: 1.10.0+cpu
44+
torchvision: 0.11.1+cpu
45+
torchaudio: 0.10.0
4046

4147
name: ${{ matrix.name }}
4248
steps:
@@ -54,9 +60,9 @@ jobs:
5460
pip3 install -r requirements.txt
5561
pip install tensorflow==2.4.3
5662
pip install keras==2.4.3
57-
pip install torch==${{ matrix.torch }} -f https://download.pytorch.org/whl/torch_stable.html
58-
pip install torchvision==${{ matrix.torchvision }} -f https://download.pytorch.org/whl/torch_stable.html
59-
pip install torchaudio==${{ matrix.torchaudio }} -f https://download.pytorch.org/whl/torch_stable.html
63+
pip install torch==${{ matrix.torch }} -f https://download.pytorch.org/whl/cpu/torch_stable.html
64+
pip install torchvision==${{ matrix.torchvision }} -f https://download.pytorch.org/whl/cpu/torch_stable.html
65+
pip install torchaudio==${{ matrix.torchaudio }} -f https://download.pytorch.org/whl/cpu/torch_stable.html
6066
pip list
6167
- name: Run Tests
6268
run: ./run_tests.sh ${{ matrix.framework }}

art/defences/preprocessor/mp3_compression_pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def __init__(
8888
verbose=verbose,
8989
)
9090

91-
class CompressionPyTorchNumpy(Function):
91+
class CompressionPyTorchNumpy(Function): # pylint: disable=W0223
9292
"""
9393
Function running Preprocessor.
9494
"""

art/defences/preprocessor/video_compression_pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def __init__(
9696
verbose=verbose,
9797
)
9898

99-
class CompressionPyTorchNumpy(Function):
99+
class CompressionPyTorchNumpy(Function): # pylint: disable=W0223
100100
"""
101101
Function running Preprocessor.
102102
"""

requirements.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ keras>=2.2.5
2525
tensorflow-addons>=0.13.0
2626
# using mxnet-native for reproducible test results on CI machines without Intel Architecture Processors, but mxnet is fully supported by ART
2727
mxnet-native==1.8.0.post0
28-
--find-links https://download.pytorch.org/whl/torch_stable.html
29-
torch==1.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
30-
torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
31-
torchvision==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
28+
--find-links https://download.pytorch.org/whl/cpu/torch_stable.html
29+
30+
torch==1.10.0+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
31+
torchaudio==0.10.0+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
32+
torchvision==0.11.1+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
3233
catboost==1.0.0
3334
GPy==1.10.0
3435
lightgbm==3.3.0

tests/estimators/object_detection/test_pytorch_object_detector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def test_predict_2(self):
111111

112112
self.assertTrue(result[0]["scores"].shape == (4,))
113113
expected_detection_scores = np.asarray([0.45197296, 0.12707493, 0.082677, 0.05386855])
114-
np.testing.assert_array_almost_equal(result[0]["scores"][:10], expected_detection_scores, decimal=6)
114+
np.testing.assert_array_almost_equal(result[0]["scores"][:10], expected_detection_scores, decimal=4)
115115

116116
self.assertTrue(result[0]["labels"].shape == (4,))
117117
expected_detection_classes = np.asarray([72, 72, 1, 1])

0 commit comments

Comments
 (0)