-
Notifications
You must be signed in to change notification settings - Fork 0
Implement do #42
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
Implement do #42
Conversation
|
Pre-emptive note here: in #40 the To avoid the solver accidentally picking up these constant parameters as values that should vary we could either:
|
Ooh, we could just remove the node that the do is setting the value of and do this move without needing to add a new node. This feels very neat so I'll do this |
willGraham01
left a comment
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.
I think the new_nodes dictionary in the do method is being ignored? Or it doesn't need to exist perhaps? Either way I think I get what it's meant to be doing.
With that fix - and some slightly more verbose language - I think do should be do-ing what we expect 🥳 Have added some suggestions for what to test regarding this method - TLDR would focus on only testing the connectivity of the graph that do produces, and that the parameters have been moved to constant_parameters correctly.
Co-authored-by: Will Graham <32364977+willGraham01@users.noreply.github.com>
Co-authored-by: Will Graham <32364977+willGraham01@users.noreply.github.com>
|
I think the CI will pass here once #56 is merged |
Implement a do algorithms that takes a graph and replaces a node with a constant
ParameterNodeand removes any edges going into that node.As expectation and other algorithms already only iterate over ancestors of output nodes, there's no need to trim the graph further when applying a do.
Builds on #39, so is currently set to merge into that branch.