add adversarial training #126
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: run test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: 'requirements/dev.txt' | |
- name: Install dependencies | |
run: | | |
pip install -e . | |
pip install -r requirements/dev.txt | |
- name: Lint with flake8 | |
run: | | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Test with black | |
run: black --check -v . | |
- name: Test with pytest | |
run: pytest --cov-report xml --cov=pytorch_tao | |
- name: Run mnist example | |
run: | | |
cd examples/mnist && tao init && tao run main.py --max_epochs 2 | |
- name: Report coverage | |
uses: codecov/[email protected] | |
with: | |
files: coverage.xml |