Skip to content

Commit 2e2f654

Browse files
authored
Merge branch 'main' into feature/modernbert-embedding-final
2 parents 80f4bca + 37e8724 commit 2e2f654

File tree

932 files changed

+101625
-13753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

932 files changed

+101625
-13753
lines changed

.github/CODEOWNERS

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
.github @merrymercy @zhyncs
2-
/docker @zhyncs @HaiShaw @ByronHsu
1+
.github @merrymercy @Fridge003 @ispobock
2+
/docker @Fridge003 @ispobock @HaiShaw @ByronHsu
33
/docker/npu.Dockerfile @ping1jing2
4-
/python/pyproject.toml @merrymercy @zhyncs
5-
/python/sglang/* @merrymercy @Ying1123 @zhyncs @hnyls2002
4+
/python/pyproject.toml @merrymercy @Fridge003 @ispobock
5+
/python/sglang/* @merrymercy @Ying1123 @Fridge003 @ispobock @hnyls2002
6+
/python/sglang/multimodal_gen @mickqian
67
/python/sglang/srt/constrained @hnyls2002
78
/python/sglang/srt/disaggregation @ByronHsu @hnyls2002
89
/python/sglang/srt/disaggregation/mooncake @ShangmingCai
@@ -11,14 +12,14 @@
1112
/python/sglang/srt/entrypoints @ispobock @CatherineSue @slin1237 @merrymercy @JustinTong0323
1213
/python/sglang/srt/eplb @fzyzcjy
1314
/python/sglang/srt/function_call @CatherineSue @JustinTong0323
14-
/python/sglang/srt/layers @merrymercy @Ying1123 @zhyncs @ispobock @HaiShaw @ch-wan @BBuf @kushanam @Edwardf0t1
15+
/python/sglang/srt/layers @merrymercy @Ying1123 @Fridge003 @ispobock @HaiShaw @ch-wan @BBuf @kushanam @Edwardf0t1
1516
/python/sglang/srt/layers/quantization @ch-wan @BBuf @Edwardf0t1 @FlamingoPg
1617
/python/sglang/srt/layers/attention/ascend_backend.py @ping1jing2
1718
/python/sglang/srt/lora @Ying1123 @Fridge003 @lifuhuang
18-
/python/sglang/srt/managers @merrymercy @Ying1123 @hnyls2002 @xiezhq-hermann
19+
/python/sglang/srt/managers @merrymercy @Ying1123 @zhyncs @hnyls2002 @xiezhq-hermann
1920
/python/sglang/srt/mem_cache @merrymercy @Ying1123 @hnyls2002 @xiezhq-hermann
2021
/python/sglang/srt/mem_cache/allocator_ascend.py @ping1jing2
21-
/python/sglang/srt/model_executor @merrymercy @Ying1123 @hnyls2002 @zhyncs @ispobock
22+
/python/sglang/srt/model_executor @merrymercy @Ying1123 @hnyls2002 @Fridge003 @ispobock
2223
/python/sglang/srt/model_executor/npu_graph_runner.py @ping1jing2
2324
/python/sglang/srt/multimodal @mickqian @JustinTong0323
2425
/python/sglang/srt/speculative @Ying1123 @merrymercy @kssteven418

.github/labeler.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Configuration for the GitHub Labeler action
2+
# Automatically adds labels to PRs based on the files changed
3+
4+
# Router specific (Rust code in sgl-router)
5+
model-gateway:
6+
- changed-files:
7+
- any-glob-to-any-file: 'sgl-router/**/*'
8+
9+
# Kernel specific
10+
sgl-kernel:
11+
- changed-files:
12+
- any-glob-to-any-file: 'sgl-kernel/**/*'
13+
14+
# Documentation
15+
documentation:
16+
- changed-files:
17+
- any-glob-to-any-file:
18+
- '**/*.md'
19+
- 'docs/**/*'
20+
- 'README*'
21+
22+
# Dependencies
23+
dependencies:
24+
- changed-files:
25+
- any-glob-to-any-file:
26+
- '**/requirements*.txt'
27+
- '**/Cargo.toml'
28+
- '**/Cargo.lock'
29+
- '**/pyproject.toml'
30+
- '**/setup.py'
31+
- '**/poetry.lock'
32+
- '**/package.json'
33+
- '**/package-lock.json'
34+
35+
# Multi-modal
36+
Multi-modal:
37+
- changed-files:
38+
- any-glob-to-any-file:
39+
- '**/vision/**/*'
40+
- '**/multimodal/**/*'
41+
- '**/vlm/**/*'
42+
43+
# LoRA
44+
lora:
45+
- changed-files:
46+
- any-glob-to-any-file:
47+
- '**/lora/**/*'
48+
- '**/*lora*'
49+
50+
# Quantization
51+
quant:
52+
- changed-files:
53+
- any-glob-to-any-file:
54+
- '**/quant/**/*'
55+
- '**/*quant*'
56+
- '**/awq/**/*'
57+
- '**/gptq/**/*'
58+
59+
# Speculative decoding
60+
speculative-decoding:
61+
- changed-files:
62+
- any-glob-to-any-file:
63+
- '**/speculative/**/*'
64+
- '**/*speculative*'
65+
66+
# AMD specific
67+
amd:
68+
- changed-files:
69+
- any-glob-to-any-file:
70+
- '**/*amd*'
71+
- '**/*rocm*'
72+
73+
# DeepSeek specific
74+
deepseek:
75+
- changed-files:
76+
- any-glob-to-any-file:
77+
- '**/*deepseek*'
78+
79+
# HiCache
80+
hicache:
81+
- changed-files:
82+
- any-glob-to-any-file:
83+
- '**/hicache/**/*'
84+
- '**/*hicache*'

.github/workflows/auto-format.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Auto Format Code
2+
3+
on:
4+
pull_request:
5+
types: [labeled]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
auto-format:
13+
if: github.event.label.name == 'format'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout PR branch
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.event.pull_request.head.ref }}
20+
repository: ${{ github.event.pull_request.head.repo.full_name }}
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
fetch-depth: 0
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: "3.10"
28+
29+
- name: Install pre-commit hook
30+
run: |
31+
python -m pip install pre-commit
32+
pre-commit install
33+
34+
- name: Run pre-commit to format code
35+
run: SKIP=no-commit-to-branch pre-commit run --all-files
36+
continue-on-error: true
37+
38+
- name: Check for changes
39+
id: check_changes
40+
run: |
41+
if [[ -n $(git status -s) ]]; then
42+
echo "has_changes=true" >> $GITHUB_OUTPUT
43+
else
44+
echo "has_changes=false" >> $GITHUB_OUTPUT
45+
fi
46+
47+
- name: Commit and push changes
48+
if: steps.check_changes.outputs.has_changes == 'true'
49+
run: |
50+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
51+
git config --local user.name "github-actions[bot]"
52+
git add .
53+
git commit -m "🤖 Auto-format code with isort, black, ruff, and clang-format"
54+
git push
55+
56+
- name: Remove format label
57+
if: always()
58+
uses: actions/github-script@v7
59+
with:
60+
github-token: ${{ secrets.GITHUB_TOKEN }}
61+
script: |
62+
try {
63+
await github.rest.issues.removeLabel({
64+
owner: context.repo.owner,
65+
repo: context.repo.repo,
66+
issue_number: context.issue.number,
67+
name: 'format'
68+
});
69+
} catch (error) {
70+
console.log('Label may have already been removed');
71+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Bot Bump Kernel Version to SGLang
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
jobs:
11+
bump-kernel-version-to-sglang:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.10'
23+
24+
- name: Install Python dependencies
25+
run: |
26+
pip install tomli
27+
28+
- name: Check if sync is needed
29+
id: check_sync
30+
run: |
31+
python scripts/release/check_kernel_version_to_sglang.py
32+
33+
- name: Configure Git and branch
34+
if: steps.check_sync.outputs.needs_sync == 'true'
35+
run: |
36+
git config user.name "sglang-bot"
37+
git config user.email "[email protected]"
38+
RANDOM_SUFFIX=$(echo $RANDOM | md5sum | head -c 4)
39+
KERNEL_VERSION="${{ steps.check_sync.outputs.kernel_version }}"
40+
BRANCH_NAME="bot/bump-kernel-version-to-sglang-${KERNEL_VERSION}-${RANDOM_SUFFIX}"
41+
git checkout -b "$BRANCH_NAME"
42+
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
43+
echo "KERNEL_VERSION=$KERNEL_VERSION" >> $GITHUB_ENV
44+
45+
- name: Run kernel version bump script
46+
if: steps.check_sync.outputs.needs_sync == 'true'
47+
run: |
48+
python scripts/release/bump_kernel_version_to_sglang.py
49+
50+
- name: Commit and create PR
51+
if: steps.check_sync.outputs.needs_sync == 'true'
52+
env:
53+
GH_TOKEN: ${{ secrets.GH_PAT_FOR_PULL_REQUEST }}
54+
run: |
55+
bash scripts/release/commit_and_pr_kernel_to_sglang.sh "$KERNEL_VERSION" "$BRANCH_NAME"
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI Failure Monitor
2+
3+
on:
4+
schedule:
5+
- cron: '*/30 * * * *' # Every 30 minutes
6+
workflow_dispatch:
7+
inputs:
8+
limit:
9+
description: 'Number of workflow runs to analyze'
10+
required: false
11+
default: '300'
12+
type: string
13+
threshold:
14+
description: 'Alert threshold for consecutive failures'
15+
required: false
16+
default: '4'
17+
type: string
18+
19+
concurrency:
20+
group: ci-failure-monitor-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
contents: read
25+
actions: read
26+
27+
jobs:
28+
failure-analysis:
29+
if: github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request'
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@v4
34+
35+
- name: Set up Python
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: '3.14'
39+
40+
- name: Install dependencies
41+
run: |
42+
python -m pip install --upgrade pip
43+
pip install requests
44+
45+
- name: Run Failure Analysis
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GH_PAT_FOR_NIGHTLY_CI_DATA }}
48+
PYTHONUNBUFFERED: 1
49+
PYTHONIOENCODING: utf-8
50+
run: |
51+
cd scripts/ci_monitor
52+
python ci_failures_analysis.py \
53+
--token $GITHUB_TOKEN \
54+
--limit ${{ inputs.limit || '300' }} \
55+
--threshold ${{ inputs.threshold || '2' }} \
56+
--output ci_failure_analysis_$(date +%Y%m%d_%H%M%S).json
57+
58+
- name: Upload Analysis Results
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: ci-failure-analysis-${{ github.run_number }}
62+
path: |
63+
scripts/ci_monitor/ci_failure_analysis_*.json
64+
retention-days: 7

