Skip to content

Commit 4cd1512

Browse files
authored
fix getting config in pt fe decoder (openvinotoolkit#27609)
### Details: - *item1* - *...* ### Tickets: - *ticket-id*
1 parent cbdaba3 commit 4cd1512

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bindings/python/src/openvino/frontend/pytorch/ts_decoder.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ def __init__(
5151
self.out_debug_name_overwrites = {}
5252
if graph_element is None:
5353
if hasattr(pt_module, "config"):
54-
self.config = pt_module.config.to_dict() if not isinstance(
55-
pt_module.config, dict) else pt_module.config
54+
if isinstance(pt_module.config, dict):
55+
self.config = pt_module.config
56+
elif hasattr(pt_module.config, "to_dict"):
57+
self.config = pt_module.config.to_dict()
5658
try:
5759
pt_module = self._get_scripted_model(
5860
pt_module, example_input, skip_freeze)

0 commit comments

Comments
 (0)