Skip to content

Feature needed: TorchFix should understand statically types types #38

Open
@kit1980

Description

@kit1980

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions