Skip to content
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

Usage of groups in WorkChain #6800

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

agoscinski
Copy link
Contributor

@agoscinski agoscinski commented Mar 21, 2025

This is just a hack to test the technical feasibility to reuse the orm.Groups in WorkChain. In the end we want to design a custom data type for it that is separate from this Group but it seems we can reuse a lot of code from orm.Group since it works.

So this PR works one also has to comment out the port validation in plumpy
https://github.com/aiidateam/plumpy/blob/3c8d17a273b38c79248b75a0814b472915ec2465/src/plumpy/processes.py#L789-L792
https://github.com/aiidateam/plumpy/blob/3c8d17a273b38c79248b75a0814b472915ec2465/src/plumpy/processes.py#L1404-L1406

Side note the workchain I implemented should not be later on not possible since the same node is mutated returned. Both should not be possible in an implementation but here I just wanted to have an easy operation that manipulates a group and returns it. Because the labels it is a bit annoying to create a new group.

agoscinski and others added 3 commits March 21, 2025 08:58
wip
for more information, see https://pre-commit.ci
@sphuber
Copy link
Contributor

sphuber commented Mar 26, 2025

Not sure about the discussions you guys have had about this, but perhaps useful to know that we explicitly forbade or actively discourage to use groups as inputs. The reason being is that they are mutable, since the contents of the group can change and so the reproducibility of the workchain is completely lost. This is currently not really a problem, as in it won't break any code I think, but it has great repercussions for any chances to implement an automated "replayer" later on. If you allow this, you will always have to replay the entire workchain because the group's contents probably have changed.

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.

Support for an orm data type that allows to pass a group of orm nodes
2 participants