DeepSpeed

Зеркало из https://github.com/microsoft/DeepSpeed
Форк
0
/
.pre-commit-config.yaml 
89 строк · 3.4 Кб
1
repos:
2
-   repo: meta
3
    hooks:
4
    -   id: check-hooks-apply
5
    -   id: check-useless-excludes
6

7
-   repo: https://github.com/pre-commit/pre-commit-hooks
8
    rev: v4.0.1
9
    hooks:
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
16
        exclude: docs/CNAME
17
    -   id: fix-byte-order-marker
18
    -   id: fix-encoding-pragma
19
        args: [--remove]
20
    -   id: mixed-line-ending
21
        args: [--fix=lf]
22
    -   id: requirements-txt-fixer
23
    -   id: trailing-whitespace
24

25
-   repo: https://github.com/google/yapf
26
    rev: v0.32.0
27
    hooks:
28
    -   id: yapf
29

30
-   repo: https://gitlab.com/daverona/pre-commit/cpp
31
    rev: 0.8.0
32
    hooks:
33
    -   id: clang-format  # formatter of C/C++ code based on a style guide: LLVM, Google, Chromium, Mozilla, and WebKit available
34
        args: []
35

36
-   repo: local
37
    hooks:
38
    -   id: check-torchdist
39
        name: check-torchdist
40
        entry: ./scripts/check-torchdist.py
41
        language: python
42
        exclude: ^(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
46
    hooks:
47
    -   id: check-license
48
        name: check-license
49
        entry: ./scripts/check-license.py
50
        language: python
51
        files: \.(py|c|cpp|cu|cc|h|hpp|cuh|hip|tr)$
52
        exclude: ^(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
55
    rev: v2.1.0
56
    hooks:
57
    -   id: codespell
58
        args: [
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,cann',  # Word used in error messages that need rewording
63
            --check-filenames,
64
            --check-hidden
65
        ]
66

67
-   repo: https://github.com/pycqa/flake8
68
    rev: 4.0.1
69
    hooks:
70
    -   id: flake8
71
        args: ['--config=.flake8']
72

73
-   repo: local
74
    hooks:
75
    -   id: check-torchcuda
76
        name: check-torchcuda
77
        entry: ./scripts/check-torchcuda.py
78
        language: python
79
        exclude: ^(.github/workflows/|scripts/check-torchcuda.py|docs/_tutorials/accelerator-abstraction-interface.md|docs/_tutorials/deepnvme.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
83
    hooks:
84
    -   id: check-extraindexurl
85
        name: check-extraindexurl
86
        entry: ./scripts/check-extraindexurl.py
87
        language: python
88
        files: \.(yml|yaml|sh|py)$
89
        exclude: ^(scripts/check-extraindexurl.py)
90

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.