Closed agoscinski closed 3 weeks ago
I realized that this is not a problem related to ShellJob
but also happens for the example in the documentation https://aiida-workgraph.readthedocs.io/en/latest/howto/graph_builder.html#Create-nested-workflow
I think there are two issues here:
The jupyter-notebook has its own event loop, so if you use wg.run()
, inside the WorkGraph engine, it tries to submit
the workgraph generated by the graph_builder
, the process will wait forever. The documentation uses submit()
and works, because it will distribute the task to the AiiDA daemon and not using the same process as the jupyter-notebook. There is a solution, I don't remember exactly, but maybe add this in the notebook
import asyncio
asyncio.get_event_loop().run_forever()
There is another issue, even when I use submit
in the current version, the submitted workgraph is stuck in Created
status, this is a bug, I will try to fix it.
I think we can close this issue because it does not exist after PR #252
The code
produces this error
And the process is stuck. While this code itself works