Skip to content

Commit 515a675

Browse files
authored
Merge branch 'main' into main
2 parents 88617ef + 70fbdb2 commit 515a675

File tree

541 files changed

+17531
-19981
lines changed

Some content is hidden

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

541 files changed

+17531
-19981
lines changed

.buildkite/scripts/hardware_ci/run-tpu-v1-test-part2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ echo "--- Installing Python dependencies ---"
6262
python3 -m pip install --progress-bar off git+https://github.com/thuml/depyf.git \
6363
&& python3 -m pip install --progress-bar off pytest pytest-asyncio tpu-info \
6464
&& python3 -m pip install --progress-bar off "lm-eval @ git+https://github.com/EleutherAI/lm-evaluation-harness.git@206b7722158f58c35b7ffcd53b035fdbdda5126d" \
65-
&& python3 -m pip install --progress-bar off hf-transfer
65+
&& python3 -m pip install --progress-bar off hf-transfer tblib==3.1.0
6666
echo "--- Python dependencies installed ---"
6767
export VLLM_USE_V1=1
6868
export VLLM_XLA_CHECK_RECOMPILATION=1

.buildkite/scripts/hardware_ci/run-tpu-v1-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ echo "--- Installing Python dependencies ---"
6262
python3 -m pip install --progress-bar off git+https://github.com/thuml/depyf.git \
6363
&& python3 -m pip install --progress-bar off pytest pytest-asyncio tpu-info \
6464
&& python3 -m pip install --progress-bar off "lm-eval @ git+https://github.com/EleutherAI/lm-evaluation-harness.git@206b7722158f58c35b7ffcd53b035fdbdda5126d" \
65-
&& python3 -m pip install --progress-bar off hf-transfer
65+
&& python3 -m pip install --progress-bar off hf-transfer tblib==3.1.0
6666
echo "--- Python dependencies installed ---"
6767
export VLLM_USE_V1=1
6868
export VLLM_XLA_CHECK_RECOMPILATION=1
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/bin/bash
2+
# SPDX-License-Identifier: Apache-2.0
3+
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
4+
5+
# Setup script for Prime-RL integration tests
6+
# This script prepares the environment for running Prime-RL tests with nightly vLLM
7+
8+
set -euo pipefail
9+
10+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
11+
REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
12+
PRIME_RL_REPO="https://github.com/PrimeIntellect-ai/prime-rl.git"
13+
PRIME_RL_DIR="${REPO_ROOT}/prime-rl"
14+
15+
echo "Setting up Prime-RL integration test environment..."
16+
17+
# Clean up any existing Prime-RL directory
18+
if [ -d "${PRIME_RL_DIR}" ]; then
19+
echo "Removing existing Prime-RL directory..."
20+
rm -rf "${PRIME_RL_DIR}"
21+
fi
22+
23+
# Install UV if not available
24+
if ! command -v uv &> /dev/null; then
25+
echo "Installing UV package manager..."
26+
curl -LsSf https://astral.sh/uv/install.sh | sh
27+
source $HOME/.local/bin/env
28+
fi
29+
30+
# Clone Prime-RL repository at specific branch for reproducible tests
31+
PRIME_RL_BRANCH="integ-vllm-main"
32+
echo "Cloning Prime-RL repository at branch: ${PRIME_RL_BRANCH}..."
33+
git clone --branch "${PRIME_RL_BRANCH}" --single-branch "${PRIME_RL_REPO}" "${PRIME_RL_DIR}"
34+
cd "${PRIME_RL_DIR}"
35+
36+
echo "Setting up UV project environment..."
37+
export UV_PROJECT_ENVIRONMENT=/usr/local
38+
ln -s /usr/bin/python3 /usr/local/bin/python
39+
40+
# Remove vllm pin from pyproject.toml
41+
echo "Removing vllm pin from pyproject.toml..."
42+
sed -i '/vllm==/d' pyproject.toml
43+
44+
# Sync Prime-RL dependencies
45+
echo "Installing Prime-RL dependencies..."
46+
uv sync --inexact && uv sync --inexact --all-extras
47+
48+
# Verify installation
49+
echo "Verifying installations..."
50+
uv run python -c "import vllm; print(f'vLLM version: {vllm.__version__}')"
51+
uv run python -c "import prime_rl; print('Prime-RL imported successfully')"
52+
53+
echo "Prime-RL integration test environment setup complete!"
54+
55+
echo "Running Prime-RL integration tests..."
56+
export WANDB_MODE=offline # this makes this test not require a WANDB_API_KEY
57+
uv run pytest -vs tests/integration/test_rl.py -m gpu
58+
59+
echo "Prime-RL integration tests completed!"

