Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 24, 2024
1 parent 32fb250 commit a4e4dbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions neural_compressor/torch/algorithms/weight_only/autoround.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@

from neural_compressor.torch.algorithms import Quantizer
from neural_compressor.torch.utils import get_accelerator, logger

from .utility import CapturedDataloader, InputCaptureModule


class AutoRoundQuantizer(Quantizer):
def __init__(
self,
Expand Down
3 changes: 2 additions & 1 deletion neural_compressor/torch/algorithms/weight_only/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,7 @@ def _hook(module, inputs, outputs):
h.remove()
return total_values


class CapturedDataloader:
def __init__(self, args_list, kwargs_list) -> None:
self.args_list = args_list
Expand All @@ -1098,4 +1099,4 @@ def __init__(self, model) -> None:

def forward(self, *args, **kwargs):
self.args_list.append(args)
self.kwargs_list.append(kwargs)
self.kwargs_list.append(kwargs)

0 comments on commit a4e4dbe

Please sign in to comment.