Skip to content

Commit

Permalink
Move opset_utils.py
Browse files Browse the repository at this point in the history
Signed-off-by: Alicja Miloszewska <[email protected]>
  • Loading branch information
almilosz committed Dec 13, 2024
1 parent 217d764 commit e3dfef4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/bindings/python/src/openvino/runtime/opset_utils.py

This file was deleted.

13 changes: 13 additions & 0 deletions src/bindings/python/src/openvino/runtime/opset_utils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2018-2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

from openvino.runtime import Node
from openvino.utils.decorators import nameable_op
from openvino.utils.node_factory import NodeFactory
from openvino.utils.types import (
as_node,
NodeInput,
)

from openvino.utils.node_factory import _get_node_factory
8 changes: 8 additions & 0 deletions src/bindings/python/src/openvino/utils/node_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,11 @@ def _arguments_as_outputs(arguments: List[Union[Node, Output]]) -> List[Output]:
else:
outputs.extend(argument.outputs())
return outputs


def _get_node_factory(opset_version: Optional[str] = None) -> NodeFactory:
"""Return NodeFactory configured to create operators from specified opset version."""
if opset_version:
return NodeFactory(opset_version)
else:
return NodeFactory()

0 comments on commit e3dfef4

Please sign in to comment.