Skip to content

Commit

Permalink
[PyOV] fix set_node_friendly_name (openvinotoolkit#20695)
Browse files Browse the repository at this point in the history
  • Loading branch information
akuporos authored Oct 26, 2023
1 parent c482e5f commit 3b9606f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from openvino.runtime.utils.types import NodeInput, as_node, as_nodes


def _set_node_friendly_name(node: Node, **kwargs: Any) -> Node:
def _set_node_friendly_name(node: Node, /, **kwargs: Any) -> Node:
if "name" in kwargs:
node.friendly_name = kwargs["name"]
return node
Expand Down
6 changes: 6 additions & 0 deletions src/bindings/python/tests/test_graph/test_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,9 @@ def test_normalize_l2():
assert node.get_output_size() == 1
assert node.get_type_name() == "NormalizeL2"
assert list(node.get_output_shape(0)) == input_shape


def test_reduce_with_keywork():
const = ov.constant([-1], np.int64)
min_op = ov.reduce_min(node=const, reduction_axes=0)
assert min_op.get_output_size() == 1

0 comments on commit 3b9606f

Please sign in to comment.