You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
While it is already very useful to be able to store AiiDA computer and code configurations in yaml files like these, it its current form it is difficult to share them on the aiida code registry in a way that makes them easily reusable.
The issue is that certain parameters of the configuration (e.g. which slurm "account" to use or perhaps which scheduler queue) are typically set in the "prepend text" of the computer but will differ from user to user.
Which parameters vary can depend on the computer in question, so I don't think this can be generalized at the level of the AiiDA-internal computer representation.
However, one could consider introducing a templating language like jinja2 inside the configuration files (jinja2 inside yaml is something done by ansible as well, i.e. this combination should not pose issues).
This also allows to set default values where it makes sense (e.g. for the label, which is good to standardize but which some users may want to change):
The "interactive version" of this is straightforward to implement - simply pass all the config values through a jinja2 parser and prompt the user for missing values.
The "non-interactive version" is a bit less obvious to me. One way would be to follow the approach of the jinja2-cli and add a cli option --config-vars that takes another yaml with just
slurm_partition: normalslurm_account: abc
(not super elegant, perhaps there are better ways...)
P.S. jinja2 doesn't clash with the existing templating mechanism used by AiiDA (e.g. {username}).
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe
While it is already very useful to be able to store AiiDA computer and code configurations in yaml files like these, it its current form it is difficult to share them on the aiida code registry in a way that makes them easily reusable.
The issue is that certain parameters of the configuration (e.g. which slurm "account" to use or perhaps which scheduler queue) are typically set in the "prepend text" of the computer but will differ from user to user.
This led @yakutovicha to add a new computer just for a specific project, which leads to duplication of information and is not reusable by others.
Describe the solution you'd like
Which parameters vary can depend on the computer in question, so I don't think this can be generalized at the level of the AiiDA-internal computer representation.
However, one could consider introducing a templating language like
jinja2
inside the configuration files (jinja2
insideyaml
is something done byansible
as well, i.e. this combination should not pose issues).This also allows to set default values where it makes sense (e.g. for the label, which is good to standardize but which some users may want to change):
The "interactive version" of this is straightforward to implement - simply pass all the config values through a
jinja2
parser and prompt the user for missing values.The "non-interactive version" is a bit less obvious to me. One way would be to follow the approach of the jinja2-cli and add a cli option
--config-vars
that takes another yaml with just(not super elegant, perhaps there are better ways...)
P.S.
jinja2
doesn't clash with the existing templating mechanism used by AiiDA (e.g.{username}
).The text was updated successfully, but these errors were encountered: