Dear all,
How do I properly delete a fw without breaking the queue launcher, and more generally the db? I’d say the short answer is not deleting a fw rather defuse or archive it.
Imagine I have a simple wf with two fws, fw2 dependent on fw1.
Since fw1 was FIZZLED and fw2 was still WAITING, I removed it with:
lpad.delete_fws([fw2_id])
Now, whenever I query the database, I get a:
lpad.get_wf_by_fw_id(fw1_id) #or fw2_id
ValueError: No Firework exists with id: fw2_id
same trouble with qlaunch rapidfire:
$: qlaunch rapidfire
2022-12-14 11:06:11,809 INFO getting queue adapter
2022-12-14 11:06:11,809 INFO Found previous block, using /RUNS/block_2022-12-14-09-11-59-823101
2022-12-14 11:06:11,829 ERROR ----|vvv|----
2022-12-14 11:06:11,829 ERROR Error with queue launcher rapid fire!
2022-12-14 11:06:11,832 ERROR Traceback (most recent call last):
File "/home/mdi0316/miniconda3/envs/kubas/lib/python3.10/site-packages/fireworks/queue/queue_launcher.py", line 287, in rapidfire
or (nlaunches == 0 and not launchpad.future_run_exists(fworker))
File "/home/mdi0316/miniconda3/envs/kubas/lib/python3.10/site-packages/fireworks/core/launchpad.py", line 919, in future_run_exists
if any(self.get_fw_dict_by_id(i)["state"] == "WAITING" for i in children):
File "/home/mdi0316/miniconda3/envs/kubas/lib/python3.10/site-packages/fireworks/core/launchpad.py", line 919, in <genexpr>
if any(self.get_fw_dict_by_id(i)["state"] == "WAITING" for i in children):
File "/home/mdi0316/miniconda3/envs/kubas/lib/python3.10/site-packages/fireworks/core/launchpad.py", line 499, in get_fw_dict_by_id
raise ValueError(f"No Firework exists with id: {fw_id}")
ValueError: No Firework exists with id: 1965
2022-12-14 11:06:11,832 ERROR ----|^^^|----
The question is three fold:
- how do I forbid this to happen next time - and how to remove only 1 WF without destroying my db (probably archive/defuse instead of remove)
- is there a way to fix my db now? can I add the missing wf by hand?
- I understand that if you ask for a missing fw specifically lpad is not happy. but qlauch checking the old wf in the same block is another problem. If qlauch could skip the missing fw this would also bypass the problem
Thanks
Marco