-
Notifications
You must be signed in to change notification settings - Fork 97
Description
We introduced a check for erroneous keys in the overrides in 9f49018. This has been immensely useful even for me, since it's quite easy to mess up the correct level of an override setting. However, one thing I didn't consider is that e.g. in the protocol of the PwRelaxWorkChain, we do not specify protocol inputs like pseudo_family and meta_parameters explicitly in the protocol, so it doesn't get added to the list of keys to reference against, and the user gets a warning even when they specify the overrides correctly. Some off-the-cuff solution ideas:
-
We could just apply the validation on the
BaseRestartWorkChains. That would still be a great help, but of course we remove the nice validation for higher-level inputs specified wrongly in the overrides, which is a shame. -
We could explicitly set all the "protocol inputs" in the YAML files of higher-level workflows. However, this would mean some duplication (fine), and break some logic, e.g. if we set the
pseudo_familyas an explicit input in thePwRelaxWorkChaininput, it will be passed as an override to thePwBaseWorkChain. That would break the logic that sets the defaultpseudo_familyforSpinType.SPIN_ORBIT:aiida-quantumespresso/src/aiida_quantumespresso/workflows/pw/base.py
Lines 204 to 205 in 1341c41
if spin_type is SpinType.SPIN_ORBIT and overrides is not None and 'pseudo_family' not in overrides: pseudo_family = 'PseudoDojo/0.4/PBEsol/FR/standard/upf'
Frankly, I think all this points to an issue with the complexity of how the inputs are constructed from the various protocol files. Solving that is a long-standing issue, but for now let's think of how we can still get as much validation as possible without raising erroneous warnings.