forked from redai-studio/Relax
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
152 lines (149 loc) · 6.13 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
152 lines (149 loc) · 6.13 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
exclude: |
(?x)^(
transfer_queue/.*
)$
repos:
# Common hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
args: ['--assume-in-merge']
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: debug-statements
- id: trailing-whitespace
types:
- python
- yaml
- json
- shell
- c
- proto
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.9
hooks:
- id: ruff
# exclude: 'relax/xxx'
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.9
hooks:
- id: mdformat
args: ["--number"]
additional_dependencies:
- mdformat-openmmlab
- mdformat_frontmatter
- linkify-it-py
exclude: |
(?x)^(
skills/.* | .opencode/.* | docs/.*
)$
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.6
hooks:
- id: clang-format
- repo: local
hooks:
- id: docformatter
name: docformatter
entry: docformatter --in-place --wrap-descriptions 79
language: python
types: [python]
additional_dependencies: ["docformatter==1.3.1"]
- id: copyright-checker
name: copyright-checker
entry: python .pre-commit-hooks/copyright.py
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|xpu|kps|py|pyi|sh)$
exclude: |
(?x)^(
examples/.* | docs/.* | docker/.* |
relax/backends/megatron/kernels/__init__\.py |
relax/backends/megatron/misc_utils\.py |
relax/backends/megatron/sglang\.py |
relax/backends/megatron/weight_conversion/deepseekv3\.py |
relax/backends/megatron/weight_update/__init__\.py |
relax/distributed/ray/__init__\.py |
relax/engine/__init__\.py |
relax/engine/filters/__init__\.py |
relax/engine/filters/base_types\.py |
relax/engine/rewards/deepscaler\.py |
relax/engine/rollout/__init__\.py |
relax/engine/router/__init__\.py |
relax/engine/router/middleware/__init__\.py |
relax/utils/__init__\.py |
relax/utils/data/__init__\.py |
relax/utils/data/mask_utils\.py |
relax/utils/debug/__init__\.py |
relax/utils/external/__init__\.py |
relax/utils/metrics/adapters/__init__\.py |
relax/utils/multimodal/__init__\.py |
relax/utils/training/__init__\.py |
relax/utils/training/flops_utils\.py |
relax/backends/megatron/ci_utils\.py |
relax/backends/megatron/cp_utils\.py |
relax/backends/megatron/initialize\.py |
relax/backends/megatron/kernels/fp8_kernel\.py |
relax/backends/megatron/kernels/int4_qat/setup\.py |
relax/backends/megatron/loss\.py |
relax/backends/megatron/weight_conversion/__init__\.py |
relax/backends/megatron/weight_conversion/glm4\.py |
relax/backends/megatron/weight_conversion/glm4moe\.py |
relax/backends/megatron/weight_conversion/llama\.py |
relax/backends/megatron/weight_conversion/mimo\.py |
relax/backends/megatron/weight_conversion/processors/__init__\.py |
relax/backends/megatron/weight_conversion/processors/quantizer_compressed_tensors\.py |
relax/backends/megatron/weight_conversion/processors/quantizer_fp8\.py |
relax/backends/megatron/weight_conversion/qwen2\.py |
relax/backends/megatron/weight_conversion/qwen3_next\.py |
relax/backends/megatron/weight_conversion/qwen3_vl\.py |
relax/backends/megatron/weight_conversion/qwen3moe\.py |
relax/backends/megatron/weight_update/hf_weight_iterator_base\.py |
relax/backends/megatron/weight_update/hf_weight_iterator_direct\.py |
relax/backends/megatron/weight_update/update_weight_from_distributed\.py |
relax/distributed/ray/ray_actor\.py |
relax/distributed/ray/utils\.py |
relax/engine/rewards/f1\.py |
relax/engine/rewards/gpqa\.py |
relax/engine/rewards/ifbench\.py |
relax/engine/rewards/math_dapo_utils\.py |
relax/engine/rewards/math_utils\.py |
relax/engine/rollout/base_types\.py |
relax/engine/router/middleware/radix_tree_middleware\.py |
relax/engine/router/router\.py |
relax/utils/async_utils\.py |
relax/utils/data/seqlen_balancing\.py |
relax/utils/distributed_utils\.py |
relax/utils/external/typer_utils\.py |
relax/utils/megatron_bridge_utils\.py |
relax/utils/metrics/metric_utils\.py |
relax/utils/reloadable_process_group\.py |
relax/utils/rocm_checkpoint_writer\.py |
relax/utils/training/eval_config\.py |
relax/utils/training/routing_replay\.py |
relax/utils/training/tensor_backper\.py |
relax/utils/types\.py
)$
- id: check-conflict-markers
name: check-conflict-markers
entry: python .pre-commit-hooks/check_conflict_markers.py
language: system
types: [text]
exclude: |
(?x)^(
versioneer\.py
)$
- id: format-ascii-boxes
name: format-ascii-boxes
entry: python .pre-commit-hooks/format_ascii_boxes.py
language: system
files: \.md$
# Gitleaks - Secret detection
- repo: https://github.com/gitleaks/gitleaks
rev: v8.24.2
hooks:
- id: gitleaks