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

Feature needed: TorchFix should understand statically types types #38

Open
kit1980 opened this issue Apr 13, 2024 · 0 comments
Open

Feature needed: TorchFix should understand statically types types #38

kit1980 opened this issue Apr 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@kit1980
Copy link
Contributor

kit1980 commented Apr 13, 2024

TorchFix should understand statically types of the objects. This feature will enable more rules and more precise targeting for the existing rules. The implementation will require adoption of Pyre and LibCST’s TypeInferenceProvider. The feature will likely be optional as running Pyre may be a barrier for some users.

As an example, currently TorchFix will understand that this qr is a deprecated function here:

import torch
torch.tensor([[1.0], [2.0]])
torch.qr(a)

But not when using method notation - a.qr() - because TorchFix doesn't understand statically that a is a PyTorch tensor, maybe it's some unrelated object that just happens to have a method named qr.

@sbrugman sbrugman added the enhancement New feature or request label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants