From 3b9606f2170dc15a8f80c9d2a790e7a92dddb97c Mon Sep 17 00:00:00 2001 From: Anastasia Kuporosova Date: Thu, 26 Oct 2023 15:35:57 +0300 Subject: [PATCH] [PyOV] fix set_node_friendly_name (#20695) --- .../python/src/openvino/runtime/utils/decorators.py | 2 +- src/bindings/python/tests/test_graph/test_reduction.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bindings/python/src/openvino/runtime/utils/decorators.py b/src/bindings/python/src/openvino/runtime/utils/decorators.py index a4b4d33fe6a00d..b980c4c7e50f06 100644 --- a/src/bindings/python/src/openvino/runtime/utils/decorators.py +++ b/src/bindings/python/src/openvino/runtime/utils/decorators.py @@ -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 diff --git a/src/bindings/python/tests/test_graph/test_reduction.py b/src/bindings/python/tests/test_graph/test_reduction.py index 7480bb2009ae5f..9747af0b926834 100644 --- a/src/bindings/python/tests/test_graph/test_reduction.py +++ b/src/bindings/python/tests/test_graph/test_reduction.py @@ -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