Deprecate passing nodes to op constructor (#7327)

* Add a warning

* Remove quotes

* Replace outputs with output(s)
This commit is contained in:
Bartosz Lesniewski authored and GitHub committed 2021-09-07 07:54:00 +03:00
1 parent 8eeee5e441
commit c568791d1e
1 file changed
+5
@@ -1,6 +1,8 @@
# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import logging as log
from functools import partial
from typing import Any, Dict, List, Optional, Union
@@ -82,6 +84,9 @@ class NodeFactory(object):
if issubclass(type(argument), Output):
outputs.append(argument)
else:
log.warning("Op arguments were passed as Node, please avoid passing arguments in "
"this manner, and pass Output(s) instead, because accepting Nodes will "
"be deprecated in a future release.")
outputs.extend(argument.outputs())
return outputs