diff --git a/src/hyfi/main/__init__.py b/src/hyfi/main/__init__.py index 9f053c76..dc98d842 100644 --- a/src/hyfi/main/__init__.py +++ b/src/hyfi/main/__init__.py @@ -342,6 +342,8 @@ def viewsource(obj): @staticmethod def run(cfg: Union[Dict, DictConfig], target: Optional[str] = None): """Run the config""" + if target and target not in cfg: + raise ValueError(f"No {target} configuration found") if "workflow" in cfg and (target is None or target == "workflow"): workflow = HyFI.workflow_config(**cfg["workflow"]) HyFI.run_workflow(workflow)