From 8a5a6ed8960c21036e578993876720f6dab97918 Mon Sep 17 00:00:00 2001 From: empEvil Date: Tue, 23 Jul 2024 13:37:57 -0400 Subject: [PATCH] adding better descriptors --- ceci/stage.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ceci/stage.py b/ceci/stage.py index 3474cf0..a68ffcf 100644 --- a/ceci/stage.py +++ b/ceci/stage.py @@ -150,7 +150,10 @@ def run(self): # pragma: no cover raise NotImplementedError("run") def validate(self): - """Check that the inputs actually have the data needed for execution""" + """Check that the inputs actually have the data needed for execution, + This is called before the run method. It is an optional stage, meant + for checking that the input to the stage is actual in the form and + shape needed before an expensive run is executed.""" pass def load_configs(self, args): @@ -670,8 +673,10 @@ def execute(cls, args, comm=None): try: stage.validate() except Exception as error: - print(f"Looks like there is an validation error in: {cls.name}") - print(error) + if stage.rank==0: + print(f"Looks like there is an validation error in: {cls.name}", + "the input data for this stage did not pass the checks implemented on it.") + print(error) raise