[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,34 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
"""
|
||||
Generates specialized requirements files for nightly PyTorch testing.
|
||||
|
||||
This script reads the main test requirements input file (`requirements/test.in`)
|
||||
and splits its content into two files:
|
||||
1. `requirements/nightly_torch_test.txt`: Contains dependencies
|
||||
except PyTorch-related.
|
||||
2. `torch_nightly_test.txt`: Contains only PyTorch-related packages.
|
||||
"""
|
||||
|
||||
input_file = "requirements/test.in"
|
||||
output_file = "requirements/nightly_torch_test.txt"
|
||||
|
||||
# white list of packages that are not compatible with PyTorch nightly directly
|
||||
# with pip install. Please add your package to this list if it is not compatible
|
||||
# or make the dependency test fails.
|
||||
white_list = ["torch", "torchaudio", "torchvision", "mamba_ssm"]
|
||||
|
||||
with open(input_file) as f:
|
||||
lines = f.readlines()
|
||||
|
||||
skip_next = False
|
||||
|
||||
for line in lines:
|
||||
if skip_next:
|
||||
if line.startswith((" ", "\t")) or line.strip() == "":
|
||||
continue
|
||||
skip_next = False
|
||||
|
||||
if any(k in line.lower() for k in white_list):
|
||||
skip_next = True
|
||||
continue
|
||||
Reference in New Issue
Block a user