1- exclude : |
2- (?x)^(
3- flagscale/backends/.*|
4- third_party/.*|
5- megatron-energon/.*|
6- hardware/.*\.patch|
7- .*\.md|
8- .*\.sh|
9- .*\.txt|
10- .*\.yaml|
11- .*\.yml$
12- )$
1+ # Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+ #
3+ # See LICENSE for license information.
4+
5+ default_language_version :
6+ python : python3
7+
8+ ci :
9+ autofix_prs : true
10+ autoupdate_commit_msg : ' [pre-commit.ci] pre-commit suggestions'
11+ autoupdate_schedule : quarterly
12+ submodules : false
13+ skip : []
14+
1315repos :
14- - repo : https://github.com/pre-commit/pre-commit-hooks
15- rev : v4.4 .0
16+ - repo : https://github.com/pre-commit/pre-commit-hooks
17+ rev : v4.6 .0
1618 hooks :
17- - id : check-merge-conflict
18- - id : check-symlinks
19- - id : detect-private-key
20- - id : end-of-file-fixer
21- - id : trailing-whitespace
22- - repo : https://github.com/Lucas-C/pre-commit-hooks.git
23- rev : v1.5.1
24- hooks :
25- - id : remove-crlf
26- - id : remove-tabs
27- name : Tabs remover (Python)
28- files : (.*\.(py))$
29- args : [--whitespaces-count, '4']
30- - repo : https://github.com/psf/black
19+ - id : check-merge-conflict
20+ - id : check-added-large-files
21+ - id : end-of-file-fixer
22+ files : .*.(c|cc|cxx|cpp|cu|cuh|h|hpp|py)$
23+ - id : trailing-whitespace
24+ files : .*.(c|cc|cxx|cpp|cu|cuh|h|hpp|py)$
25+
26+ - repo : https://github.com/psf/black
3127 rev : 24.4.2
3228 hooks :
33- - id : black
34- exclude : |
35- (?x)^(
36- flagscale/backends/.*|
37- third_party/.*|
38- megatron-energon/.*|
39- hardware/.*\.patch|
40- flagscale/inference/processing_emu3.py|
41- flagscale/train/train.*\.py|
42- flagscale/train/models/.*|
43- flagscale/train/hetero/.*|
44- tools/checkpoint/loader.*\.py|
45- tools/checkpoint/saver.*\.py|
46- .*\.md|
47- .*\.sh|
48- .*\.txt|
49- .*\.yaml|
50- .*\.yml$
51- )$
52- - repo : https://github.com/PyCQA/isort
53- rev : 5.13.2
29+ - id : black
30+ name : Format python code
31+ args : [--line-length=100, --preview, --enable-unstable-feature=string_processing]
32+ types : [python]
33+
34+ - repo : https://github.com/pre-commit/mirrors-clang-format
35+ rev : v18.1.6
5436 hooks :
55- - id : isort
56- exclude : |
57- (?x)^(
58- flagscale/backends/.*|
59- third_party/.*|
60- megatron-energon/.*|
61- hardware/.*\.patch|
62- flagscale/inference/processing_emu3.py|
63- flagscale/train/train.*\.py|
64- flagscale/train/models/.*|
65- flagscale/train/hetero/.*|
66- tools/checkpoint/loader.*\.py|
67- tools/checkpoint/saver.*\.py|
68- .*\.md|
69- .*\.sh|
70- .*\.txt|
71- .*\.yaml|
72- .*\.yml$
73- )$
74- # - repo: local
75- # hooks:
76- # - id: check-header
77- # name: check-header
78- # entry: python ./tools/codestyle/check_header.py
79- # language: python
80- # types: [python]
81- # exclude: |
82- # (?x)^(
83- # flagscale/backends/.*|
84- # megatron-energon/.*|
85- # hardware/.*\.patch|
86- # flagscale/train/train.*\.py|
87- # flagscale/train/models/.*|
88- # flagscale/train/hetero/.*|
89- # tools/checkpoint/loader.*\.py|
90- # tools/checkpoint/saver.*\.py|
91- # .*\.sh$ # Exclude all .sh files
92- # )$
37+ - id : clang-format
38+ entry : clang-format -i
39+ args : ["-style=file"]
40+ files : ^transformer_engine.*\.(c|cc|cxx|cpp|cu|cuh|h|hpp)$
41+
42+ # - repo: https://github.com/netromdk/vermin
43+ # rev: c75aca72f4e85c6e47252139e8695f1c8b5f9ae3
44+ # hooks:
45+ # - id: vermin
46+ # args: ['-t=3.10', '--violations']
0 commit comments