Skip to content

Commit a43dad2

Browse files
authored
apply style and quality (#201)
1 parent 37df2dd commit a43dad2

File tree

7 files changed

+2
-13
lines changed

7 files changed

+2
-13
lines changed

src/compressed_tensors/quantization/lifecycle/forward.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from functools import wraps
1616
from math import ceil
17-
from typing import Callable, Optional
17+
from typing import Optional
1818

1919
import torch
2020
from compressed_tensors.quantization.quant_args import (
@@ -28,7 +28,7 @@
2828
calculate_range,
2929
compute_dynamic_scales_and_zp,
3030
)
31-
from compressed_tensors.utils import safe_permute, update_parameter_data
31+
from compressed_tensors.utils import safe_permute
3232
from torch.nn import Module
3333

3434

src/compressed_tensors/quantization/utils/helpers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ def iter_named_leaf_modules(model: Module) -> Generator[Tuple[str, Module], None
233233
named_children, children = zip(*list(submodule.named_children()))
234234
has_non_observer_children = False
235235
for i in range(len(children)):
236-
child = children[i]
237236
child_name = named_children[i]
238237

239238
if "observer" not in child_name:
@@ -268,7 +267,6 @@ def iter_named_quantizable_modules(
268267
has_non_observer_children = False
269268
for i in range(len(children)):
270269
child_name = named_children[i]
271-
child = children[i]
272270

273271
if "observer" not in child_name:
274272
has_non_observer_children = True

tests/conftest.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,9 @@
1313
# limitations under the License.
1414

1515
from math import ceil
16-
from typing import Any, Iterable, Optional, Union
1716

1817
import pytest
1918
import torch
20-
from compressed_tensors.quantization.quant_args import (
21-
QuantizationArgs,
22-
QuantizationStrategy,
23-
)
2419
from compressed_tensors.quantization.utils import calculate_qparams
2520
from compressed_tensors.utils.offload import update_parameter_data
2621

tests/test_compressors/quantized_compressors/test_fp8_quant.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
QuantizationStatus,
2626
QuantizationStrategy,
2727
apply_quantization_config,
28-
apply_quantization_status,
2928
)
3029
from compressed_tensors.quantization.lifecycle.forward import fake_quantize
3130
from safetensors.torch import save_file

tests/test_compressors/quantized_compressors/test_pack_quant.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
QuantizationScheme,
3131
QuantizationStatus,
3232
apply_quantization_config,
33-
apply_quantization_status,
3433
)
3534
from compressed_tensors.quantization.lifecycle.forward import fake_quantize
3635
from compressed_tensors.quantization.quant_args import ActivationOrdering

tests/test_compressors/sparse_quantized_compressors/test_marlin_24.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
QuantizationStatus,
3030
QuantizationStrategy,
3131
apply_quantization_config,
32-
apply_quantization_status,
3332
)
3433
from compressed_tensors.utils import mask_creator, merge_names
3534
from torch.nn.modules import Linear, Sequential

tests/test_quantization/lifecycle/test_lifecycle.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
from copy import deepcopy
1616

17-
import pytest
1817
import torch
1918
from compressed_tensors.quantization.lifecycle.initialize import (
2019
initialize_module_for_quantization,

0 commit comments

Comments
 (0)