Deprecate passing nodes to op constructor (#7327)
* Add a warning * Remove quotes * Replace outputs with output(s)
This commit is contained in:
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
|
||||
|
||||
|
||||
Reference in new issue
Block a user