Skip to content

Commit

Permalink
Update GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerwooo committed Aug 20, 2024
1 parent 143bcd3 commit b03c16c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,36 @@ on:
workflow_dispatch:

jobs:
pre-commit:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
# - uses: psf/black@stable
python-version: "3.12"

- name: Ruff format
uses: chartboost/ruff-action@v1
with:
args: format --check

- name: Ruff lint
uses: chartboost/ruff-action@v1

- name: Install uv
run: |
python -m pip install -U pip
python -m pip install uv
- name: Allow uv to use the system Python by default
run: echo "UV_SYSTEM_PYTHON=1" >> $GITHUB_ENV

- name: Install dependencies
run: |
uv pip install -r requirements.txt
uv pip install -e '.[dev]'
- name: Mypy
run: |
python -m pip install -e '.[dev]'
mypy src/
2 changes: 1 addition & 1 deletion src/torchattack/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def run_attack(
transform=transform,
max_samples=max_samples,
)
dataloader = track(dataloader, description='Attacking')
dataloader = track(dataloader, description='Attacking') # type: ignore

# Set up attack and trackers
frm = FoolingRateMetric()
Expand Down

0 comments on commit b03c16c

Please sign in to comment.