Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryzh168 committed Jan 3, 2025
1 parent ca3c540 commit a463397
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruff_linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
# --isolated is used to skip the allowlist at all so this applies to all files
# please be careful when using this large changes means everyone needs to rebase
# if you do be sure to update .pre-commit-config.yaml
ruff check --isolated --select F821,F823,W191
ruff check --isolated --select F821,F823,W191,E731
ruff check
ruff format --check || {
echo "Ruff check failed, please try again after running 'ruff format'."
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ repos:
alias: ruff-isolated
args:
- --isolated
- select F821,F823,W191
- --select
- F821,F823,W191
8 changes: 7 additions & 1 deletion torchao/quantization/autoquant.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,9 @@ def from_float(cls, weight):

# avoid circular dep
from torchao.dtypes import to_affine_quantized_intx
from torchao.quantization.quant_api import _int8_symm_per_token_reduced_range_quant
from torchao.quantization.quant_api import (
_int8_symm_per_token_reduced_range_quant,
)

# input settings
input_quant_func = _int8_symm_per_token_reduced_range_quant
Expand Down Expand Up @@ -1270,3 +1272,7 @@ def finalize_autoquant():
model(*example_input)

return model


if TORCH_VERSION_AT_LEAST_2_5:
torch.serialization.add_safe_globals(ALL_AUTOQUANT_CLASS_LIST)

0 comments on commit a463397

Please sign in to comment.