deepspeed
/
.pre-commit-config.yaml
89 строк · 3.4 Кб
1repos:
2- repo: meta
3hooks:
4- id: check-hooks-apply
5- id: check-useless-excludes
6
7- repo: https://github.com/pre-commit/pre-commit-hooks
8rev: v4.0.1
9hooks:
10- id: check-case-conflict
11- id: check-json
12- id: check-symlinks
13- id: check-yaml
14- id: destroyed-symlinks
15- id: end-of-file-fixer
16exclude: docs/CNAME
17- id: fix-byte-order-marker
18- id: fix-encoding-pragma
19args: [--remove]
20- id: mixed-line-ending
21args: [--fix=lf]
22- id: requirements-txt-fixer
23- id: trailing-whitespace
24
25- repo: https://github.com/google/yapf
26rev: v0.32.0
27hooks:
28- id: yapf
29
30- repo: https://gitlab.com/daverona/pre-commit/cpp
31rev: 0.8.0
32hooks:
33- id: clang-format # formatter of C/C++ code based on a style guide: LLVM, Google, Chromium, Mozilla, and WebKit available
34args: []
35
36- repo: local
37hooks:
38- id: check-torchdist
39name: check-torchdist
40entry: ./scripts/check-torchdist.py
41language: python
42exclude: ^(deepspeed/comm/|docs/|benchmarks/|scripts/check-torchdist.py|deepspeed/moe/sharded_moe.py|deepspeed/runtime/comm/coalesced_collectives.py|deepspeed/elasticity/elastic_agent.py|deepspeed/launcher/launch.py|tests/unit/comm/test_dist.py)
43# Specific deepspeed/ files are excluded for now until we wrap ProcessGroup in deepspeed.comm
44
45- repo: local
46hooks:
47- id: check-license
48name: check-license
49entry: ./scripts/check-license.py
50language: python
51files: \.(py|c|cpp|cu|cc|h|hpp|cuh|hip|tr)$
52exclude: ^(deepspeed/inference/v2/kernels/ragged_ops/blocked_flash|deepspeed/inference/v2/kernels/cutlass_ops/grouped_gemm)
53
54- repo: https://github.com/codespell-project/codespell
55rev: v2.1.0
56hooks:
57- id: codespell
58args: [
59# Do not check files that are automatically generated
60'--skip=docs/Gemfile.lock,tests/unit/gpt2-merges.txt,tests/unit/gpt2-vocab.json',
61'--ignore-regex=\\n', # Do not count the 'n' in an escaped newline as part of a word
62'--ignore-words-list=youn,unsupport,noe', # Word used in error messages that need rewording
63--check-filenames,
64--check-hidden
65]
66
67- repo: https://github.com/pycqa/flake8
68rev: 4.0.1
69hooks:
70- id: flake8
71args: ['--config=.flake8']
72
73- repo: local
74hooks:
75- id: check-torchcuda
76name: check-torchcuda
77entry: ./scripts/check-torchcuda.py
78language: python
79exclude: ^(.github/workflows/|scripts/check-torchcuda.py|docs/_tutorials/accelerator-abstraction-interface.md|accelerator/cuda_accelerator.py|deepspeed/inference/engine.py|deepspeed/model_implementations/transformers/clip_encoder.py|deepspeed/model_implementations/diffusers/vae.py|deepspeed/model_implementations/diffusers/unet.py|op_builder/spatial_inference.py|op_builder/transformer_inference.py|op_builder/builder.py|setup.py|tests/unit/ops/sparse_attention/test_sparse_attention.py)
80# Specific deepspeed/ files are excluded for now until we wrap ProcessGroup in deepspeed.comm
81
82- repo: local
83hooks:
84- id: check-extraindexurl
85name: check-extraindexurl
86entry: ./scripts/check-extraindexurl.py
87language: python
88files: \.(yml|yaml|sh|py)$
89exclude: ^(scripts/check-extraindexurl.py)
90