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 pre-commit: black+flake8+pylint+mypy+isort+bandit #98

Merged
merged 59 commits into from
May 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
36596ad
Add pre-commit: black+flake8+pylint
NanoCode012 May 28, 2023
a98deb3
Add config files
NanoCode012 May 28, 2023
392dfd9
Lint and format
NanoCode012 May 28, 2023
c3a4697
Update ignores
NanoCode012 May 28, 2023
d57ba56
Ignore import and too many * pylint errors
NanoCode012 May 29, 2023
cb7cd34
Fix data.py lint
NanoCode012 May 29, 2023
903ea30
Fix lint
NanoCode012 May 29, 2023
1c60c10
Lint flash_attn.py
NanoCode012 May 29, 2023
4c0eddb
Refactor
NanoCode012 May 29, 2023
cb4f0e9
Lint prompters.py
NanoCode012 May 29, 2023
5062eca
Lint callbacks.py
NanoCode012 May 29, 2023
54c3b5b
Ignore too-many-arguments
NanoCode012 May 29, 2023
e8717d3
Remove disable
NanoCode012 May 29, 2023
5658717
Remove disable too many arg
NanoCode012 May 29, 2023
69722ae
Remove fixme disable
NanoCode012 May 29, 2023
545cfeb
Refactor error code to use full error message
NanoCode012 May 29, 2023
daf47cc
Refactor disable pylint
NanoCode012 May 29, 2023
f4e5d86
Lint models.py
NanoCode012 May 29, 2023
82971e1
Lint finetune.py
NanoCode012 May 29, 2023
1a2bd7f
Ignore too-few-public-methods
NanoCode012 May 29, 2023
ddb86ea
Lint trainer.py
NanoCode012 May 29, 2023
8b617cc
Lint setup.py
NanoCode012 May 29, 2023
de2406c
Lint convert.py
NanoCode012 May 29, 2023
6abb7f6
Lint datasets
NanoCode012 May 29, 2023
8cc0aad
Lint alpaca_chat
NanoCode012 May 29, 2023
145b060
Lint alpaca_instruct
NanoCode012 May 29, 2023
1645a4d
Lint creative_acr
NanoCode012 May 29, 2023
7eb33a7
Lint test_prompters
NanoCode012 May 29, 2023
01c8a33
Lint pygmalion
NanoCode012 May 29, 2023
5d86137
Lint prompt_tokenizers
NanoCode012 May 29, 2023
633ff21
Lint dict
NanoCode012 May 29, 2023
dae14e5
Ignore too-many-instance-attributes
NanoCode012 May 29, 2023
fe1f4c4
Lint schedulers
NanoCode012 May 29, 2023
e6b57de
Lint tokenization
NanoCode012 May 29, 2023
c2dbf2c
Lint validation
NanoCode012 May 29, 2023
9c6750a
Lint wandb
NanoCode012 May 29, 2023
0e95288
Lint test_dict
NanoCode012 May 29, 2023
1f3c3f5
Lint validation
NanoCode012 May 29, 2023
8e46c0f
Refactor duplicate code between Prompter and Pygmalion
NanoCode012 May 29, 2023
1bf1f59
Move black to dev requirements
NanoCode012 May 29, 2023
afb31e1
Add badge and update contribution section
NanoCode012 May 29, 2023
b832a0a
Black formatting
NanoCode012 May 29, 2023
be22551
Fix unsupported operand type(s) for |
NanoCode012 May 29, 2023
db288e9
Set python version
NanoCode012 May 29, 2023
0dd35c7
Ignore unsupported-binary-operation
NanoCode012 May 29, 2023
741a3f2
Add mypy
NanoCode012 May 29, 2023
f1232b3
Update mypy dependencies
NanoCode012 May 29, 2023
e9650d3
Fix mypy typing
NanoCode012 May 29, 2023
96e8378
Delete extract_lora.py
NanoCode012 May 29, 2023
37293dc
Apply isort then black
NanoCode012 May 29, 2023
c17dae6
Update src/axolotl/prompt_strategies/alpaca_instruct.py
NanoCode012 May 29, 2023
b1cc54b
Update pip install to also setup tests
NanoCode012 May 29, 2023
d011422
Add isort
NanoCode012 May 29, 2023
83d2920
Add bandit
NanoCode012 May 29, 2023
a1f9850
Fix security issue or ignore false positives
NanoCode012 May 29, 2023
cfcc549
fix relative path for fixtures
winglian May 30, 2023
25eeeeb
Fix sharegpt prompt
NanoCode012 May 30, 2023
594e72b
Fix incorrect rebase
NanoCode012 May 30, 2023
b81c97f
Fix pre-commit for rebased files
NanoCode012 May 30, 2023
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
Prev Previous commit
Next Next commit
Update mypy dependencies
NanoCode012 committed May 30, 2023
commit f1232b35ba00d043f316a916f8cbb4bf35714ad8
30 changes: 30 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
[mypy]

exclude = venv

[mypy-alpaca_lora_4bit.*]
ignore_missing_imports = True

[mypy-flash_attn.*]
ignore_missing_imports = True

[mypy-huggingface_hub]
ignore_missing_imports = True

[mypy-transformers.*]
ignore_missing_imports = True

[mypy-peft]
ignore_missing_imports = True

[mypy-bitsandbytes]
ignore_missing_imports = True

[mypy-datasets]
ignore_missing_imports = True

[mypy-fire]
ignore_missing_imports = True

[mypy-setuptools]
ignore_missing_imports = True

[mypy-addict]
ignore_missing_imports = True
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -26,6 +26,5 @@ repos:
- id: mypy
additional_dependencies:
[
'fire',
'types-PyYAML'
'types-PyYAML',
]