Enable all flake8-logging-format rules (#164655)

These rules are enabled by removing existing suppressions.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/164655
Approved by: https://github.com/janeyx99, https://github.com/mlazos
This commit is contained in:
Yuanyuan Chen
2025-10-19 00:59:28 +00:00
committed by PyTorch MergeBot
parent c4f6619330
commit 3255e7872b
55 changed files with 131 additions and 140 deletions

View File

@ -1702,7 +1702,7 @@ class TritonTemplate(KernelTemplate):
choices.append(choice)
return None
except NotImplementedError as e:
log.info(
log.info( # noqa: G200
"Cannot Append Choice: %s. KernelTemplate type is %s",
e,
type(self),
@ -3223,17 +3223,16 @@ class AlgorithmSelectorCache(PersistentCache):
for choice in choices:
try:
timing = cls.benchmark_choice(choice, autotune_args)
except CUDACompileError as e:
except CUDACompileError:
from torch._inductor.codegen.cuda.cuda_kernel import CUDATemplateCaller
if not isinstance(choice, CUDATemplateCaller):
log.error(
"CUDA compilation error during autotuning: \n%s. \nIgnoring this choice.",
e,
log.exception(
"CUDA compilation error during autotuning: \n%s. \nIgnoring this choice."
)
timing = float("inf")
except NotImplementedError as e:
log.warning("Not yet implemented: %s", e)
except NotImplementedError:
log.warning("Not yet implemented", exc_info=True)
timing = float("inf")
except RuntimeError as e:
from torch._inductor.codegen.cuda.cuda_kernel import CUDATemplateCaller
@ -3266,7 +3265,7 @@ class AlgorithmSelectorCache(PersistentCache):
from triton.runtime.autotuner import OutOfResources
if isinstance(e, OutOfResources):
log.warning(e)
log.warning(e) # noqa: G200
timing = float("inf")
else:
raise e