Skip to content

Commit 30177f1

Browse files
authored
use_existing_torch.py: filter out comments (#66)
See upstream PR: vllm-project/vllm#12255 Would like to merge the fix here asap though because it is breaking our images.
2 parents 9d534a7 + cba95f4 commit 30177f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

use_existing_torch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
print(f">>> cleaning {file}")
77
with open(file) as f:
88
lines = f.readlines()
9+
# filter out comments
10+
lines = [line.split(" #")[0] for line in lines]
911
if "torch" in "".join(lines).lower():
1012
print("removed:")
1113
with open(file, 'w') as f:

0 commit comments

Comments
 (0)