Leip
January 28, 2019, 2:50pm
1
Hi,
How do we use Dupefinder with Python ?
The documentation is only for yaml workflow. My aim is to rerun a workflow after an error.
For example:
from fireworks import Firework, Workflow, LaunchPad, ScriptTask, PyTask
from fireworks.core.rocket_launcher import rapidfire
set up the LaunchPad and reset it
launchpad = LaunchPad()
#launchpad .reset(’’, require_password=False)
create the individual FireWorks and Workflow
fw1 = Firework(ScriptTask.from_str(‘echo hello’), name=“hello”, _dupefinder= “DupeFinderExact”)
fwa = Firework(ScriptTask.from_str(‘echo stuff A’), name=“stuff A”)
fwb1 = Firework(ScriptTask.from_str(‘echo stuff B1’), name=“stuff B1”)
fwb2 = Firework(ScriptTask.from_str(‘foo stuff B2’), name=“stuff B2”)
fw3 = Firework(ScriptTask.from_str(‘echo goodbye’), name=“goodbye”)
wf = Workflow([fw1, fwa, fwb1, fwb2, fw3], {fw1: [fwa, fwb1], fwa: fw3, fwb1: fwb2, fwb2: fw3}, name=“Basic diamond workflow”)
store workflow and launch it locally
launchpad.add_wf(wf)
rapidfire(launchpad)
This workflow will throw an exception for “stuff B2”. If I correct (replacing “foo” by “echo”), how can I rerun this workflow again without doing again the fireworks which were not in error?
Hi,
To add a Dupefinder, add a key to your fw_spec called “_dupefinder” and put a DupeFinder object as the value.
e.g.
fw = FireWork([tasks], spec={“_dupefinder”: DupeFinderExact()})
I will add this to the docs soon, thanks for letting me know
···
On Mon, Jan 28, 2019 at 6:50 AM Leip [email protected] wrote:
Hi,
How do we use Dupefinder with Python ?
The documentation is only for yaml workflow. My aim is to rerun a workflow after an error.
For example:
from fireworks import Firework, Workflow, LaunchPad, ScriptTask, PyTask
from fireworks.core.rocket_launcher import rapidfire
set up the LaunchPad and reset it
launchpad = LaunchPad()
#launchpad .reset(‘’, require_password=False)
create the individual FireWorks and Workflow
fw1 = Firework(ScriptTask.from_str(‘echo hello’), name=“hello”, _dupefinder= “DupeFinderExact”)
fwa = Firework(ScriptTask.from_str(‘echo stuff A’), name=“stuff A”)
fwb1 = Firework(ScriptTask.from_str(‘echo stuff B1’), name=“stuff B1”)
fwb2 = Firework(ScriptTask.from_str(‘foo stuff B2’), name=“stuff B2”)
fw3 = Firework(ScriptTask.from_str(‘echo goodbye’), name=“goodbye”)
wf = Workflow([fw1, fwa, fwb1, fwb2, fw3], {fw1: [fwa, fwb1], fwa: fw3, fwb1: fwb2, fwb2: fw3}, name=“Basic diamond workflow”)
store workflow and launch it locally
launchpad.add_wf(wf)
rapidfire(launchpad)
This workflow will throw an exception for “stuff B2”. If I correct (replacing “foo” by “echo”), how can I rerun this workflow again without doing again the fireworks which were not in error?
–
You received this message because you are subscribed to the Google Groups “fireworkflows” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] .
To post to this group, send email to [email protected] .
Visit this group at https://groups.google.com/group/fireworkflows .
For more options, visit https://groups.google.com/d/optout .
–
Best,
Anubhav