Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3b078e1

Browse files
committedFeb 29, 2024·
Process __call__ call properly
1 parent 412a10c commit 3b078e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎optimum/intel/openvino/quantization.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ def __init__(self, request, data_cache=None):
8888
self.data_cache = data_cache
8989

9090
def __call__(self, *args, **kwargs):
91-
self.data_cache.append(copy.deepcopy(args))
91+
# If __call__ is invoked then self.request must be an instance of CompiledModel
92+
signature = inspect.signature(self.request)
93+
bound_args = signature.bind(*args, **kwargs).arguments
94+
self.data_cache.append(copy.deepcopy(bound_args["inputs"]))
9295
return self.request(*args, **kwargs)
9396

9497
def infer(self, inputs: Any = None, share_inputs: bool = False):

0 commit comments

Comments
 (0)
Please sign in to comment.