-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from f-dangel/release
Release BackPACK1.1.0
- Loading branch information
Showing
178 changed files
with
4,098 additions
and
2,736 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: backpack | ||
channels: | ||
- pytorch | ||
- defaults | ||
dependencies: | ||
- cudatoolkit=9.2=0 | ||
- pip=19.3.1 | ||
- python=3.7.6 | ||
- pytorch=1.3.1=py3.7_cuda9.2.148_cudnn7.6.3_0 | ||
- torchvision=0.4.2=py37_cu92 | ||
- pip: | ||
- -r requirements.txt | ||
- -r requirements-dev.txt | ||
- -e . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[flake8] | ||
select = B,C,E,F,P,W,B9 | ||
max-line-length = 80 | ||
max-complexity = 10 | ||
ignore = | ||
# replaced by B950 (max-line-length + 10%) | ||
E501, # max-line-length | ||
# ignored because pytorch uses dict | ||
C408, # use {} instead of dict() | ||
# Not Black-compatible | ||
E203, # whitespace before : | ||
E231, # missing whitespace after ',' | ||
W291, # trailing whitespace | ||
W503, # line break before binary operator | ||
W504, # line break after binary operator | ||
exclude = docs, docs_src, build, .git | ||
|
||
|
||
# Differences with pytorch | ||
# | ||
# Smaller max-line-length | ||
# Enabled max-complexity | ||
# No flake8-mypy (T4 range) | ||
# | ||
# Set of rules ignore by pytorch, probably to get around the C | ||
# | ||
# F401 (import unused in __init__.py) not ignored | ||
# F403 'from module import *' used; unable to detect undefined names | ||
# F405 Name may be undefined, or defined from star imports: module | ||
# F821 Undefined name name | ||
# F841 Local variable name is assigned to but never used | ||
# | ||
# Pytorch ignored rules that I don't see a reason to ignore (yet?): | ||
# | ||
# E305 Expected 2 blank lines after end of function or class | ||
# E402 Module level import not at top of file | ||
# E721 Do not compare types, use 'isinstance()' | ||
# E741 Do not use variables named 'l', 'o', or 'i' | ||
# E302 Expected 2 blank lines, found 0 | ||
# E303 Too many blank lines (3) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- pep8-style | ||
|
||
jobs: | ||
flake8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
make install-lint | ||
- name: Run flake8 | ||
run: | | ||
make flake8 | ||
black: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
make install-lint | ||
- name: Run black | ||
run: | | ||
make black-check |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
__pycache__/ | ||
.mypy_cache | ||
*.egg-info/ | ||
**/*.pyc | ||
.cache | ||
examples/data | ||
.idea | ||
.coverage | ||
dist/* | ||
build/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[settings] | ||
multi_line_output=3 | ||
include_trailing_comma=True | ||
force_grid_wrap=0 | ||
use_parentheses=True | ||
line_length=88 | ||
skip_glob=docs/*,docs_src/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: stable | ||
hooks: | ||
- id: black | ||
args: [--config=black.toml] | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: '3.7.9' | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [ | ||
mccabe, | ||
pycodestyle, | ||
pyflakes, | ||
pep8-naming, | ||
flake8-bugbear, | ||
flake8-comprehensions, | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
language: python | ||
python: | ||
- '3.5' | ||
- '3.6' | ||
- '3.7' | ||
install: | ||
- pip install -r requirements.txt | ||
- pip install -r requirements/test.txt | ||
- pip install . | ||
- pip install pillow==6.1.0 | ||
cache: | ||
- pip | ||
script: | ||
- pytest -vx --cov=backpack/ . | ||
- python examples/run_examples.py | ||
after_success: | ||
- coveralls | ||
notifications: | ||
email: false | ||
slack: | ||
secure: qAK64wEVkRC57IrNMqXetPoqWLGkHId5ayhzoRYzFfuiMuTKlG+Dwaif/TixjjKwu9vdLyuX4+0gi6IVFB9UZ0+bgMBkbh4rugPiINliiqFi91Z8Kl9ns/qmhbfKnCKwYkU+vkjuUsuHhe/3dV3XUs3RgQaJBIP4iTu1ayTbIB1QIyQJDBnlC+65mKA0qxMEIuvOYZDemDsr747583UFCcx2EC4daZuANeQTwFDnDx9TVnNJheblZ8AqH0JnoOQRJo3iPLBtxo9jDpbPupew9oY3dDS5J/+FgjYw5oGDroyM7TcP8q+HkCkmUtX9DU/DgpZgqd6Ysk9jgPK3k1uqq5oOKZ1jCs64c9K+ayekaM6wJPdJXcZSH3JCUhQc9q+xkdq3hEp27dNQcZbK7YT1nkF9MzR+StaMZsMIx5nvO6n1onBU+oTZYPURfizCnB9a/jDmMNKNkhmgit/1MWbRVMnc+YgH3R5SBhu4W2HBlw3hYQ2vgpok0lZ6mzHXnw67q91yncDXqAOx/7rPzXGm0E8iH1sfhWs26IFXOgUMPBRN/lUUznWNrdG5Ht6dTF2cRVjB8cUlJPyy5Uhv1YFnePXgSMBg7fZMEG3qMJn0V3raJT842LKdZhJRXyCX9fPacpbvKQ97mrw62KfzJ4HGpsilqOBNd2kwyvXqatBQaGU= | ||
on_success: never |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Basics about the development setup | ||
|
||
|-|-| | ||
|-|-| | ||
| Python version | The subset of Python 3 and Pytorch (`3.5, 3.6, 3.7`) and use `3.7` for development | | ||
| Tooling management | [`make`](https://www.gnu.org/software/make/) as an interface to the dev tools ([makefile](makefile)) | | ||
| Testing | [`pytest`](https://docs.pytest.org) ([testing readme](test/readme.md)) | ||
| Style | [`black`](https://black.readthedocs.io) ([rules](black.toml)) for formatting and [`flake8`](http://flake8.pycqa.org/) ([rules](.flake8)) for linting | | ||
| CI/QA | [`Travis`](https://travis-ci.org/f-dangel/backpack) ([config](.travis.yaml)) to run tests and [`Github workflows`](https://github.com/f-dangel/backpack/actions) ([config](.github/workflows)) to check formatting and linting | | ||
|
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
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
Oops, something went wrong.