Hi,
If I have one Firework that has a task with FWAction() that spawns a new firework through additions variable, that new FW that spawns doesn't seem to inherit any update_spec from the FW that launched it.
Am I doing something wrong?
For example, with this very sample code in CFiretasks.py:
from fireworks.core.firework import FiretaskBase, Firework, FWAction, Workflow
from fireworks.utilities.fw_utilities import explicit_serialize
@explicit_serialize
class TaskUpdateSpec(FiretaskBase):
required_params = []
optional_params = []
def run_task(self, fw_spec):
fw = Firework(SpecPrint())
update_spec={"str1":"test"}
return FWAction(additions=fw, update_spec = update_spec)
@explicit_serialize
class SpecPrint(FiretaskBase):
required_params = []
optional_params = []
def run_task(self, fw_spec):
print(fw_spec)
And then this helper code in another file:
from CFiretasks import TaskUpdateSpec
from fireworks.core.firework import Firework
t = []
t.append(TaskUpdateSpec())
fw = Firework(t)
When I run this, the only thing that is printed is this in this addition FW:
{'_tasks': [{'_fw_name': '{{CFiretasks.SpecPrint}}'}], '_fw_env': {}}
The update_spec was not passed on.