-
Notifications
You must be signed in to change notification settings - Fork 46
44 lines (36 loc) · 997 Bytes
/
format.yml
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
name: Format Check
on:
pull_request:
branches: [ "main" ]
types: [opened, synchronize, reopened]
env:
INCLUDE_FILES: >-
flagscale/auto_tuner/*.py
flagscale/auto_tuner/prune/*.py
flagscale/auto_tuner/record/*.py
flagscale/auto_tuner/search/*.py
flagscale/runner/*.py
flagscale/logger.py
flagscale/patches_utils.py
flagscale/datasets/sft_dataset.py
flagscale/inference/inference_*.py
flagscale/inference/arguments.py
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install black isort
- name: Run Black
run: |
black --verbose --include $INCLUDE_FILES ./ --diff
- name: Run Isort
run: |
isort --verbose --profile black $INCLUDE_FILES --diff --known-local-folder flagscale