forked from flagos-ai/FlagScale
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
78 lines (78 loc) · 2.46 KB
/
.pre-commit-config.yaml
File metadata and controls
78 lines (78 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
exclude: |
(?x)^(
megatron/.*|
vllm/.*|
megatron-energon/.*|
hardware/.*\.patch|
flagscale/inference/core/.*|
.*\.sh$ # Exclude all .sh files
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
exclude: |
(?x)^(
megatron/.*|
vllm/.*|
megatron-energon/.*|
hardware/.*\.patch|
flagscale/inference/core/.*|
flagscale/inference/processing_emu3.py|
flagscale/train/train.*\.py|
flagscale/train/models/.*|
flagscale/train/hetero/.*|
tools/checkpoint/loader.*\.py|
tools/checkpoint/saver.*\.py|
.*\.sh$ # Exclude all .sh files
)$
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: ['--profile', 'black', '--known-local-folder', 'flagscale']
exclude: |
(?x)^(
megatron/.*|
vllm/.*|
megatron-energon/.*|
hardware/.*\.patch|
flagscale/inference/core/.*|
flagscale/inference/processing_emu3.py|
flagscale/train/train.*\.py|
flagscale/train/models/.*|
flagscale/train/hetero/.*|
tools/checkpoint/loader.*\.py|
tools/checkpoint/saver.*\.py|
.*\.sh$ # Exclude all .sh files
)$
# - repo: local
# hooks:
# - id: check-header
# name: check-header
# entry: python ./tools/codestyle/check_header.py
# language: python
# types: [python]
# exclude: |
# (?x)^(
# megatron/.*|
# vllm/.*|
# megatron-energon/.*|
# hardware/.*\.patch|
# flagscale/inference/core/.*|
# flagscale/train/train.*\.py|
# flagscale/train/models/.*|
# flagscale/train/hetero/.*|
# tools/checkpoint/loader.*\.py|
# tools/checkpoint/saver.*\.py|
# .*\.sh$ # Exclude all .sh files
# )$