-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve plumpy integration in aiida-core
#6754
Comments
I guess there were historical security consideration that yaml is used for se/de things storing in checkpoint (pinning @giovannipizzi @sphuber for confirmation). After move to pyyaml 5.4 we use There are some differences between storing the checkpoint items into yaml and into pickle, when I tried to move from storing checkpoint from yaml to pickle.
After all, store the object like process itself and |
Also want to mention the idea here is partially inspired by #4876 (comment) to use greenlet to run synchronous code in asynchronous. - result = process.execute()
+ result = await_or_new_loop(coro_executor(process.execute)) what we actually need is running the asynchronous code in the synchronous, which is inside |
At the very least there is an implicit guarantee because only terminated processes can be exported and when a process terminates, its checkpoint is removed. But this is just a soft guarantee that is easily skipped. But I vaguely remember that there might be an explicit check in the export code to drop the |
That is true, but if someone really want to put malicious code in the data node it is easy to go around.
Right! I thought it was only in export code which surely is implemented but not for import. But actually it is already there in aiida-core/src/aiida/tools/archive/imports.py Lines 525 to 526 in d2fbf21
|
This is a collection of issues regarding plumpy that are not well fleshed out but I think they should at least be mentioned somewhere to keep track of it. I will edit this issue to be more precise in language once working on them.
plumpy WorkChain not correctly used in aiida-core
There is
plumpy.workchains.WorkChain
but is not really used in theaiida.engine.WorkChain
. It is used as typehint in theStepper
classes, therefore the plumpy WorkChain should be an Interface or Protocol that aiida WorkChain should implement.Issues with nest-asyncio
By switching from
nest-asyncio
togreenlet
(see unkcpz/plumpy#39) we can solve test_disconnect timeout problem (see aiida-coretests/manage/test_manager.py::test_disconnect
) and the python recursion limit issue, and most importantly it allows us to use calcfunctions in an unblocking manner.Improved save and load interface
Refactor of save and load to make it work better pickled data unkcpz/plumpy#33 we can thus support some of the functionalities of workgraph regarding pickling more natively in aiida-core.
plumpy WorkChain not correctly used
Why do we have
plumpy.workchains.WorkChain
if it is not really used in theaiida.engine.WorkChain
. It is used as typehint in theStepper
classes, so it seems to me that plumpy WorkChain should be an Interface or Protocol that aiida WorkChain should implement.The text was updated successfully, but these errors were encountered: