Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
pkg-config
npm install -g markdownlint-cli
pip install --user yamllint codespell
go install github.com/apache/skywalking-eyes/cmd/license-eye@latest

- name: Cache Rust dependencies
uses: actions/cache@v4
Expand Down Expand Up @@ -94,6 +95,9 @@ jobs:
- name: Run Code Spell Check
run: make codespell

- name: Run License Header Check
run: make license-check

- name: Run pre-commit check
run: make precommit-check

Expand Down
62 changes: 62 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Copyright 2025 The vLLM Semantic Router Authors.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

header:
license:
spdx-id: Apache-2.0
copyright-owner: vLLM Semantic Router Authors
content: |
Copyright 2025 The vLLM Semantic Router Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
paths-ignore:
- website
- bin
- models
- '.github'
- '.bin'
- '**/go.mod'
- '**/go.sum'
- '**/*.md'
- '**/*.json'
- '**/*.txt'
- '**/*.hcl'
- '**/.gitignore'
- '**/.helmignore'
- .trivyignore
- '.codespell.*'
- .editorconfig
- .golangci.yml
- .testcoverage.yml
- '.yamllint*'
- LICENSE
- CODEOWNERS
- OWNER
- Dockerfile
- Dockerfile.extproc
- Dockerfile.precommit
- bench/MANIFEST.in
- tools/linter/codespell/.codespell.ignorewords
- tools/linter/codespell/.codespell.skip
- tools/linter/yaml/.yamllint
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
Expand Down Expand Up @@ -94,3 +108,14 @@ repos:
# args: ['--max-line-length=88', '--extend-ignore=E203,W503']
# files: \.py$
# exclude: ^(\.venv/|venv/|env/|__pycache__/|\.git/|site/)

# License header checking
- repo: local
hooks:
- id: license-check
name: license header check
entry: bash -c "make license-check"
language: system
files: \.(go|rs|py|js|yaml|yml)$
exclude: ^(\.venv/|venv/|env/|__pycache__/|\.git/|site/|node_modules/|website/node_modules/|target/|candle-binding/target/)
pass_filenames: false
14 changes: 14 additions & 0 deletions .prowlabels.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

area:
- core
- research
Expand Down
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,3 +311,21 @@ pre-commit run --all-files
## License

By contributing to this project, you agree that your contributions will be licensed under the same license as the project (Apache 2.0).

### License Headers

All source code files must include the Apache 2.0 license header. The project uses [license-eye](https://github.com/apache/skywalking-eyes) to automatically manage license headers.

**Check license headers:**

```bash
make license-check
```

**Automatically add missing license headers:**

```bash
make license-fix
```

The license header check is automatically run as part of the pre-commit hooks and CI pipeline. If you encounter license header issues, simply run `make license-fix` to automatically add the required headers to all applicable files.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Semantic Router Root Makefile Define.
# It is refer tools/make/*.mk as the sub-makefiles.

Expand Down
14 changes: 14 additions & 0 deletions bench/benchmark_comparison.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#!/bin/bash
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# Multi-Dataset Reasoning Benchmark Comparison
#
Expand Down
14 changes: 14 additions & 0 deletions bench/build_and_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#!/bin/bash
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# Build and test script for vLLM Semantic Router Bench PyPI package

Expand Down
14 changes: 14 additions & 0 deletions bench/comprehensive_bench.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#!/bin/bash
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# Comprehensive Multi-Dataset Benchmark Script for Research Report
# This script benchmarks all available datasets with reasonable sample sizes
Expand Down
14 changes: 14 additions & 0 deletions bench/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
Expand Down
14 changes: 14 additions & 0 deletions bench/router_reason_bench.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import argparse
import json
import os
Expand Down
14 changes: 14 additions & 0 deletions bench/setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#!/usr/bin/env python3
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Setup script for vllm-semantic-router-bench package."""

import os
Expand Down
14 changes: 14 additions & 0 deletions bench/vllm_semantic_router_bench/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
vLLM Semantic Router Benchmark Suite

Expand Down
14 changes: 14 additions & 0 deletions bench/vllm_semantic_router_bench/bench_plot.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import argparse
import json
from pathlib import Path
Expand Down
14 changes: 14 additions & 0 deletions bench/vllm_semantic_router_bench/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#!/usr/bin/env python3
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
Command Line Interface for Semantic Router Benchmark Suite
"""
Expand Down
14 changes: 14 additions & 0 deletions bench/vllm_semantic_router_bench/dataset_factory.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
Dataset factory for loading different evaluation datasets.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Dataset implementations for the benchmark."""

from .arc_dataset import ARCChallengeDataset, ARCDataset, ARCEasyDataset
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2025 The vLLM Semantic Router Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
ARC Dataset Implementation

Expand Down
Loading
Loading