Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use more numerically stable log1p in examples/scanvi/scanvi.py #3397

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

kit1980
Copy link
Contributor

@kit1980 kit1980 commented Sep 18, 2024

@ordabayevy
Copy link
Member

Thank you for the fix! Interesting tool. Was this the only autofix found by TorchFix?

@ordabayevy ordabayevy merged commit e914e19 into pyro-ppl:dev Sep 18, 2024
9 checks passed
@kit1980
Copy link
Contributor Author

kit1980 commented Sep 18, 2024

For this specific rule TorchFix has only linter, not autofix.
So the issue was found by the tool, and I changed the code manually.

@kit1980
Copy link
Contributor Author

kit1980 commented Sep 18, 2024

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

@ordabayevy ordabayevy mentioned this pull request Sep 19, 2024
@ordabayevy
Copy link
Member

Thank you! I've made a PR with the fixes for deprecated torch functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants