Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI][Misc] Add tests for python-only development #9370

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
remove docker exec/run
  • Loading branch information
cermeng committed Oct 21, 2024
commit 3c195471bb194af38432845cd12a0fa893214d4a
56 changes: 26 additions & 30 deletions .buildkite/run-code-dev-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,37 @@
set -ex
BUILDKITE_COMMIT=$BUILDKITE_COMMIT

# Setup cleanup
remove_docker_container() { docker rm -f vllm-dev-test || true; }
trap remove_docker_container EXIT
remove_docker_container
# Assume this test is in vllm ci test image which already install vllm
# Uninstall first for testing
pip uninstall -y vllm

# Use docker from building wheel stage
DOCKER_BUILDKIT=1 docker build --build-arg max_jobs=16 --build-arg USE_SCCACHE=1 --tag vllm-ci:dev --target base --progress plain .
docker run -dit --entrypoint /bin/bash --privileged=true --network host --name vllm-dev-test vllm-ci:dev
# Test directory
TEST_DIR=/tmp/vllm_test
mkdir -p ${TEST_DIR}

# Install vllm dev wheel (latest nightly wheel)
docker exec vllm-dev-test bash -c "
pip install https://vllm-wheels.s3.us-west-2.amazonaws.com/${BUILDKITE_COMMIT}/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl && \
pip install setuptools-scm"
# Install vllm dev wheel
pip install https://vllm-wheels.s3.us-west-2.amazonaws.com/${BUILDKITE_COMMIT}/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl && \
pip install setuptools-scm # Hack to generate __version.py

# Test python_only_dev.py
docker exec vllm-dev-test bash -c '
git clone https://github.com/vllm-project/vllm.git --no-checkout && \
cd vllm && \
git checkout ${BUILDKITE_COMMIT} && \
python3 python_only_dev.py && \
cd / && \
python3 -c "import vllm; print(vllm.__file__)"'
cd ${TEST_DIR} && \
git clone https://github.com/vllm-project/vllm.git --no-checkout && \
cd vllm && \
git checkout ${BUILDKITE_COMMIT} && \
python3 python_only_dev.py && \
cd / && \
python3 -c "import vllm; print(vllm.__file__)"

# Test code change
docker exec vllm-dev-test bash -c '
cd vllm && \
echo "test_var=123456" > vllm/fake_module.py && \
cd / && \
python3 -c "import vllm.fake_module; print(vllm.fake_module.test_var)"'
cd ${TEST_DIR}/vllm && \
echo "test_var=123456" > vllm/fake_module.py && \
cd / && \
python3 -c "import vllm.fake_module; print(vllm.fake_module.test_var)"

# Test uninstall/updateing condition
docker exec vllm-dev-test bash -c "
cd vllm && \
python3 python_only_dev.py --quit-dev && \
cd / && \
pip uninstall -y vllm && \
pip install https://vllm-wheels.s3.us-west-2.amazonaws.com/${BUILDKITE_COMMIT}/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl && \
pip show vllm"
cd ${TEST_DIR}/vllm && \
python3 python_only_dev.py --quit-dev && \
cd / && \
pip uninstall -y vllm && \
pip install https://vllm-wheels.s3.us-west-2.amazonaws.com/${BUILDKITE_COMMIT}/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl && \
pip show vllm
5 changes: 5 additions & 0 deletions .buildkite/test-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ steps:
# Check API reference (if it fails, you may have missing mock imports)
- grep \"sig sig-object py\" build/html/dev/sampling_params.html

- label: Python-only Development Script Test
fast_check: true
commands:
- bash run-code-dev-test.sh

- label: Async Engine, Inputs, Utils, Worker Test # 24min
fast_check: true
source_file_dependencies:
Expand Down