.github/workflows/label-pr.yml renamed to .github/workflows/labeler.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
1-
name: Label PR for CI
1+
name: Auto Label PRs
22

33
on:
44
pull_request_target:
5-
types: [opened, reopened]
5+
types: [opened, synchronize, reopened]
66

7-
# This permission is still needed for the 'check-user-permission' action,
8-
# which uses the default GITHUB_TOKEN to verify the actor's permissions.
97
permissions:
10-
pull-requests: read
8+
contents: read
9+
pull-requests: write
1110

1211
jobs:
13-
labeler:
12+
label:
1413
runs-on: ubuntu-latest
1514
steps:
15+
# Step 1: Add category labels based on file changes
16+
- name: Auto-label by file changes
17+
uses: actions/labeler@v5
18+
with:
19+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
20+
configuration-path: .github/labeler.yml
21+
sync-labels: false
22+
23+
# Step 2: Add run-ci label for authorized users (only on opened/reopened)
1624
- name: Check user permission
25+
if: github.event.action == 'opened' || github.event.action == 'reopened'
1726
id: checkAccess
1827
uses: actions-cool/check-user-permission@v2
1928
with:
@@ -23,7 +32,7 @@ jobs:
2332
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2433

2534
- name: Add run-ci label
26-
if: steps.checkAccess.outputs.require-result == 'true'
35+
if: (github.event.action == 'opened' || github.event.action == 'reopened') && steps.checkAccess.outputs.require-result == 'true'
2736
uses: actions/github-script@v7
2837
with:
2938
github-token: ${{ secrets.GH_PAT_FOR_PULL_REQUEST }}

.github/workflows/lint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,19 @@ jobs:
3232
extensions: h,c,cpp,hpp,cu,cuh,cc
3333
clangFormatVersion: 18
3434
style: file
35+
36+
- name: Check proto files are in sync
37+
run: |
38+
if ! diff -q python/sglang/srt/grpc/sglang_scheduler.proto sgl-router/src/proto/sglang_scheduler.proto; then
39+
echo "❌ ERROR: Proto files are out of sync!"
40+
echo ""
41+
echo "The following files must be kept identical:"
42+
echo " - python/sglang/srt/grpc/sglang_scheduler.proto"
43+
echo " - sgl-router/src/proto/sglang_scheduler.proto"
44+
echo ""
45+
echo "Please ensure both files have the same content."
46+
echo ""
47+
echo "Differences:"
48+
diff python/sglang/srt/grpc/sglang_scheduler.proto sgl-router/src/proto/sglang_scheduler.proto || true
49+
exit 1
50+
fi

0 commit comments

Comments
 (0)