.buildkite/test-pipeline.yaml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,20 @@ steps:
164164
- tests/v1/test_internal_lb_dp.py
165165
- tests/v1/test_hybrid_lb_dp.py
166166
- tests/v1/engine/test_engine_core_client.py
167+
- tests/distributed/test_symm_mem_allreduce.py
167168
commands:
168-
# test with tp=2 and external_dp=2
169+
# test with torchrun tp=2 and external_dp=2
169170
- torchrun --nproc-per-node=4 distributed/test_torchrun_example.py
170-
# test with tp=2 and pp=2
171+
# test with torchrun tp=2 and pp=2
171172
- PP_SIZE=2 torchrun --nproc-per-node=4 distributed/test_torchrun_example.py
173+
# test with torchrun tp=4 and dp=1
174+
- TP_SIZE=4 torchrun --nproc-per-node=4 distributed/test_torchrun_example_moe.py
175+
# test with torchrun tp=2, pp=2 and dp=1
176+
- PP_SIZE=2 TP_SIZE=2 torchrun --nproc-per-node=4 distributed/test_torchrun_example_moe.py
177+
# test with torchrun tp=1 and dp=4 with ep
178+
- DP_SIZE=4 ENABLE_EP=1 torchrun --nproc-per-node=4 distributed/test_torchrun_example_moe.py
179+
# test with torchrun tp=2 and dp=2 with ep
180+
- TP_SIZE=2 DP_SIZE=2 ENABLE_EP=1 torchrun --nproc-per-node=4 distributed/test_torchrun_example_moe.py
172181
# test with internal dp
173182
- python3 ../examples/offline_inference/data_parallel.py --enforce-eager
174183
- TP_SIZE=2 DP_SIZE=2 pytest -v -s v1/test_async_llm_dp.py
@@ -180,6 +189,7 @@ steps:
180189
- pytest -v -s compile/test_basic_correctness.py
181190
- pytest -v -s distributed/test_pynccl.py
182191
- pytest -v -s distributed/test_events.py
192+
- pytest -v -s distributed/test_symm_mem_allreduce.py
183193
# TODO: create a dedicated test section for multi-GPU example tests
184194
# when we have multiple distributed example tests
185195
- pushd ../examples/offline_inference
@@ -321,6 +331,8 @@ steps:
321331
- python3 offline_inference/basic/classify.py
322332
- python3 offline_inference/basic/embed.py
323333
- python3 offline_inference/basic/score.py
334+
- python3 offline_inference/spec_decode.py --test --method eagle --num_spec_tokens 3 --dataset-name hf --dataset-path philschmid/mt-bench --num-prompts 80 --temp 0 --top-p 1.0 --top-k -1 --tp 1 --enable-chunked-prefill --max-model-len 2048
335+
- python3 offline_inference/spec_decode.py --test --method eagle3 --num_spec_tokens 3 --dataset-name hf --dataset-path philschmid/mt-bench --num-prompts 80 --temp 0 --top-p 1.0 --top-k -1 --tp 1 --enable-chunked-prefill --max-model-len 2048
324336

