Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI for public repo #2

Merged
merged 3 commits into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ concurrency:

jobs:
ci:
runs-on: [self-hosted, Linux, X64, 20.04, Ubuntu]
runs-on: ubuntu-latest
container: graphcore/pytorch:3.2.0-ubuntu-20.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Update package info
run: apt-get update
- name: Install git
run: apt-get -y install git
- name: Install dependencies
run: pip install -r requirements.txt
run: |
apt-get update
apt-get install -y clang-format
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps can prune clang-format, unless I'm missing where it's used?

apt-get install -y git
pip install -r requirements-dev.txt
- name: Run CI
run: ./dev ci
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ source .venv/bin/activate

# pip install wheel # (If running on IPU)
# pip install $POPLAR_SDK_ENABLED/../poptorch-*.whl # (If running on IPU)
pip install -r requirements.txt
pip install -r requirements-dev.txt
```

**Run pre-flight checks** (or run `./dev --help` to see supported commands):
Expand All @@ -24,8 +24,26 @@ pip install -r requirements.txt
./dev
```

IDE recommendations:
**IDE recommendations**:

- Python intepreter is set to `.venv/bin/python`
- Format-on-save enabled
- Consider a `.env` file for setting PYTHONPATH, e.g. `echo "PYTHONPATH=$(pwd)" > .env`
(note that this will be a different path if using devcontainers)


## License

Copyright (c) 2023 Graphcore Ltd. Licensed under the MIT License.

The included code is released under an MIT license, (see [LICENSE](LICENSE)).

Our dependencies are (see [requirements.txt](requirements.txt)):

| Component | About | License |
| --- | --- | --- |
| numpy | Array processing library | BSD 3-Clause |
| poptorch-experimental-addons | A collection of addons to [PopTorch](https://github.com/graphcore/poptorch), with general utility. | MIT |
| scipy | An open-source software for mathematics, science, and engineering | BSD 3-Clause |

We also use additional Python dependencies for development/testing (see [requirements-dev.txt](requirements-dev.txt)).
7 changes: 7 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-r requirements.txt
black==23.1.0
flake8==6.0.0
isort==5.12.0
mypy==1.0.1
pytest==7.2.1
pytest-cov==4.0.0
9 changes: 1 addition & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
black==23.1.0
docstring-parser==0.15
flake8==6.0.0
isort==5.12.0
mypy==1.0.1
numpy==1.24.2
pytest==7.2.1
pytest-cov==4.0.0
scipy==1.10.1
wandb==0.13.10
git+https://github.com/graphcore-research/poptorch-experimental-addons@14886d2285c3e45b0eadf4d719dae87d5f28b109
scipy==1.10.1
14 changes: 14 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) 2023 Graphcore Ltd. All rights reserved.

from pathlib import Path

import setuptools
import setuptools.command.build_ext

setuptools.setup(
name="unit-scaling",
description="A library for unit scaling in PyTorch.",
version="0.1",
packages=["unit-scaling"],
install_requires=Path("requirements.txt").read_text().rstrip("\n").split("\n"),
)