-
Notifications
You must be signed in to change notification settings - Fork 66
[IR] Implement append/pop for node input/outputs #2289
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
base: main
Are you sure you want to change the base?
Conversation
f"Output: {value}" | ||
) | ||
self._outputs = (*self._outputs, value) | ||
value._producer = self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update index
f"Output: {value}, uses: {value.uses()}" | ||
) | ||
self._outputs = self._outputs[:-1] | ||
value._producer = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update index
Raises: | ||
ValueError: If the input value is used by other nodes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raises: | |
ValueError: If the input value is used by other nodes. |
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
if value is not None: | ||
value._add_usage(self, len(self._inputs) - 1) # pylint: disable=protected-access | ||
|
||
def pop_input(self) -> Value | None: |
Check failure
Code scanning / lintrunner
MYPY/return Error
raise ValueError("No inputs to pop.") | ||
value = self._inputs[-1] | ||
if value is not None: | ||
value._remove_usage(self, len(self._inputs) - 1) |
Check warning
Code scanning / lintrunner
PYLINT/W0212 Warning
See protected-access. To disable, use # pylint: disable=protected-access
f"Output: {value}" | ||
) | ||
self._outputs = (*self._outputs, value) | ||
value._producer = self |
Check warning
Code scanning / lintrunner
PYLINT/W0212 Warning
See protected-access. To disable, use # pylint: disable=protected-access
f"Output: {value}, uses: {value.uses()}" | ||
) | ||
self._outputs = self._outputs[:-1] | ||
value._producer = None |
Check warning
Code scanning / lintrunner
PYLINT/W0212 Warning
See protected-access. To disable, use # pylint: disable=protected-access
No description provided.