Skip to content

Commit b4bd475

Browse files
committed
fix ci
1 parent 6867fab commit b4bd475

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ def get_type_for_value(value):
8888
return OVAny(DecoderType.PyScalar(OVAny(OVType.boolean)))
8989
elif isinstance(value, list):
9090
if len(value) > 0:
91-
return OVAny(DecoderType.list(BaseFXDecoder.get_type_for_value(value[0])))
91+
return OVAny(DecoderType.List(BaseFXDecoder.get_type_for_value(value[0])))
9292
else:
93-
return OVAny(DecoderType.list(OVAny(OVType.i32)))
93+
return OVAny(DecoderType.List(OVAny(OVType.i32)))
9494
return OVAny(OVType.dynamic)
9595

9696
def inputs(self):

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def _get_known_type_for_value(self, pt_type):
269269
return OVAny(DecoderType.Tensor(self._get_known_type_for_value(pt_type.dtype())))
270270
elif isinstance(pt_type, torch.ListType):
271271
element_type = pt_type.getElementType()
272-
return OVAny(DecoderType.list(self._get_known_type_for_value(element_type)))
272+
return OVAny(DecoderType.List(self._get_known_type_for_value(element_type)))
273273
elif isinstance(pt_type, (torch.StringType, torch.DeviceObjType)):
274274
return OVAny(DecoderType.Str())
275275
elif isinstance(pt_type, torch.NoneType):

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ def prepare_example_inputs_and_model(inputs, input_params, model):
267267
inputs, input_params, model)
268268
return examples, ordered, wrapped, input_is_list
269269
if isinstance(inputs, list) and len(inputs) == 1 and isinstance(inputs[0], torch.Tensor):
270+
print(str(input_params[input_signature[0]].annotation))
270271
if "list" in str(input_params[input_signature[0]].annotation):
272+
print("no")
271273
inputs = inputs[0].unsqueeze(0)
272274
input_is_list = True
273275

src/bindings/python/src/openvino/utils/decorators.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ def __init__(self, name: str):
7979
# Checks if actual_type is a subclass of any type in the union
8080
def matches_union(self, union_type, actual_type) -> bool: # type: ignore
8181
for type_arg in get_args(union_type):
82+
origin = get_origin(type_arg)
83+
if origin is not None:
84+
type_arg = origin
85+
8286
if isinstance(type_arg, type) and issubclass(actual_type, type_arg):
8387
return True
8488
elif get_origin(type_arg) == list:

0 commit comments

Comments
 (0)