Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev_1.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
beat-buesser committed Nov 18, 2024
2 parents 35781a5 + 970c74a commit 6c57e03
Show file tree
Hide file tree
Showing 23 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-deepspeech-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Run Test Action
uses: ./.github/actions/deepspeech-v3
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-espresso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Run Test Action
uses: ./.github/actions/espresso
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-goturn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Run Test Action
uses: ./.github/actions/goturn
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-huggingface.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Run Tests
run: ./run_tests.sh ${{ matrix.framework }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-keras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Run Tests
run: ./run_tests.sh ${{ matrix.framework }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Run ${{ matrix.name }} ${{ matrix.module }} Tests
run: ./run_tests.sh ${{ matrix.framework }} ${{ matrix.module }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-lingvo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Run ${{ matrix.name }} Tests
run: pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/speech_recognition/test_tensorflow_lingvo.py --framework=${{ matrix.framework }} --durations=0
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-mxnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Run ${{ matrix.name }} ${{ matrix.module }} Tests
run: ./run_tests.sh ${{ matrix.framework }} ${{ matrix.module }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-pytorch-object-detectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Run Test Action - test_pytorch_object_seeker_faster_rcnn
run: pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/object_detection/test_object_seeker_faster_rcnn.py --framework=pytorch --durations=0
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-pytorch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Run Tests
run: ./run_tests.sh ${{ matrix.framework }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-scikit-learn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Run Tests
run: ./run_tests.sh ${{ matrix.framework }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
5 changes: 3 additions & 2 deletions .github/workflows/ci-tensorflow-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
sudo apt-get update
sudo apt-get -y -q install ffmpeg libavcodec-extra
python -m pip install --upgrade pip setuptools wheel
pip install -q -r <(sed '/^pandas/d;/^scipy/d;/^matplotlib/d;/^xgboost/d;/^tensorflow/d;/^keras/d;/^jax/d;/^torch/d;/^Pillow/d;/^h5py/d;/^kornia/d;/^scikit-learn/d;/^pytest-mock/d;/^GPy/d;/^lief/d;/^statsmodels/d;/^ultralytics/d;/^ipython/d;/^numba/d;/^pytest/d;/^pylint/d;/^mypy/d;/^pycodestyle/d;/^black/d;/^types-PyYAML/d;/^types-setuptools/d' requirements_test.txt)
pip install -q -r <(sed '/^pandas/d;/^scipy/d;/^matplotlib/d;/^xgboost/d;/^tensorflow/d;/^keras/d;/^jax/d;/^torch/d;/^Pillow/d;/^h5py/d;/^kornia/d;/^scikit-learn/d;/^pytest-mock/d;/^GPy/d;/^lief/d;/^statsmodels/d;/^ultralytics/d;/^ipython/d;/^numba/d;/^pytest/d;/^pylint/d;/^mypy/d;/^pycodestyle/d;/^black/d;/^types-PyYAML/d;/^types-setuptools/d;/^requests/d' requirements_test.txt)
pip install pandas==1.3.5
pip install scipy==1.7.2
pip install matplotlib==3.5.3
Expand All @@ -71,11 +71,12 @@ jobs:
pip install numba==0.56.4
pip install pytest==7.4.4
pip install pytest-cov
pip install requests==2.31.0
pip list
- name: Run Tests
run: ./run_tests.sh ${{ matrix.framework }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-tensorflow-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Run Tests
run: ./run_tests.sh ${{ matrix.framework }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-tf-faster-rcnn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Run Test Action
uses: ./.github/actions/tf-faster-rcnn
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-tfv2-faster-rcnn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Run Test Action
uses: ./.github/actions/tfv2-faster-rcnn
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/ci-yolo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Run Test Action
uses: ./.github/actions/yolo
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
4 changes: 2 additions & 2 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ jobs:
with:
images: adversarialrobustnesstoolbox/releases
tags: |
type=raw,value={{branch}}-1.18.1-{{sha}}
type=raw,value={{branch}}-1.18.2-{{sha}}
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
with:
context: .
push: true
Expand Down
2 changes: 1 addition & 1 deletion art/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from art import preprocessing

# Semantic Version
__version__ = "1.18.1"
__version__ = "1.18.2"

LOGGING = {
"version": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import logging
import math
from packaging.version import parse
from typing import Any, TYPE_CHECKING

import numpy as np
Expand Down Expand Up @@ -121,8 +122,8 @@ def __init__(
import torch
import torchvision

torch_version = list(map(int, torch.__version__.lower().split("+", maxsplit=1)[0].split(".")))
torchvision_version = list(map(int, torchvision.__version__.lower().split("+", maxsplit=1)[0].split(".")))
torch_version = list(parse(torch.__version__.lower()).release)
torchvision_version = list(parse(torchvision.__version__.lower()).release)
assert (
torch_version[0] >= 1 and torch_version[1] >= 7 or (torch_version[0] >= 2)
), "AdversarialPatchPyTorch requires torch>=1.7.0"
Expand Down
3 changes: 2 additions & 1 deletion art/attacks/evasion/pixel_threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import logging
from itertools import product
from packaging.version import parse
from typing import TYPE_CHECKING

import numpy as np
Expand All @@ -42,7 +43,7 @@
import scipy
from scipy._lib._util import check_random_state

scipy_version = list(map(int, scipy.__version__.lower().split(".")))
scipy_version = list(parse(scipy.__version__.lower()).release)
if scipy_version[1] >= 8:
from scipy.optimize._optimize import _status_message
else:
Expand Down
9 changes: 3 additions & 6 deletions art/estimators/object_detection/pytorch_object_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from __future__ import annotations

import logging
from packaging.version import parse
from typing import Any, TYPE_CHECKING

import numpy as np
Expand Down Expand Up @@ -95,15 +96,11 @@ def __init__(
if available otherwise run on CPU.
:param is_yolov8: The flag to be used for marking the YOLOv8 model.
"""
import re
import torch
import torchvision

reg_pattern = r"(\d+).(\d+).(\d+)(\w*)(\+{0,1})(\w*)"
version_match = re.match(reg_pattern, torch.__version__)
torch_version = [version_match[1], version_match[2], version_match[3]] # type: ignore[index]
version_match = re.match(reg_pattern, torchvision.__version__)
torchvision_version = [version_match[1], version_match[2], version_match[3]] # type: ignore[index]
torch_version = list(parse(torch.__version__.lower()).release)
torchvision_version = list(parse(torchvision.__version__.lower()).release)
assert not (torch_version[0] == 1 and (torch_version[1] == 8 or torch_version[1] == 9)), (
"PyTorchObjectDetector does not support torch==1.8 and torch==1.9 because of "
"https://github.com/pytorch/vision/issues/4153. Support will return for torch==1.10."
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# The short X.Y version
version = "1.18"
# The full version, including alpha/beta/rc tags
release = "1.18.1"
release = "1.18.2"


# -- General configuration ---------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ pycodestyle==2.12.1
black==24.8.0
ruff==0.5.5
types-six==1.16.21.9
types-PyYAML==6.0.12.20240724
types-PyYAML==6.0.12.20240917
types-setuptools==71.1.0.20240726

# other
requests~=2.31.0
requests~=2.32.3
ultralytics==8.0.217
ipython==8.25.0

Expand Down

0 comments on commit 6c57e03

Please sign in to comment.