Skip to content

Commit

Permalink
Fixed IndexError list index out of range for Squeeze (openvinotoolkit…
Browse files Browse the repository at this point in the history
…#22326)

* fixed list index out of range error in node_decoder.py

* Improved and Modified as per review feedback

- Added a Model in the precommit_models for precommit validation.
- Removed skip and xfail marrks for the issue (129232 IndexError list
  index out of range for Squeeze)
- Added explicilty return None in node_decoder.py

* Update tests/model_hub_tests/tf_hub_tests/nightly_models

* Update tests/model_hub_tests/tf_hub_tests/nightly_models

* Update tests/model_hub_tests/tf_hub_tests/nightly_models

* Apply suggestions from code review

* Update tests/model_hub_tests/tf_hub_tests/precommit_models

* Update tests/model_hub_tests/tf_hub_tests/precommit_models

---------

Co-authored-by: Roman Kazantsev <[email protected]>
  • Loading branch information
abhinav231-valisetti and rkazants authored Jan 24, 2024
1 parent 820448b commit 51cbbab
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ def tf_attr_to_numpy(attr):
return tf_type_to_ov_type(attr.type)
if attr_type == "list":
list_value = attr.list
return list(list_value.ListFields()[0][1])
fields = list_value.ListFields()
if fields and len(fields) > 0 and len(fields[0]) > 1:
return list(fields[0][1])
else:
return None
if attr_type is None:
return None
return getattr(attr, attr.WhichOneof("value"))
Expand Down
Loading

0 comments on commit 51cbbab

Please sign in to comment.