Skip to content

Commit

Permalink
Adding pre-commit Github action.
Browse files Browse the repository at this point in the history
  • Loading branch information
balancap committed Nov 7, 2023
1 parent 926218a commit 22083c6
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: tests

env:
GIT_MAIN_BRANCH: "main"

# Controls when the workflow will run.
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:

jobs:
lint_and_typecheck:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
if: ${{github.ref != 'refs/head/main'}}
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- uses: pre-commit/action@v3.0.0
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,18 @@ JAX Scaled Arithmetics is a thin library implementing numerically stable scaled
deep neural networks in low precision (BF16, FP16, FP8).

* [Draft JSA design document](docs/design.md);

## Installation

Local git repository install:
```bash
git clone git@github.com:graphcore-research/jax-scaled-arithmetics.git
pip install -e ./
```

Running `pre-commit` and `pytest`:
```bash
pip install pre-commit
pre-commit run --all-files
pytest -v ./tests
```

0 comments on commit 22083c6

Please sign in to comment.