325337
- label: Platform Tests (CUDA) # 4min
326338
timeout_in_minutes: 15
@@ -875,6 +887,8 @@ steps:
875887
- tests/v1/test_external_lb_dp.py
876888
- tests/v1/entrypoints/openai/test_multi_api_servers.py
877889
- vllm/v1/engine/
890+
- vllm/v1/worker/
891+
- tests/v1/worker/test_worker_memory_snapshot.py
878892
commands:
879893
- TP_SIZE=1 DP_SIZE=2 pytest -v -s v1/test_async_llm_dp.py
880894
- TP_SIZE=1 DP_SIZE=2 pytest -v -s v1/test_external_lb_dp.py
@@ -896,6 +910,7 @@ steps:
896910
- CUDA_VISIBLE_DEVICES=0,1 pytest -v -s test_sharded_state_loader.py
897911
- CUDA_VISIBLE_DEVICES=0,1 pytest -v -s v1/shutdown
898912
- pytest -v -s models/multimodal/generation/test_maverick.py
913+
- pytest -v -s v1/worker/test_worker_memory_snapshot.py
899914

900915
- label: Plugin Tests (2 GPUs) # 40min
901916
timeout_in_minutes: 60
@@ -1029,3 +1044,16 @@ steps:
10291044
num_gpus: 2
10301045
commands:
10311046
- pytest -v -s tests/distributed/test_context_parallel.py
1047+
- pytest -v -s tests/distributed/test_nccl_symm_mem_allreduce.py
1048+
1049+
##### RL Integration Tests #####
1050+
- label: Prime-RL Integration Test # 15min
1051+
timeout_in_minutes: 30
1052+
optional: true
1053+
num_gpus: 2
1054+
working_dir: "/vllm-workspace"
1055+
source_file_dependencies:
1056+
- vllm/
1057+
- .buildkite/scripts/run-prime-rl-test.sh
1058+
commands:
1059+
- bash .buildkite/scripts/run-prime-rl-test.sh

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ mkdocs.yaml @hmellor
7272
# Linting
7373
.markdownlint.yaml @hmellor
7474
.pre-commit-config.yaml @hmellor
75+
/tools/pre_commit @hmellor
7576

7677
# CPU
7778
/vllm/v1/worker/cpu* @bigPYJ1151

