torchfix icon indicating copy to clipboard operation
torchfix copied to clipboard

TorchFix - a linter for PyTorch-using code with autofix support

Results 15 torchfix issues
Sort by recently updated
recently updated
newest added

See https://github.com/pytorch/pytorch/issues/125050 for details. This will require passing file path as an input to the rules. In general it doesn't make too much sense, but for PyTorch-internal rule like TOR901...

enhancement

Addresses https://github.com/pytorch-labs/torchfix/issues/4

CLA Signed

As described in https://github.com/pytorch/test-infra/pull/4559#discussion_r1319881628 It will be just a linter, not a codemod, as it's not possible to determine the desired value statically.

good first issue
new check

Add a doc (probably just part of README) listing all available error types with codes and explanations. Then add a test that the doc has the info for the error...

documentation
good first issue

Inside a model definition, the `torch.nn.Module` objects inside a Python list do not get their parameters registered. Hence such parameters do not get trained by the optimizer, even though they...

good first issue
new check

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...

enhancement

Today, use_reentrant defaults to True, but TOR003 sets use_reentrant=False which may subtly differ in behavior in certain cases. We should either make TOR003 set use_reentrant=True, or not run it by...

Currently TorchFix tries to follow latest PyTorch main for things like deprecated APIs. This is not ideal for people who want to use a specific release, for example. So every...

enhancement

``` b = torch.zeros_like(a) ``` should be preferred over ``` b = torch.zeros(...).to(a) ``` to avoid copies.

new check

Add documentation for the rules to the https://github.com/pytorch-labs/torchfix/blob/main/README.md, see the existing file for examples. If you what to work on a task, please comment on this issue and link your...

documentation
docathon-h1-2024
easy