Skip to content

πŸ› Protocols: overrides warn for protocol inputs in higher level workflowsΒ #1214

@mbercx

Description

@mbercx

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:

  1. 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.

  2. 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_family as an explicit input in the PwRelaxWorkChain input, it will be passed as an override to the PwBaseWorkChain. That would break the logic that sets the default pseudo_family for SpinType.SPIN_ORBIT:

    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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions