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

Setting computer in ShellJob raises pickle error #290

Closed agoscinski closed 2 months ago

agoscinski commented 2 months ago

the code

from aiida import orm
from aiida_workgraph import WorkGraph

wg = WorkGraph()
task = wg.add_task(
    "ShellJob",
    name="ls_task",
    command="ls",
)
task.set({"metadata.computer": orm.load_computer('localhost')})
wg.run()

raises the error

File ~/micromamba/envs/autosubmit-dev/lib/python3.11/site-packages/aiida/orm/entities.py:241, in Entity.__getstate__(self)
    239 def __getstate__(self):
    240     """Prevent an ORM entity instance from being pickled."""
--> 241     raise InvalidOperation('pickling of AiiDA ORM instances is not supported.')

InvalidOperation: pickling of AiiDA ORM instances is not supported.

The whole log errorlog.txt