aiidateam / aiida-workgraph

Efficiently design and manage flexible workflows with AiiDA, featuring an interactive GUI, checkpoints, provenance tracking, and remote execution capabilities.
https://aiida-workgraph.readthedocs.io/en/latest/
MIT License
10 stars 5 forks source link

Support store_provenance in normal task #338

Open superstar54 opened 1 month ago

superstar54 commented 1 month ago

There is no provenance stored for a normal task. If the user wants to store the provenance, they need to switch to calcfunction or PythonJob. But the downsides are

Is it possible to combine the upsides of the above tasks: 1) can be run locally; 2) automatically serialize inputs and outputs. Maybe we could add store_provenance argument for a normal task, e.g.,

@task()
def add(x, y):
    return x + y

wg = WorkGraph()
add_task = wg.add_task(add, name="add1", x=1, y=2,
                       store_provenance=True,)
wg.run()