Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cleverhans-lab/cleverhans into to…
Browse files Browse the repository at this point in the history
…rch/sparse_l1
  • Loading branch information
jonasguan committed Mar 17, 2021
2 parents ff955c7 + 42fc431 commit af09028
Show file tree
Hide file tree
Showing 593 changed files with 77,885 additions and 40,855 deletions.
48 changes: 48 additions & 0 deletions .github/cml_gpu_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CML Single GPU Test
on: [push]
jobs:
run:
runs-on: [self-hosted,cml,gpu]
steps:
- uses: actions/checkout@v2
- name: cml_run
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
run: |
nvidia-smi
python -m pip install --upgrade pip
pip install -e "."
pip install -r requirements/requirements.txt
pip install -r requirements/requirements-pytorch.txt
pip install -r requirements/requirements-jax.txt
pip install -r requirements/requirements-tf2.txt
pip install -r requirements/requirements-dev.txt
pip install -r requirements/requirements-gpu.txt
find tutorials/future/jax/ -name '*.py' | while read f
do
python $f
if [ $? -ne 0 ]
then
exit 1
fi
done
find tutorials/future/torch/ -name '*.py' | while read f
do
python $f
if [ $? -ne 0 ]
then
exit 1
fi
done
find tutorials/future/tf2/ -name '*.py' | while read f
do
python $f
if [ $? -ne 0 ]
then
exit 1
fi
done
47 changes: 47 additions & 0 deletions .github/workflows/style_type_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Style and type checks

on:
push:
paths:
- 'cleverhans/**/*'
- 'tutorials/**/*'

pull_request:
paths:
- 'cleverhans/**/*'
- 'tutorials/**/*'

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e "."
pip install -r requirements/requirements.txt
pip install -r requirements/requirements-pytorch.txt
pip install -r requirements/requirements-tf2.txt
pip install -r requirements/requirements-jax.txt
pip install -r requirements/requirements-dev.txt
- name: Code reformat check
run: |
black --check cleverhans/
black --check tutorials/
# - name: flake8 linting check
# run: |
# flake8 cleverhans/
# flake8 tutorials/
# - name: Type check
# run: |
# mypy cleverhans/future/
28 changes: 28 additions & 0 deletions .github/workflows/tests-pytorch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PyTorch Tests

on:
push:
paths:
- 'cleverhans/torch/**/*'

pull_request:
paths:
- 'cleverhans/torch/**/*'

jobs:
run:
runs-on: [self-hosted,cml,gpu]
steps:
- uses: actions/checkout@v2
- name: cml_run
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pip install --upgrade pip
pip install -e "."
pip install -r requirements/requirements.txt
pip install -r requirements/requirements-pytorch.txt
pip install -r requirements/requirements-dev.txt
pip install -r requirements/requirements-gpu.txt
pytest cleverhans/torch/tests
37 changes: 37 additions & 0 deletions .github/workflows/tutorials-jax.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: JAX Tutorials

on:
push:
paths:
- 'cleverhans/jax/**/*'
- 'tutorials/jax/**/*'

pull_request:
paths:
- 'cleverhans/jax/**/*'
- 'tutorials/jax/**/*'

jobs:
run:
runs-on: [self-hosted,cml,gpu]
steps:
- uses: actions/checkout@v2
- name: cml_run
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pip install --upgrade pip
pip install -e "."
pip install -r requirements/requirements.txt
pip install -r requirements/requirements-jax.txt
pip install -r requirements/requirements-dev.txt
pip install -r requirements/requirements-gpu.txt
find tutorials/jax/ -name '*.py' | while read f
do
python $f
if [ $? -ne 0 ]
then
exit 1
fi
done
37 changes: 37 additions & 0 deletions .github/workflows/tutorials-pytorch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PyTorch Tutorials

on:
push:
paths:
- 'cleverhans/torch/**/*'
- 'tutorials/torch/**/*'

pull_request:
paths:
- 'cleverhans/torch/**/*'
- 'tutorials/torch/**/*'

jobs:
run:
runs-on: [self-hosted,cml,gpu]
steps:
- uses: actions/checkout@v2
- name: cml_run
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pip install --upgrade pip
pip install -e "."
pip install -r requirements/requirements.txt
pip install -r requirements/requirements-pytorch.txt
pip install -r requirements/requirements-dev.txt
pip install -r requirements/requirements-gpu.txt
find tutorials/torch/ -name '*.py' | while read f
do
python $f
if [ $? -ne 0 ]
then
exit 1
fi
done
37 changes: 37 additions & 0 deletions .github/workflows/tutorials-tf2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: TensorFlow 2 Tutorials

on:
push:
paths:
- 'cleverhans/tf2/**/*'
- 'tutorials/tf2/**/*'

pull_request:
paths:
- 'cleverhans/tf2/**/*'
- 'tutorials/tf2/**/*'

jobs:
run:
runs-on: [self-hosted,cml,gpu]
steps:
- uses: actions/checkout@v2
- name: cml_run
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pip install --upgrade pip
pip install -e "."
pip install -r requirements/requirements.txt
pip install -r requirements/requirements-tf2.txt
pip install -r requirements/requirements-dev.txt
pip install -r requirements/requirements-gpu.txt
find tutorials/tf2/ -name '*.py' | while read f
do
python $f
if [ $? -ne 0 ]
then
exit 1
fi
done
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
86 changes: 0 additions & 86 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit af09028

Please sign in to comment.