@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 8b64c895c0
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 04:45 UTC

[CI] Sync test dependency with test.in for torch nightly (#19632)

Signed-off-by: Yang Wang <elainewy@meta.com> Signed-off-by: Yida Wu <yidawu@alumni.cmu.edu> Signed-off-by: Nick Hill <nhill@redhat.com> Co-authored-by: Concurrensee <yida.wu@amd.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: Nick Hill <nhill@redhat.com>

Yang Wang committed Jun 26, 2025 at 20:55 UTC 8b64c895c0c05d83458f1af67f81060d699d2526
6 files changed +131 -36
.buildkite/test-pipeline.yaml
+11 -1
@@ -41,6 +41,16 @@ steps:
41 # TODO: add `--strict` once warnings in docstrings are fixed
42 - mkdocs build
43
44 +- label: Pytorch Nightly Dependency Override Check # 2min
45 + # if this test fails, it means the nightly torch version is not compatible with some
46 + # of the dependencies. Please check the error message and add the package to whitelist
47 + # in /vllm/tools/generate_nightly_torch_test.py
48 + soft_fail: true
49 + source_file_dependencies:
50 + - requirements/nightly_torch_test.txt
51 + commands:
52 + - bash standalone_tests/pytorch_nightly_dependency.sh
53 +
54 - label: Async Engine, Inputs, Utils, Worker Test # 24min
55 mirror_hardwares: [amdexperimental]
56 source_file_dependencies:
@@ -767,7 +777,7 @@ steps:
777 - bash weight_loading/run_model_weight_loading_test.sh -c weight_loading/models.txt
778
779 - label: Weight Loading Multiple GPU Test - Large Models # optional
770 - mirror_hardwares: [amdexperimental]
780 + mirror_hardwares: [amdexperimental]
781 working_dir: "/vllm-workspace/tests"
782 num_gpus: 2
783 gpu: a100
.pre-commit-config.yaml
+5
@@ -53,6 +53,11 @@ repos:
53 files: ^requirements/test\.(in|txt)$
54 - repo: local
55 hooks:
56 + - id: format-torch-nightly-test
57 + name: reformat nightly_torch_test.txt to be in sync with test.in
58 + language: python
59 + entry: python tools/generate_nightly_torch_test.py
60 + files: ^requirements/test\.(in|txt)$
61 - id: mypy-local
62 name: Run mypy for local Python installation
63 entry: tools/mypy.sh 0 "local"
requirements/nightly_torch_test.txt
+37 -34
@@ -1,47 +1,50 @@
1 -# Dependency that able to run entrypoints test
2 -# pytest and its extensions
1 +# testing
2 pytest
4 -pytest-asyncio
3 +tensorizer>=2.9.0
4 pytest-forked
6 -pytest-mock
5 +pytest-asyncio
6 pytest-rerunfailures
7 pytest-shard
8 pytest-timeout
9
11 -librosa # required by audio tests in entrypoints/openai
12 -sentence-transformers # required for embedding tests
13 -transformers==4.52.4
14 -transformers_stream_generator # required for qwen-vl test
15 -numba == 0.61.2; python_version > '3.9'
10 # testing utils
17 -boto3
18 -botocore
19 -datasets
20 -ray >= 2.10.0
11 +backoff # required for phi4mm test
12 +blobfile # required for kimi-vl test
13 +einops # required for MPT, qwen-vl and Mamba
14 +httpx
15 +librosa # required for audio tests
16 +vocos # required for minicpmo_26 test
17 peft
22 -runai-model-streamer==0.11.0
23 -runai-model-streamer-s3==0.11.0
24 -tensorizer>=2.9.0
25 -lm-eval==0.4.8
26 -buildkite-test-collector==0.1.9
18 +pqdm
19 +ray[cgraph,default]>=2.43.0, !=2.44.* # Ray Compiled Graph, required by pipeline parallelism tests
20 +sentence-transformers # required for embedding tests
21 +soundfile # required for audio tests
22 +jiwer # required for audio tests
23 +timm # required for internvl test
24 +transformers_stream_generator # required for qwen-vl test
25 +matplotlib # required for qwen-vl test
26 +mistral_common[opencv] >= 1.6.2 # required for pixtral test
27 +num2words # required for smolvlm test
28 +opencv-python-headless >= 4.11.0 # required for video test
29 +datamodel_code_generator # required for minicpm3 test
30 lm-eval[api]==0.4.8 # required for model evaluation test
28 -
29 -# required for quantization test
31 +mteb>=1.38.11, <2 # required for mteb test
32 +transformers==4.52.4
33 +tokenizers==0.21.1
34 +huggingface-hub[hf_xet]>=0.30.0 # Required for Xet downloads.
35 +schemathesis>=3.39.15 # Required for openai schema test.
36 +# quantization
37 bitsandbytes>=0.45.3
38 +buildkite-test-collector==0.1.9
39
32 -# required for minicpmo_26 test
33 -vector_quantize_pytorch
34 -vocos
35 -
36 -# required for Basic Models Test
37 -blobfile # required for kimi-vl test
38 -matplotlib # required for qwen-vl test
40
40 -# required for Multi-Modal Models Test (Standard)
41 -num2words # required for smolvlm test
42 -pqdm
43 -timm # required for internvl test
44 -mistral-common==1.6.2
41 +genai_perf==0.0.8
42 +tritonclient==2.51.0
43
46 -schemathesis==3.39.15 # Required for openai schema test.
47 -mteb>=1.38.11, <2 # required for mteb test
44 +numba == 0.60.0; python_version == '3.9' # v0.61 doesn't support Python 3.9. Required for N-gram speculative decoding
45 +numba == 0.61.2; python_version > '3.9'
46 +numpy
47 +runai-model-streamer==0.11.0
48 +runai-model-streamer-s3==0.11.0
49 +fastsafetensors>=0.1.10
50 +pydantic>=2.10 # 2.9 leads to error on python 3.10
requirements/test.in
+2 -1
@@ -42,6 +42,7 @@ schemathesis>=3.39.15 # Required for openai schema test.
42 bitsandbytes>=0.45.3
43 buildkite-test-collector==0.1.9
44
45 +
46 genai_perf==0.0.8
47 tritonclient==2.51.0
48
@@ -51,4 +52,4 @@ numpy
52 runai-model-streamer==0.11.0
53 runai-model-streamer-s3==0.11.0
54 fastsafetensors>=0.1.10
54 -pydantic>=2.10 # 2.9 leads to error on python 3.10
\ No newline at end of file
55 +pydantic>=2.10 # 2.9 leads to error on python 3.10
tests/standalone_tests/pytorch_nightly_dependency.sh new
+42
@@ -0,0 +1,42 @@
1 +#!/bin/sh
2 +# This script tests if the nightly torch packages are not overridden by the dependencies
3 +
4 +set -e
5 +set -x
6 +
7 +cd /vllm-workspace/
8 +
9 +rm -rf .venv
10 +
11 +uv venv .venv
12 +
13 +source .venv/bin/activate
14 +
15 +# check the environment
16 +uv pip freeze
17 +
18 +echo ">>> Installing nightly torch packages"
19 +uv pip install --quiet torch torchvision torchaudio --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu128
20 +
21 +echo ">>> Capturing torch-related versions before requirements install"
22 +uv pip freeze | grep -E '^torch|^torchvision|^torchaudio' | sort > before.txt
23 +echo "Before:"
24 +cat before.txt
25 +
26 +echo ">>> Installing requirements/nightly_torch_test.txt"
27 +uv pip install --quiet -r requirements/nightly_torch_test.txt
28 +
29 +echo ">>> Capturing torch-related versions after requirements install"
30 +uv pip freeze | grep -E '^torch|^torchvision|^torchaudio' | sort > after.txt
31 +echo "After:"
32 +cat after.txt
33 +
34 +echo ">>> Comparing versions"
35 +if diff before.txt after.txt; then
36 + echo "torch version not overridden."
37 +else
38 + echo "torch version overridden by nightly_torch_test.txt, \
39 + if the dependency is not triggered by the pytroch nightly test,\
40 + please add the dependency to the list 'white_list' in tools/generate_nightly_torch_test.py"
41 + exit 1
42 +fi
tools/generate_nightly_torch_test.py new
+34
@@ -0,0 +1,34 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 +"""
4 +Generates specialized requirements files for nightly PyTorch testing.
5 +
6 +This script reads the main test requirements input file (`requirements/test.in`)
7 +and splits its content into two files:
8 +1. `requirements/nightly_torch_test.txt`: Contains dependencies
9 +except PyTorch-related.
10 +2. `torch_nightly_test.txt`: Contains only PyTorch-related packages.
11 +"""
12 +
13 +input_file = "requirements/test.in"
14 +output_file = "requirements/nightly_torch_test.txt"
15 +
16 +# white list of packages that are not compatible with PyTorch nightly directly
17 +# with pip install. Please add your package to this list if it is not compatible
18 +# or make the dependency test fails.
19 +white_list = ["torch", "torchaudio", "torchvision", "mamba_ssm"]
20 +
21 +with open(input_file) as f:
22 + lines = f.readlines()
23 +
24 +skip_next = False
25 +
26 +for line in lines:
27 + if skip_next:
28 + if line.startswith((" ", "\t")) or line.strip() == "":
29 + continue
30 + skip_next = False
31 +
32 + if any(k in line.lower() for k in white_list):
33 + skip_next = True
34 + continue