[CI] Add nightly Python 3.14 smoke test (#60456)
Signed-off-by: mgoin <mgoin64@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
12e6a585ae
commit
45bb710eca
@@ -446,6 +446,17 @@ steps:
|
|||||||
- setup.py
|
- setup.py
|
||||||
- vllm/platforms/rocm.py
|
- vllm/platforms/rocm.py
|
||||||
|
|
||||||
|
- label: ":nvidia: (H200 MIG 18GB) Python 3.14 Smoke Nightly"
|
||||||
|
key: python-314-smoke-nightly
|
||||||
|
depends_on: ~
|
||||||
|
optional: true
|
||||||
|
timeout_in_minutes: 30
|
||||||
|
device: h200_18gb
|
||||||
|
source_file_dependencies:
|
||||||
|
- tests/standalone_tests/python_only_compile.sh
|
||||||
|
commands:
|
||||||
|
- PYTHON_ONLY_COMPILE_PYTHON=3.14 bash standalone_tests/python_only_compile.sh
|
||||||
|
|
||||||
- label: ":nvidia: (H200 MIG 35GB) Async Engine, Inputs, Utils, Worker"
|
- label: ":nvidia: (H200 MIG 35GB) Async Engine, Inputs, Utils, Worker"
|
||||||
device: h200_35gb
|
device: h200_35gb
|
||||||
key: async-engine-inputs-utils-worker
|
key: async-engine-inputs-utils-worker
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# This script tests if the python only compilation works correctly
|
# This script tests if the python only compilation works correctly
|
||||||
# for users who do not have any compilers installed on their system
|
# for users who do not have any compilers installed on their system
|
||||||
|
#
|
||||||
|
# Set PYTHON_ONLY_COMPILE_PYTHON (e.g. 3.14) to install into a fresh uv venv
|
||||||
|
# with that interpreter and run a short generation, as a smoke test for
|
||||||
|
# Python versions other than the one the CI image is built with.
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -173,9 +177,12 @@ elif [[ ! -d vllm ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# remove all compilers
|
# remove all compilers, except for the smoke test, whose generation needs a
|
||||||
apt remove --purge build-essential -y
|
# C compiler at runtime for torch.compile and Triton
|
||||||
apt autoremove -y
|
if [[ -z "${PYTHON_ONLY_COMPILE_PYTHON:-}" ]]; then
|
||||||
|
apt remove --purge build-essential -y
|
||||||
|
apt autoremove -y
|
||||||
|
fi
|
||||||
|
|
||||||
rm -f /tmp/changed.file
|
rm -f /tmp/changed.file
|
||||||
echo 'import os; os.system("touch /tmp/changed.file")' >> vllm/__init__.py
|
echo 'import os; os.system("touch /tmp/changed.file")' >> vllm/__init__.py
|
||||||
@@ -185,12 +192,42 @@ if [[ -n "${rocm_wheel}" ]]; then
|
|||||||
VLLM_PRECOMPILED_WHEEL_LOCATION="${rocm_wheel}" VLLM_USE_PRECOMPILED=1 python3 setup.py develop --no-deps
|
VLLM_PRECOMPILED_WHEEL_LOCATION="${rocm_wheel}" VLLM_USE_PRECOMPILED=1 python3 setup.py develop --no-deps
|
||||||
elif [[ "${is_rocm}" == "1" ]]; then
|
elif [[ "${is_rocm}" == "1" ]]; then
|
||||||
VLLM_PRECOMPILED_WHEEL_COMMIT=$merge_base_commit VLLM_USE_PRECOMPILED=1 python3 setup.py develop --no-deps
|
VLLM_PRECOMPILED_WHEEL_COMMIT=$merge_base_commit VLLM_USE_PRECOMPILED=1 python3 setup.py develop --no-deps
|
||||||
|
elif [[ -n "${PYTHON_ONLY_COMPILE_PYTHON:-}" ]]; then
|
||||||
|
# Use the CUDA build the image's own torch was installed with, for both the
|
||||||
|
# new venv's torch and the precompiled wheel variant.
|
||||||
|
cuda_variant="$(python3 -c 'import torch; print("cu" + torch.version.cuda.replace(".", ""))')"
|
||||||
|
uv venv --python "${PYTHON_ONLY_COMPILE_PYTHON}" /tmp/python-only-venv
|
||||||
|
source /tmp/python-only-venv/bin/activate
|
||||||
|
VLLM_PRECOMPILED_WHEEL_COMMIT=$merge_base_commit VLLM_USE_PRECOMPILED=1 \
|
||||||
|
VLLM_PRECOMPILED_WHEEL_VARIANT="${cuda_variant}" \
|
||||||
|
uv pip install -e . --torch-backend="${cuda_variant}"
|
||||||
else
|
else
|
||||||
VLLM_PRECOMPILED_WHEEL_COMMIT=$merge_base_commit VLLM_USE_PRECOMPILED=1 pip3 install -vvv -e .
|
VLLM_PRECOMPILED_WHEEL_COMMIT=$merge_base_commit VLLM_USE_PRECOMPILED=1 pip3 install -vvv -e .
|
||||||
fi
|
fi
|
||||||
# Run the script
|
# Run the script
|
||||||
python3 -c 'import vllm'
|
python3 -c 'import vllm'
|
||||||
|
|
||||||
|
if [[ -n "${PYTHON_ONLY_COMPILE_PYTHON:-}" ]]; then
|
||||||
|
python3 - <<'PY'
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from vllm import LLM
|
||||||
|
|
||||||
|
expected = os.environ["PYTHON_ONLY_COMPILE_PYTHON"]
|
||||||
|
actual = f"{sys.version_info.major}.{sys.version_info.minor}"
|
||||||
|
assert actual == expected, f"expected Python {expected}, got {actual}"
|
||||||
|
|
||||||
|
llm = LLM(
|
||||||
|
"hmellor/tiny-random-LlamaForCausalLM",
|
||||||
|
max_model_len=256,
|
||||||
|
gpu_memory_utilization=0.3,
|
||||||
|
)
|
||||||
|
outputs = llm.generate(["Hello, my name is"])
|
||||||
|
assert outputs[0].outputs[0].token_ids, "no tokens generated"
|
||||||
|
PY
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if the clangd log file was created
|
# Check if the clangd log file was created
|
||||||
if [ ! -f /tmp/changed.file ]; then
|
if [ ! -f /tmp/changed.file ]; then
|
||||||
echo "ERROR: changed.file was not created, python only compilation failed"
|
echo "ERROR: changed.file was not created, python only compilation failed"
|
||||||
|
|||||||
Reference in New Issue
Block a user