diff --git a/use_existing_torch.py b/use_existing_torch.py index 319d262898fe3..4138b93e67d42 100644 --- a/use_existing_torch.py +++ b/use_existing_torch.py @@ -6,6 +6,8 @@ print(f">>> cleaning {file}") with open(file) as f: lines = f.readlines() + # filter out comments + lines = [ line.split(" #")[0] for line in lines ] if "torch" in "".join(lines).lower(): print("removed:") with open(file, 'w') as f: