Skip to content

Commit

Permalink
fix style post rename PR (vllm-project#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
bfineran authored Apr 17, 2024
1 parent ee6a913 commit fd9545d
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/compressed_tensors/compressors/sparse_bitmask.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

import numpy
import torch
from safetensors import safe_open
from compressed_tensors.compressors import ModelCompressor
from compressed_tensors.utils import get_nested_weight_mappings, merge_names
from safetensors import safe_open
from torch import Tensor
from tqdm import tqdm

Expand Down
2 changes: 1 addition & 1 deletion src/compressed_tensors/config/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

from typing import Optional

from pydantic import BaseModel
from compressed_tensors.registry import RegistryMixin
from pydantic import BaseModel


__all__ = ["CompressionConfig"]
Expand Down
4 changes: 3 additions & 1 deletion src/compressed_tensors/quantization/lifecycle/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
from collections import OrderedDict
from typing import Iterable, Optional

from compressed_tensors.quantization.lifecycle.calibration import set_module_for_calibration
from compressed_tensors.quantization.lifecycle.calibration import (
set_module_for_calibration,
)
from compressed_tensors.quantization.lifecycle.frozen import freeze_module_quantization
from compressed_tensors.quantization.lifecycle.initialize import (
initialize_module_for_quantization,
Expand Down
4 changes: 3 additions & 1 deletion src/compressed_tensors/quantization/lifecycle/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
from typing import Optional

import torch
from compressed_tensors.quantization.lifecycle.forward import wrap_module_forward_quantized
from compressed_tensors.quantization.lifecycle.forward import (
wrap_module_forward_quantized,
)
from compressed_tensors.quantization.quant_args import QuantizationArgs
from compressed_tensors.quantization.quant_config import QuantizationStatus
from compressed_tensors.quantization.quant_scheme import QuantizationScheme
Expand Down
2 changes: 1 addition & 1 deletion src/compressed_tensors/quantization/quant_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
from enum import Enum
from typing import Dict, List, Optional

from pydantic import BaseModel, Field
from compressed_tensors.quantization.quant_scheme import QuantizationScheme
from compressed_tensors.quantization.utils import (
calculate_compression_ratio,
is_module_quantized,
iter_named_leaf_modules,
module_type,
)
from pydantic import BaseModel, Field
from torch.nn import Module


Expand Down
2 changes: 1 addition & 1 deletion src/compressed_tensors/quantization/quant_scheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

from typing import List, Optional

from pydantic import BaseModel
from compressed_tensors.quantization.quant_args import QuantizationArgs
from pydantic import BaseModel


__all__ = ["QuantizationScheme"]
Expand Down
2 changes: 1 addition & 1 deletion tests/quantization/test_quant_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
# limitations under the License.

import pytest
from pydantic import ValidationError
from compressed_tensors.quantization import (
QuantizationArgs,
QuantizationStrategy,
QuantizationType,
)
from pydantic import ValidationError


def test_defaults():
Expand Down
2 changes: 1 addition & 1 deletion tests/quantization/test_quant_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@


import pytest
from pydantic import ValidationError
from compressed_tensors.quantization import (
QuantizationConfig,
QuantizationScheme,
QuantizationStatus,
)
from pydantic import ValidationError


def test_basic_config():
Expand Down
2 changes: 1 addition & 1 deletion tests/quantization/test_quant_scheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# limitations under the License.

import pytest
from pydantic import ValidationError
from compressed_tensors.quantization import QuantizationArgs, QuantizationScheme
from pydantic import ValidationError


def test_basic_scheme():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_bitmask.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import pytest
import torch
from safetensors.torch import save_file
from compressed_tensors import BitmaskCompressor, BitmaskConfig, BitmaskTensor
from safetensors.torch import save_file


@pytest.mark.parametrize(
Expand Down

0 comments on commit fd9545d

Please sign in to comment.