Skip to content

Commit

Permalink
Fix ruff and make sure pre-commit is at same version (#1658)
Browse files Browse the repository at this point in the history
stack-info: PR: #1658, branch: drisspg/stack/32
  • Loading branch information
drisspg authored Feb 4, 2025
1 parent 6ffe236 commit 7e54629
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.6
rev: v0.6.8
hooks:
# Run the linter.
- id: ruff
Expand Down
4 changes: 3 additions & 1 deletion torchao/quantization/quant_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,9 @@ def _linear_extra_repr(self):
return f"in_features={self.weight.shape[1]}, out_features={self.weight.shape[0]}, weight={_quantization_type(self.weight)}"


def _get_linear_subclass_inserter(constructor, *, allow_requires_grad=False, propagate_bias=False, **kwargs):
def _get_linear_subclass_inserter(
constructor, *, allow_requires_grad=False, propagate_bias=False, **kwargs
):
"""Helper function to apply the constructor that quantizes the weight Tensor (with additional kwargs)
to the weight of linear module
"""
Expand Down

0 comments on commit 7e54629

Please sign in to comment.