@@ -181,7 +181,7 @@ def update(self, overlay: 'Configuration') -> None:
181181 self .checkpoints .update (overlay .checkpoints )
182182 self .resume .update (overlay .resume )
183183
184- def check_consistent (self ) -> None :
184+ def check_consistent (self , check_runnable : bool = True ) -> None :
185185 """Checks that the configuration is internally consistent.
186186
187187 This checks:
@@ -197,6 +197,10 @@ def check_consistent(self) -> None:
197197
198198 If any of these requirements is false, this function will raise a RuntimeError
199199 with an explanation of the problem.
200+
201+ Args:
202+ check_runnable: if False, skip the checks for whether component
203+ implementations exist and whether resources have been requested.
200204 """
201205 errors = list ()
202206
@@ -207,11 +211,13 @@ def check_consistent(self) -> None:
207211 errors .extend (self ._check_duplicate_implementations ())
208212
209213 component_paths = self ._component_paths ()
210- errors .extend (self ._check_implementations_exist (component_paths ))
214+ if check_runnable :
215+ errors .extend (self ._check_implementations_exist (component_paths ))
211216 errors .extend (self ._check_consistent_ports (component_paths ))
212217 errors .extend (self ._check_custom_implementations (component_paths ))
213218 errors .extend (self ._check_consistent_settings (component_paths ))
214- errors .extend (self ._check_resources (component_paths ))
219+ if check_runnable :
220+ errors .extend (self ._check_resources (component_paths ))
215221
216222 if errors :
217223 raise RuntimeError (
0 commit comments