-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add linting and fix score mod function in flex attention pathway
- Loading branch information
1 parent
79ce31d
commit 4628c28
Showing
3 changed files
with
38 additions
and
4 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,21 @@ | ||
name: Ruff | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install uv | ||
python -m uv pip install ruff | ||
- name: Lint with Ruff | ||
run: | | ||
ruff check pi_zero_pytorch/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[project] | ||
name = "pi-zero-pytorch" | ||
version = "0.0.26" | ||
version = "0.0.27" | ||
description = "π0 in Pytorch" | ||
authors = [ | ||
{ name = "Phil Wang", email = "[email protected]" } | ||
|
@@ -45,6 +45,7 @@ Repository = "https://github.com/lucidrains/pi-zero-pytorch" | |
examples = [] | ||
test = [ | ||
"pytest", | ||
"ruff>=0.4.2", | ||
"vit-pytorch>=1.8.7" | ||
] | ||
|
||
|
@@ -53,6 +54,19 @@ pythonpath = [ | |
"." | ||
] | ||
|
||
[tool.ruff] | ||
line-length = 1000 | ||
|
||
lint.ignore = [ | ||
"F722", # for jaxtyping shape annotation | ||
"F401", | ||
"F821" | ||
] | ||
|
||
lint.extend-select = [ | ||
"W291" | ||
] | ||
|
||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|