-
Notifications
You must be signed in to change notification settings - Fork 15
PythonJob: can not pass orm.Computer as input #761
Copy link
Copy link
Open
Description
from aiida_workgraph import WorkGraph, task
from aiida import orm, load_profile
load_profile()
@task.pythonjob
def add(x: int, y: int) -> int:
return x + y
@task.graph
def RemoteAdd(x: int, y: int, computer: orm.Computer) -> int:
return add(x=x, y=y, computer=computer).result
wg = RemoteAdd.build(x=1, y=2, computer=orm.load_computer('localhost'))
wg.run()
print('\nResult: ', wg.outputs.result.value) File "/home/xing/repos/scinode/node-graph/src/node_graph/link.py", line 294, in check_socket_match
raise TypeError("\n".join(lines))
TypeError: Socket type mismatch:
graph_inputs.computer [workgraph.annotated<aiida.orm.computers.Computer>] -> add.computer [workgraph.string] is not allowed.
Suggestions:
• Double-check you are linking the intended sockets
• If this conversion is intentional, register an identifier-level promotion
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels