[BE]: Update ruff to 0.11.8 (#153249)

Fixes a ton of false negatives throughout the codebase. RUFF also properly validates NOQA comments now and most of the changes are fixing typos there or removing filewide flake8 suppressions that were also silencing ruff issues.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/153249
Approved by: https://github.com/cyyever, https://github.com/albanD, https://github.com/seemethere
This commit is contained in:
Aaron Gokaslan
2025-05-12 18:30:48 +00:00
committed by PyTorch MergeBot
parent 5c3fddb9cc
commit 3555ebb63d
43 changed files with 235 additions and 188 deletions

View File

@ -8,6 +8,8 @@ import pandas as pd
from torch._functorch.benchmark_utils import compute_utilization
log = logging.getLogger(__name__)
# process the chrome traces output by the pytorch profiler
# require the json input file's name to be in format {model_name}_chrome_trace_*.json
# the runtimes file should have format (model_name, runtime)
@ -65,7 +67,7 @@ def main():
)
print(f"{modelname}, {utilization}, {mm_conv_utilization}")
except BaseException:
logging.exception("%s, ERROR", filename)
log.exception("%s, ERROR", filename)
print(f"{filename}, ERROR")