Skip to content

add check for no inputs in insert_node #1170

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

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Conversation

jmitrevs
Copy link
Contributor

Description

graph.insert_node() assumes all the nodes have an input, but constant nodes do not. This adds a check to not fail if there is a node with no input in the graph.

Type of change

  • Bug fix (non-breaking change that fixes an issue)

Tests

None at the moment, though we have a script that caused this to fail before. We should discuss whether we should add it.

Checklist

  • I have read the guidelines for contributing.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have installed and run pre-commit on the files I edited or added.
  • I have added tests that prove my fix is effective or that my feature works.

@jmitrevs jmitrevs requested a review from JanFSchulte January 21, 2025 19:51
@JanFSchulte JanFSchulte merged commit c408145 into main Jan 22, 2025
6 of 8 checks passed
@JanFSchulte JanFSchulte deleted the check_for_no_input branch January 22, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants