Skip to content

Commit 1462d11

Browse files
init_kwargs -> kwargs
1 parent 9c6ee9b commit 1462d11

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

optimum/intel/openvino/configuration.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def __init__(
323323
if isinstance(ignored_scope, nncf.IgnoredScope):
324324
ignored_scope = ignored_scope.__dict__
325325
self.ignored_scope = ignored_scope
326-
self.init_kwargs = kwargs
326+
self.kwargs = kwargs
327327

328328
def post_init(self):
329329
try:
@@ -344,9 +344,9 @@ def clone(self):
344344
return copy.deepcopy(self)
345345

346346
def to_dict(self) -> Dict[str, Any]:
347-
# Unpack init kwargs back into kwargs
347+
# Unpack kwargs dict
348348
result = super().to_dict()
349-
result = result | result.pop("init_kwargs", {})
349+
result = result | result.pop("kwargs", {})
350350
return result
351351

352352

@@ -634,7 +634,7 @@ def to_nncf_dict(self) -> Dict[str, Any]:
634634
"gptq": self.gptq,
635635
"lora_correction": self.lora_correction,
636636
"backup_mode": backup_mode,
637-
**self.init_kwargs,
637+
**self.kwargs,
638638
}
639639
return result
640640

@@ -783,9 +783,9 @@ def to_nncf_dict(self) -> Dict[str, Any]:
783783
Returns a dictionary with the variables that are ready to use for nncf.compress_weights() call.
784784
"""
785785

786-
# Merge advanced parameters from init_kwargs if they were provided
787-
init_kwargs_copy = copy.deepcopy(self.init_kwargs)
788-
advanced_parameters = init_kwargs_copy.pop("advanced_parameters", nncf.AdvancedQuantizationParameters())
786+
# Merge advanced parameters from kwargs if they were provided
787+
kwargs_copy = copy.deepcopy(self.kwargs)
788+
advanced_parameters = kwargs_copy.pop("advanced_parameters", nncf.AdvancedQuantizationParameters())
789789
advanced_parameters.overflow_fix = nncf.OverflowFix(self.overflow_fix)
790790
if self.smooth_quant_alpha:
791791
advanced_parameters.smooth_quant_alphas.matmul = self.smooth_quant_alpha
@@ -805,7 +805,7 @@ def to_nncf_dict(self) -> Dict[str, Any]:
805805
"model_type": model_type,
806806
"ignored_scope": self.get_ignored_scope_instance(),
807807
"advanced_parameters": advanced_parameters,
808-
**init_kwargs_copy,
808+
**kwargs_copy,
809809
}
810810

811811

0 commit comments

Comments
 (0)