Skip to content

add mypy + pre commit hooks #25

add mypy + pre commit hooks

add mypy + pre commit hooks #25

Workflow file for this run

name: Unit Tests
on:
push:
pull_request:
workflow_dispatch:
jobs:
testmnist:
name: Train mnist
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Dependencies
run: pip install numpy tqdm
- name: Get code size
- name: Train MNIST
run: PYTHONPATH="." python mnist.py
- name: Install mypy + torch for testing
run: pip install mypy torch --extra-index-url https://download.pytorch.org/whl/cpu
- name: Test ops / dtype / optim
run: |
PYTHONPATH="." python test/test_ops.py
PYTHONPATH="." python test/test_dtype.py
PYTHONPATH="." python test/test_optim.py
- name: Check types with mypy
run: mypy