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

Set `link_limit` for `var_kwargs` input 1e6 #303

Closed superstar54 closed 2 months ago

superstar54 commented 2 months ago

For example,

@task.calcfunction()
    def sum(**datas):
        total = 0
        for _, data in datas.items():
            total += data.value
        return Float(total)
wg = WorkGraph()
sum1 = wg.add_task(sum, "sum1")
#
sum1.inputs["datas"].link_limit = 100

For the moment, one needs to manually set the link_limit, however, var_kwargs is dynamic, so we should allow the input socket has a large link_limit.