Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dsikka committed Oct 30, 2024
1 parent 99a9376 commit 9fc10a9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/llmcompressor/observers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
from math import ceil
from typing import Any, Iterable, Optional, Tuple, Union

Expand All @@ -23,12 +22,10 @@
)
from compressed_tensors.registry.registry import RegistryMixin
from compressed_tensors.utils import safe_permute
from loguru import logger
from torch import FloatTensor, IntTensor, Tensor
from torch.nn import Module

_LOGGER = logging.getLogger(__name__)


__all__ = ["Observer"]


Expand Down Expand Up @@ -78,7 +75,6 @@ def post_calculate_qparams(self) -> None:
"""
Run any logic specific to its observers after running calculate_qparams
"""
...

def get_qparams(
self,
Expand Down Expand Up @@ -186,7 +182,7 @@ def record_observed_tokens(self, batch_tensor: Tensor):
raise ValueError(f"Expected value to be a tensor, got {type(batch_tensor)}")

if batch_tensor.ndim != 2:
_LOGGER.debug(
logger.debug(
"The input tensor is expected to have two dimensions "
"(batch_size * sequence_length, num_features). "
f"The input tensor has {batch_tensor.ndim} dimensions."
Expand Down

0 comments on commit 9fc10a9

Please sign in to comment.