-
Notifications
You must be signed in to change notification settings - Fork 192
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
Fix import/export for workchains and workfunctions #1102
Comments
The entities that are definitely not preserved when exporting/importing a workchain node:
|
A few other things that should be imported/exported are
|
From #687 we know that:
The initial code for descendants was the following We need (regarding the links)
After discussing with Sebastiaan (@sphuber):
So we need to be in a loop where we follow CREATE, RETURN and CALL links until the set does not change anymore |
Just a couple of comments:
For reference, one can reuse probably some of the logic of the 'verdi node delete' implemented recently, that also has a very similar recursive logic: https://github.com/aiidateam/aiida_core/pull/1083/files (even if the rules might be slightly different). I think it would be also good to divide 'following' rules in three groups, so we make sure we don't forget use cases:
And for the optional ones we have user options. One think to discuss is: should we allow (with some "big" warning) to export stuff explicitly breaking the provenance? Originally I was against, but there have been a few use cases where this is actually needed... (e.g. exporting data but leaving out some inputs because they have some license; or exporting only the results to have slimmer databases, if I want to study something, and I want to have the same UUIDs, but I don't care having the full provenance in my local DB). In this case, it would be good to still have somewhere a 'note' that the provenance was in some way cut or broken (in verdi node delete, we actually add an entry to the DbLog table: |
Available AiiDA link discussion can be found at #1174 |
This is an overview of the export algorithm (that enriches a given set of nodes by the user). It decides which is the final set of nodes and the links to be exported based on the user choices (private nodes, & rules that can be overridden). Private nodes Node export rules
Node export algorithm
Link export rules For every node in the to_be_exported, export the corresponding links based on the following rules
At the receiver side:
|
Thanks! A few comments:
As a remark, as I'm sure there will be new/slighlty different rules and requirements as soon as new users will use this, we should have each link direction/type with an option, to make it easy to change the rules for different usecases. Also, in the last sentence, I think it should read "The import file should work in an empty database and it should not crash, when the default link/node selection rules are not overridden" |
Thanks for the comments! I think that the exceptions and the private nodes the whole procedure starts to be more complicated than it should be. I tend to believe that these should be 2 independent issues: I also tend believe for the (b) that the private node set should not stop the graph exploration procedure (i.e. a) . I think that it should continue and just the nodes in the private node set should not be exported. I also tend to believe that if we would like not to export some nodes because some others are marked as private (i.e. a calculation that has as input private data), we should just enrich the set of private nodes with more nodes based on these assumptions. That way we separate the problem in (clearly defined) sub-problems: Maybe it would be better to discuss face-to-face with some concrete examples. |
What we discussed & the override rules can be found at https://github.com/szoupanos/aiida_core/tree/issue_1102_b The hidden nodes have not been implemented yet. |
@ltalirz @giovannipizzi |
When I tried to export the DB with 70k CifData, WorkFunction and ParameterData, I got this:
I'm not sure whether this is a problem of the state of my DB or of the new export. l'll check with @yakutovicha that he tests the export with a completely new DB again. |
Hello, is there any update on this? Did you have the time to check? |
I tried to check out your branch and run a simple
|
@giovannipizzi The above algorithm expects that the Code is Data instance which is not the case for AiiDA v0.12. I will modify it accordingly and I will change it back when we change the AiiDA hierarchy to what we have agreed (Code is an instance, and subclass, of Data) |
Things go well. I exported the following groups from a test database, I imported them to an empty one and all nodes and links are exported as expected (checked all nodes and all links of the imported nodes of the imported groups)
I will do some ping-pong exchange of data to see if I get correct results too. |
The work on the new export algorithm that supports workcalculation/workchain nodes and the respective link rules will be implemented under the ticket #1758 |
The work of the export & import of |
Currently the export and import do not respect all the properties of
WorkCalculation
nodes. We will have to make sure that all links are properly exported and imported and that theDbLog
entries are also copied over, which are used for thereport
functionality of theWorkChains
The text was updated successfully, but these errors were encountered: