-
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
Try and make Computer
a mutable object by removing attributes that influence provenance
#4980
Comments
I would second some flexibility here as well. In terms of usability, there is a precursor to this, which is to allow |
Here's another very simple idea for approaching the mutability of Computers and Codes that would solve the main use cases I have in mind: copy-on-edit. Let's start with Codes: say, you realize you need to update something in the configuration of
In the case of Computers, the same applies, only that after creating the new Computer we will also want to create clones of the Codes that were installed on the old Computer. If I'm thinking this through correctly, this solves the user's problem (no need to update scripts, no need to re-setup things from scratch), while also fully preserving provenance (previous Code/Computer objects still exist in the database). Thoughts @sphuber ? [1] There could e.g. be a [2] If we feel it is necessary, instead of modifying the label, this could instead add an attribute or extra that points to the "successor Code", thus marking the Code as "legacy" so it can be automatically excluded by default from interfaces like P.S. Of course, this would not apply to scripts that load codes/computers by PK/UUID rather than by label. |
you beat me to it @ltalirz lol 👍; I also had this thought on aiidateam/team-compass#12, but hadn't gotten round to writing it down The only issue to resolve I think would be for querying, you may perhaps want to query for all calculations using a certain computer plus all of its old version. |
As long as the "copy" contains a pointer to the original (e.g. an attribute In order not to confuse users, my feeling is we probably want to both have the pointer attribute and relabel the original code. [1] In principle this would be a relational table between codes/computers; don't know whether this is overkill here. |
Currently the
Computer
class is fully immutable when stored. This can cause usability problems when people configure it incorrectly, most notably thempirun_command
, and once they notice it after having run a first calculation on it, they can no longer change it and are forced to delete calculations, code and then the computer, or create a new one. It could be argued that the computer should have minimal impact on the provenance as far as the attributes go that are defined for it in AiiDA. If we could move this attribute (and potentially others) to for example theCode
instead, theComputer
instance could be made mutable and mistakes can be easily corrected.Of course, we introduce the possibility that a user can configure a
Computer
for machine A, run a bunch of calculations, and then update the hostname to match machine B and run more calculations there. The provenance will contain a bunch of calculations that seem to have been run with the sameComputer
but were actually run on a different machine. Note that theCode
would have to work on both machine A and B. This is an edge case, and I think this would be an acceptable risk and we should just instruct users that this is clearly not what one should do. Discussed this with @louisponet and he agreed with this.The text was updated successfully, but these errors were encountered: