Closed kit1980 closed 2 months ago
Thank you for the fix! Interesting tool. Was this the only autofix found by TorchFix?
For this specific rule TorchFix has only linter, not autofix. So the issue was found by the tool, and I changed the code manually.
TorchFix finds several deprecated API usages in pyro:
pyro/distributions/omt_mvn.py:71:19: TOR101 Use of deprecated function torch.svd
pyro/distributions/transforms/householder.py:32:16: TOR101 Use of deprecated function torch.norm
pyro/distributions/transforms/sylvester.py:95:19: TOR101 [*] Use of deprecated function torch.ger
pyro/distributions/transforms/sylvester.py:99:62: TOR101 [*] Use of deprecated function torch.ger
pyro/ops/welford.py:36:25: TOR101 [*] Use of deprecated function torch.ger
pyro/ops/welford.py:75:43: TOR101 [*] Use of deprecated function torch.ger
tests/infer/test_sampling.py:81:25: TOR101 Use of deprecated function torch.norm
tests/infer/test_sampling.py:83:16: TOR101 Use of deprecated function torch.norm
tests/infer/test_sampling.py:92:25: TOR101 Use of deprecated function torch.norm
tests/infer/test_sampling.py:94:16: TOR101 Use of deprecated function torch.norm
tests/ops/test_linalg.py:46:16: TOR101 Use of deprecated function torch.triangular_solve
tests/ops/test_linalg.py:59:16: TOR101 Use of deprecated function torch.triangular_solve
tests/poutine/test_poutines.py:28:12: TOR101 Use of deprecated function torch.norm
Thank you! I've made a PR with the fixes for deprecated torch functions.
Found using TorchFix https://github.com/pytorch-labs/torchfix/