Pyrefly suppressions 4/n (#164615)

Adds suppressions to pyrefly will typecheck clean: https://github.com/pytorch/pytorch/issues/163283

Test plan:
dmypy restart && python3 scripts/lintrunner.py -a
pyrefly check

step 1: uncomment lines in the pyrefly.toml file
step 2: run pyrefly check
step 3: add suppressions, clean up unused suppressions
before: https://gist.github.com/maggiemoss/356645cf8cfe33123d9a27f23b30f7b1

after:

0 errors (2,753 ignored)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/164615
Approved by: https://github.com/oulgen
This commit is contained in:
Maggie Moss
2025-10-06 16:14:36 +00:00
committed by PyTorch MergeBot
parent 4bd1505f84
commit 4ab847bbc7
52 changed files with 293 additions and 21 deletions

View File

@ -322,6 +322,7 @@ def _single_tensor_radam(
rho_t = rho_inf - 2 * step * (beta2**step) / bias_correction2
def _compute_rect():
# pyrefly: ignore # unsupported-operation
return (
(rho_t - 4)
* (rho_t - 2)
@ -336,6 +337,7 @@ def _single_tensor_radam(
else:
exp_avg_sq_sqrt = exp_avg_sq_sqrt.add_(eps)
# pyrefly: ignore # unsupported-operation
return (bias_correction2**0.5) / exp_avg_sq_sqrt
# Compute the variance rectification term and update parameters accordingly