"docs/source/models/supported_models.md" did not exist on "07e981fdf43bb7a7186c782a5ad6b99b36c2fc19"
use_existing_torch.py 654 Bytes
Newer Older
1
# SPDX-License-Identifier: Apache-2.0
2
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3

4
5
import glob

6
requires_files = glob.glob('requirements/*.txt')
7
8
9
requires_files += ["pyproject.toml"]
for file in requires_files:
    print(f">>> cleaning {file}")
10
    with open(file) as f:
11
12
13
14
15
16
17
18
19
20
21
        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()