-
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
multiple equal Code labels/names, problem? #522
Comments
Hmm, that's an interesting case. |
Yes. Sure the workflows/workchains are written with code nodes (which works fine by the way). But the way you get the code in your 'script'/'notebook' to run stuff, the labels are there for convenience. So what I pointed out above is, that the scripts that you write to generate data. But this is a minor thing over all, it will show up if you work on several DBs and share data with others. How annoying it is, we will see. |
By the way: |
Good point. But that's actually a bug that was introduced when refactoring the get_from_string() function. I'll try to see if I manage to fix it soon. |
I know. just wanted to point it out, in case you are not aware |
I will open a new issue #536 that will only address the problem when passing an integer pk to verdi code. |
I will keep this issue open for further discussion, but I think it's in principle ok to have multiple codes with the same name, even if not convenient. I keep this open because we should instead encourage people to pass the Code node itself rather than the code label to any workflow they write. In particular, we should improve our examples, and make sure we can pass a code as input to workfunctions/workchains ( @muhrin is this already possible?) |
Yes, it is possible to parse a code to a workchain. |
Then, I think we can even close the issue, if you agree. I will add a different issue to the aiida_demos repo. |
Is there a reason why code labels should not be unique?
In my opinion:
either AiiDA should not allow in 'code setup' to save a code with a certain label if that label is already in the database (enforce code label uniqueness),
or all methods like get_code_from_string(codename) should take per default convention the 'newest code' if not unique. Maybe bad idea, you also have to think about import of other databases.
(In general if you import data, you might 'break' the provenance in a sense that you cannot execute the code/workflows anymore, which generated the original data, but you also do not want to use a different "Code" node with the same name without knowing.)
I guess this might be a small problem for materials cloud, because if you have two times 'pw@cluster' in you database you cannot run some of your QE workflows with that code anymore.
Therefore, code label handling is bad use in workchains/workflows.
But maybe there are reasons not to do so and you have a different opinion on this.
(we had a setup script for the database in our tutorial and a lot of people executed that several times, which made everything with code labels not work. But sure the script could have been smarter.)
The text was updated successfully, but these errors were encountered: