Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate passing nodes to op constructor #7327

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ngraph/python/src/ngraph/utils/node_factory.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -82,6 +84,9 @@ def _arguments_as_outputs(arguments: List[Union[Node, Output]]) -> List[Output]:
if issubclass(type(argument), Output):
outputs.append(argument)
else:
log.warning("Op arguments were passed as Node, please avoid passing arguments in "
blesniewski marked this conversation as resolved.
Show resolved Hide resolved
"this manner, and pass Output(s) instead, because accepting Nodes will "
"be deprecated in a future release.")
outputs.extend(argument.outputs())
return outputs

Expand Down