.github/ISSUE_TEMPLATE/750-RFC.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ body:
4343
Any other things you would like to mention.
4444
validations:
4545
required: false
46-
- type: markdown
47-
attributes:
48-
value: >
49-
Thanks for contributing 🎉! The vLLM core team hosts a biweekly RFC review session at 9:30AM Pacific Time, while most RFCs can be discussed online, you can optionally sign up for a slot to discuss your RFC online [here](https://docs.google.com/document/d/1CiLVBZeIVfR7_PNAKVSusxpceywkoOOB78qoWqHvSZc/edit).
5046
- type: checkboxes
5147
id: askllm
5248
attributes:

.pre-commit-config.yaml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -60,38 +60,32 @@ repos:
6060
files: ^requirements/test\.(in|txt)$
6161
- id: mypy-local
6262
name: Run mypy for local Python installation
63-
entry: tools/mypy.sh 0 "local"
64-
language: python
65-
types: [python]
66-
additional_dependencies: &mypy_deps [mypy==1.11.1, types-cachetools, types-setuptools, types-PyYAML, types-requests, pydantic]
63+
entry: python tools/pre_commit/mypy.py 0 "local"
6764
stages: [pre-commit] # Don't run in CI
65+
<<: &mypy_common
66+
language: python
67+
types_or: [python, pyi]
68+
require_serial: true
69+
additional_dependencies: [mypy==1.11.1, regex, types-cachetools, types-setuptools, types-PyYAML, types-requests, types-torch, pydantic]
6870
- id: mypy-3.9 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
6971
name: Run mypy for Python 3.9
70-
entry: tools/mypy.sh 1 "3.9"
71-
language: python
72-
types: [python]
73-
additional_dependencies: *mypy_deps
72+
entry: python tools/pre_commit/mypy.py 1 "3.9"
73+
<<: *mypy_common
7474
stages: [manual] # Only run in CI
7575
- id: mypy-3.10 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
7676
name: Run mypy for Python 3.10
77-
entry: tools/mypy.sh 1 "3.10"
78-
language: python
79-
types: [python]
80-
additional_dependencies: *mypy_deps
77+
entry: python tools/pre_commit/mypy.py 1 "3.10"
78+
<<: *mypy_common
8179
stages: [manual] # Only run in CI
8280
- id: mypy-3.11 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
8381
name: Run mypy for Python 3.11
84-
entry: tools/mypy.sh 1 "3.11"
85-
language: python
86-
types: [python]
87-
additional_dependencies: *mypy_deps
82+
entry: python tools/pre_commit/mypy.py 1 "3.11"
83+
<<: *mypy_common
8884
stages: [manual] # Only run in CI
8985
- id: mypy-3.12 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
9086
name: Run mypy for Python 3.12
91-
entry: tools/mypy.sh 1 "3.12"
92-
language: python
93-
types: [python]
94-
additional_dependencies: *mypy_deps
87+
entry: python tools/pre_commit/mypy.py 1 "3.12"
88+
<<: *mypy_common
9589
stages: [manual] # Only run in CI
9690
- id: shellcheck
9791
name: Lint shell scripts
@@ -155,11 +149,10 @@ repos:
155149
additional_dependencies: [regex]
156150
- id: check-pickle-imports
157151
name: Prevent new pickle/cloudpickle imports
158-
entry: python tools/check_pickle_imports.py
152+
entry: python tools/pre_commit/check_pickle_imports.py
159153
language: python
160154
types: [python]
161-
pass_filenames: false
162-
additional_dependencies: [pathspec, regex]
155+
additional_dependencies: [regex]
163156
- id: validate-config
164157
name: Validate configuration has default values and that each field has a docstring
165158
entry: python tools/validate_config.py

.readthedocs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ build:
1313

1414
mkdocs:
1515
configuration: mkdocs.yaml
16+
fail_on_warning: true
1617

1718
# Optionally declare the Python requirements required to build your docs
1819
python:

benchmarks/auto_tune/auto_tune.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,15 @@ start_server() {
103103
VLLM_USE_V1=1 VLLM_SERVER_DEV_MODE=1 \
104104
vllm serve "${common_args_array[@]}" > "$vllm_log" 2>&1 &
105105
fi
106+
local server_pid=$!
106107

107108
# wait for 10 minutes...
108109
server_started=0
109110
for i in {1..60}; do
111+
# This line checks whether the server is still alive or not,
112+
# since that we should always have permission to send signal to the server process.
113+
kill -0 $server_pid 2> /dev/null || break
114+
110115
RESPONSE=$(curl -s -X GET "http://0.0.0.0:8004/health" -w "%{http_code}" -o /dev/stdout)
111116
STATUS_CODE=$(echo "$RESPONSE" | tail -n 1)
112117
if [[ "$STATUS_CODE" -eq 200 ]]; then
@@ -118,7 +123,7 @@ start_server() {
118123
done
119124

120125
if (( ! server_started )); then
121-
echo "server did not start within 10 minutes. Please check server log at $vllm_log".
126+
echo "server did not start within 10 minutes or crashed. Please check server log at $vllm_log".
122127
return 1
123128
else
124129
return 0

benchmarks/benchmark_serving_structured_output.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,8 @@ async def benchmark(
449449
def prepare_extra_body(request) -> dict:
450450
extra_body = {}
451451
# Add the schema to the extra_body
452-
extra_body[request.structure_type] = request.schema
452+
extra_body["structured_outputs"] = {}
453+
extra_body["structured_outputs"][request.structure_type] = request.schema
453454
return extra_body
454455

455456
print("Starting initial single prompt test run...")

0 commit comments

Comments
 (0)