-
Notifications
You must be signed in to change notification settings - Fork 2
Emit signals when running a child directly #621
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
Conversation
Needs a test to ensure this "push" behaviour stays working, and I want to explore recovery files a little bit. Still, even if the recovery file is less graceful under this condition, I feel that would be a fair price to pay for going into the innards to run something. Signed-off-by: liamhuber <[email protected]>
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
Pull Request Test Coverage Report for Build 13826840492Details
💛 - Coveralls |
Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
to _force_ the signal configuration in this edge case. Signed-off-by: liamhuber <[email protected]>
There are a handful of other simple places where one needs to add extra conditions to see if the parent is running (i.e. if the parent is running, we want to go via the However, as is often the case, the flexible import pyiron_workflow as pwf
wf = pwf.Workflow("push_pull")
wf.n1 = pwf.standard_nodes.UserInput(0)
wf.n2 = pwf.standard_nodes.UserInput(wf.n1)
wf.n3 = pwf.standard_nodes.UserInput(wf.n2)
wf.n1.pull()
wf.n2.run()
print(wf.n3.outputs.user_input.value)
>>> NOT_DATA This is because workflows configure their DAG execution on-the-fly at runtime. So The way I got around this is by introducing So, the above would be fixed like import pyiron_workflow as pwf
wf = pwf.Workflow("push_pull")
wf.n1 = pwf.standard_nodes.UserInput(0)
wf.n2 = pwf.standard_nodes.UserInput(wf.n1)
wf.n3 = pwf.standard_nodes.UserInput(wf.n2)
wf.n1.pull()
wf.n2.push()
print(wf.n3.outputs.user_input.value)
>>> 0 On the one hand, this is obviously a hack. It is ugly and I dislike it. On the other hand, I didn't want to add the boolean check/+flow configuration to each and every |
Signed-off-by: liamhuber <[email protected]>
My perspective is a bit biased by the GUI. So, my opinion is that the ugly hack is totally fine because the GUI would only either be using ( Side note, I'm thinking of calling the |
I think you'll find there's not enough room in the GUI for such verbose labels. In that way I would still prefer "push" and "pull", but I think your description is the perfect basis for a tooltip, the sort that appears when you hover over the button for a second. |
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.
lgtm!
@Tara-Lakshmipathy pointed out that running a particular node doesn't actually push downstream when those nodes are inside the scope of a parent. Indeed, he's right and there was no simple flag or whatever to enable this!
So here
Node.run
is modified to force signals to emit from nodes who don't have a parent (the existing behaviour) OR who do but whose parent is not itself currently running (and thus managing execution flow) (the new behaviour).