Skip to content

[Debug][Serve] expected serve #951

[Debug][Serve] expected serve

[Debug][Serve] expected serve #951

Workflow file for this run

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-22.04
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" ./ --check || { echo "Code formatting does not comply with Black's rules. Please reformat the code according to Black and resubmit."; exit 1; }
- name: Run Isort
run: |
isort --verbose --profile black $INCLUDE_FILES --check-only --diff --known-local-folder flagscale || { echo "Import order does not comply with isort rules. Please fix the import order and resubmit."; exit 1; }