From 740f0647b1d1cff7d2def13179b92e0452c9cb46 Mon Sep 17 00:00:00 2001 From: Harry Mellor <19981378+hmellor@users.noreply.github.com> Date: Mon, 15 Sep 2025 17:43:40 +0100 Subject: [PATCH] Reinstate existing torch script (#24729) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> --- use_existing_torch.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/use_existing_torch.py b/use_existing_torch.py index b5aafdde16c28..76480f3e58fee 100644 --- a/use_existing_torch.py +++ b/use_existing_torch.py @@ -1,5 +1,21 @@ # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project -print("vLLM is now using 'uv' to disable build isolation for 'torch'.") -print("Please instead install vLLM with 'uv pip install -e .' (must use 'uv')") +import glob + +requires_files = glob.glob('requirements/*.txt') +requires_files += ["pyproject.toml"] +for file in requires_files: + print(f">>> cleaning {file}") + with open(file) as f: + lines = f.readlines() + if "torch" in "".join(lines).lower(): + print("removed:") + with open(file, 'w') as f: + for line in lines: + if 'torch' not in line.lower(): + f.write(line) + else: + print(line.strip()) + print(f"<<< done cleaning {file}") + print() \ No newline at end of file