Dynamically creating input for a FireWork with multiple parents

12 views
Skip to first unread message

Varchas Gopalaswamy

unread,
Sep 17, 2019, 12:04:17 PM9/17/19
to fireworkflows
So my workflow looks like this:

workflow = Workflow([parent_1,parent_2..., parent_N,child_1],{parent_1:[child_1],parent_2:[child_1]....,parent_N:[child_1]})

If parent_i succeeds, it should send a path to child_1
If parent_i fails, it should send nothing to child_1 

Once all the parents have run (either with success or failure), child_1 should iterate over all the paths that were given to it and do something for each path. 

In principle, there could be multiple child_j with parents [parent_1j,parent_2j.... parent_Nj]. 

What's the right way to structure the FireTask for ParentFireTask and ChildFireTask so that this can be achieved? 

Thanks! 

Anubhav Jain

unread,
Sep 20, 2019, 6:52:44 PM9/20/19
to fireworkflows
Hi Varchas,

The best way to do this with FWS is to have the child FireWork have "_allow_fizzled_parents" set to True in its fw_spec (minor documentation is here: https://materialsproject.github.io/fireworks/failures_tutorial.html?highlight=_allow_fizzled_parents).

With this key set, even if the parent fails it will still execute the child. In this case, it will create a special key called "_fizzled_parents" in the child's spec, if any parents did in fact fail.

Next, the child should examine the "_fizzled_parents" key to see which of the parents actually failed. Those paths should be removed from your list.
Reply all
Reply to author
Forward
0 new messages