Skip to content

Conversation

jan-janssen
Copy link
Member

No description provided.

@superstar54
Copy link
Contributor

Yes, I removed the names because they are not used in the code.

Here is an example that with/without adding the name argument:

from aiida_workgraph import WorkGraph, task

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

wg = WorkGraph()
# add the name explicitly, so that we refer the task later
wg.add_task(add, name="my_add")
wg.tasks.my_add.inputs.x.value = 1

# Another way is to use the returned task directly.
my_add = wg.add_task(add)
my_add.inputs.x.value = 1

@jan-janssen jan-janssen merged commit 17f30ec into main May 21, 2025
8 checks passed
@jan-janssen jan-janssen deleted the aiida_remove_name branch May 21, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants