[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>
This commit is contained in:
co-authored by
Concurrensee
gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Cyrus Leung
Nick Hill
parent
0740e29b66
commit
8b64c895c0
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
# This script tests if the nightly torch packages are not overridden by the dependencies
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
cd /vllm-workspace/
|
||||
|
||||
rm -rf .venv
|
||||
|
||||
uv venv .venv
|
||||
|
||||
source .venv/bin/activate
|
||||
|
||||
# check the environment
|
||||
uv pip freeze
|
||||
|
||||
echo ">>> Installing nightly torch packages"
|
||||
uv pip install --quiet torch torchvision torchaudio --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu128
|
||||
|
||||
echo ">>> Capturing torch-related versions before requirements install"
|
||||
uv pip freeze | grep -E '^torch|^torchvision|^torchaudio' | sort > before.txt
|
||||
echo "Before:"
|
||||
cat before.txt
|
||||
|
||||
echo ">>> Installing requirements/nightly_torch_test.txt"
|
||||
uv pip install --quiet -r requirements/nightly_torch_test.txt
|
||||
|
||||
echo ">>> Capturing torch-related versions after requirements install"
|
||||
uv pip freeze | grep -E '^torch|^torchvision|^torchaudio' | sort > after.txt
|
||||
echo "After:"
|
||||
cat after.txt
|
||||
|
||||
echo ">>> Comparing versions"
|
||||
if diff before.txt after.txt; then
|
||||
echo "torch version not overridden."
|
||||
else
|
||||
echo "torch version overridden by nightly_torch_test.txt, \
|
||||
if the dependency is not triggered by the pytroch nightly test,\
|
||||
please add the dependency to the list 'white_list' in tools/generate_nightly_torch_test.py"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user